# HG changeset patch # User michael # Date 1174524769 0 # Node ID 5fa551fb7640a3c8a8ec24f26d938998978e28ff # Parent e210bbc7dd19451bec6acb4f3eea0f5cda9d4f11 optimize bessel function instead of trusting gcc to do trivial optimizations (as gcc doesnt ...) diff -r e210bbc7dd19 -r 5fa551fb7640 resample2.c --- a/resample2.c Thu Mar 22 00:16:41 2007 +0000 +++ b/resample2.c Thu Mar 22 00:52:49 2007 +0000 @@ -71,9 +71,10 @@ double t=1; int i; + x= x*x/4; for(i=1; i<50; i++){ - t *= i; - v += pow(x*x/4, i)/(t*t); + t *= x/(i*i); + v += t; } return v; }