numerical-computing Questions
0
How can I use the LD_PRELOAD trick on Windows to circumvent MKL performance degradation on AMD CPUs?
How can I use the LD_PRELOAD trick on Windows to circumvent MKL performance degradation on AMD CPUs?
The documentation linked here explains that the LD_PRELOAD trick can be used to force MKL to use...
Epicene asked 14/5 at 23:27
1
Solved
When computing A @ a where A is a random N by N matrix and a is a vector with N random elements using numpy the computation time jumps by an order of magnitude at N=100. Is there any particular rea...
Fail asked 2/12, 2022 at 22:4
3
I'm trying to write a program that calculates decimal digits of π to 1000 digits or more.
To practice low-level programming for fun, the final program will be written in assembly, on a 8-bit CPU t...
Selfdevotion asked 7/5, 2019 at 12:25
1
Solved
In the below code .I get the expected results of x1
import numpy as np
x1 = np.arange(0.5, 10.4, 0.8)
print(x1)
[ 0.5 1.3 2.1 2.9 3.7 4.5 5.3 6.1 6.9 7.7 8.5 9.3 10.1]
But in the code below, wh...
Doubledecker asked 27/4, 2019 at 15:5
2
Solved
How to solve a non-square linear system with R : A X = B ?
(in the case the system has no solution or infinitely many solutions)
Example :
A=matrix(c(0,1,-2,3,5,-3,1,-2,5,-2,-1,1),3,4,T)
B=matri...
Damal asked 4/11, 2013 at 8:1
2
Solved
I have a very large diagonal matrix that I need to split for parallel computation. Due to data locality issues it makes no sense to iterate through the matrix and split every n-th calculation betwe...
Homograph asked 15/9, 2017 at 10:16
5
Solved
Update: Elixir isn't slow, my algorithm was. My algorithms weren't even apples to apples comparison. See Roman's answers below for Ruby and Go equivalent algorithms. Also thanks to José, my slow al...
Hillery asked 7/9, 2015 at 12:38
2
Solved
Do symbolic math calculations (especially for solving nonlinear polynomial systems) cause huge performance (calculation speed) disadvantage compared to numeric calculations? Are there any benchmark...
Plasma asked 14/7, 2017 at 12:8
2
Solved
I found this: http://en.cppreference.com/w/cpp/numeric/math/isinf but it appears to check for either positive or negative infinity. I just want to check if a value is equal to exactly negative infi...
Recital asked 23/2, 2015 at 21:22
3
Solved
I just came across the NArray library for Ruby -- please excuse my ignorance when asking this question :)
What are the advantages of using the NArray library over the standard Ruby Array implement...
Englishman asked 20/10, 2011 at 7:4
3
Solved
I wrote a script in python, and it surprised me.
Basically, it takes five 20 digit numbers, multiplies them and then raises them to the power of 3000. The timeit module is used to find the time req...
Salted asked 30/3, 2014 at 17:48
4
Solved
I'm simply trying to evaluate if an input is a number, and figured isNaN would be the best way to go. However, this causes unreliable results. For instance, using the following method:
funct...
Shortchange asked 13/6, 2013 at 19:17
2
Solved
Looking for the proper data type (such as IndexedSeq[Double]) to use when designing a domain-specific numerical computing library. For this question, I'm limiting scope to working with 1-Dimensiona...
Whisky asked 5/12, 2012 at 15:17
2
Solved
I was implementing some basic complex number arithmetic in Clojure, and noticed that it was about 10 times slower than roughly equivalent Java code, even with type hints.
Compare:
(defn plus [[^d...
Jezebel asked 6/8, 2012 at 8:27
1
I am developing a C application which needs floating-point determinism. I would also like the floating-point operations to be fairly fast. This includes standard transcendental functions not specif...
Girl asked 10/2, 2012 at 23:0
2
Solved
Given log(a) and log(b), I want to compute log(a+b) (in a numerically stable way).
I wrote a little function for this:
def log_add(logA,logB):
if logA == log(0):
return logB
if logA<logB:
...
Marieann asked 20/9, 2011 at 6:29
4
Solved
sorry if dumb but could not find an answer.
#include <iostream>
using namespace std;
int main()
{
double a(0);
double b(0.001);
cout << a - 0.0 << endl;
for (;a<1.0;a+=b);
c...
Temptress asked 7/5, 2010 at 1:23
2
Solved
Suppose I have a series of index numbers that consists of a check digit. If I have a fair enough sample (Say 250 sample index numbers), do I have a way to extract the algorithm that has been used t...
Outmaneuver asked 25/2, 2010 at 6:22
4
Solved
I'm using Clojure and I need to run a small simulation. I have a vector of length n (n is usually between 10 and 100) that holds values. On each simulation round (maybe 1000 rounds together), one o...
Armful asked 17/11, 2009 at 11:6
6
Solved
A decade or two ago, it was worthwhile to write numerical code to avoid using multiplies and divides and use addition and subtraction instead. A good example is using forward differences to evaluat...
Underwood asked 18/7, 2009 at 1:49
1
© 2022 - 2024 — McMap. All rights reserved.