| Author |
Comment/Response |
mario
|
01/03/13 07:53am
My problem is as follows: I want mathematica to evaluate the inverse function of the distribution function of a standard normal distribution to be fast. I tried to comiple the function as follows:
oneinverse = InverseFunction[CDF[NormalDistribution[]]];
multiinverse =
Compile[{{x, _Real, 1}}, oneinverse /@ x, Parallelization -> True,
RuntimeOptions -> "Speed", CompilationTarget -> "C"];
x = Table[0.1, {2^18}];
Timing[multiinverse[x]][[1]]
Timing[Sin /@ x][[1]]
But it takes still much longer, then e.g. the Sin[] function. I'm using mathematica 8.
URL: , |
|