Numberphile video: https://www.youtube.com/watch?v=ASoz_NuIvP0

PS: What about integers >1000? Any work has been done?

]]>I’ve fixed the code in the post and also posted a link to the much more reliable version on GitHub. https://github.com/mikecroucher/GSL_example

Cheers,

Mike

/*

Evaluate Dawson’s integral.

http://www.walkingrandomly.com/

Usage:

g++ -std=c++11 dawson.cpp -o ./dawson -lgsl -lgslcblas -lm -L/opt/local/lib

./dawson > results.txt

Terminal type is now ‘aqua’

gnuplot> plot “results.txt”

*/

#include

#include

#include

int main(){

double range = 6.0; // max/min values

int N = 100000; // Number of evaluations

double step = 2 * range / N;

std::vector x(N);

std::vector result(N);

for (int i=0;i<=N;i++){

x[i] = -range+i*step;

result[i] = gsl_sf_dawson(x[i]);

}

for (int i=0;i<=N;i++){

std::cout << x[i] << " " << result[i] << std::endl;

}

return 0;

}

do you, like me, have trouble convincing one’s Linux loving colleagues to take WSL seriously?

Like you say in the article, it won’t replace all native Linux uses, but to save dual booting or running in a full VM it seems a great solution to me.

-Ian ]]>

The results show (from the left to the right): a long-warmup, a fast-warmup and a slowdown. Interestingly, the first result shows an upgrade of MATLAB JIT compiler which seems to perform now some kind of tracing/profiling with subsequent compilation (two stages) instead of pre-compiling the code during only the first run.

The three benchmarks come from the Ostrich2 suite by Sable Team (https://github.com/Sable/Ostrich2). Each benchmark was repeated 300 times in a loop in order to ignite the JIT compilation. In the evaluation, we have followed the methodology from Barrett et al. but without using KRUN (https://arxiv.org/abs/1602.00602 – btw. an excellent paper and a study).

In conclusion: these warmup patterns change with MATLAB versions and programs under analysis. The patterns need a consideration if one would like to report execution times from the steady-state only (subsequent executions with minimal variance, I guess).

As a side note: the longest warmup pattern I have encountered so far took 1500 iterations (on R2018b).

]]>I am starting a PhD in stability analysis of power systems at Manchester and I am using a code that only works with the free trial of the MATLAB Statistics Toolbox. I have tried to download free versions of mvnrnd.m but they give error messages and I’m sure it is just mvnrnd.m that causes the problem. The code also uses gamrnd.m but I think I have found a similar free version of this that works. I work on a Mac at home. Please could you help me?

Thank you,

Chloe

All the repeated benchmarks I’ve seen now report it running at full speed.

-Ian ]]>