Listen to QB64 Report!Our podcast on all things QB64 is out now. Listen athttp://podcast.qb64.org
0 Members and 1 Guest are viewing this topic.
$CONSOLE:ONLY_DEST _CONSOLEDIM x AS DOUBLEFOR x = 0 TO 17 PRINT x, gamma(x)NEXTFUNCTION gamma# (z AS DOUBLE) '' minimax approximation in the range 0 to 140 gamma = ((6.5509757416010777593d10+_ (5.9509245152044405705d10+_ (2.4326261621014728055d10+_ (5.8928108119886118679d9+_ (9.3678283088322428701d8+_ (1.0211711437792197690d8+_ (7.7302875846952982533d6+_ (4.0126933328085900555d5+_ (13669.279342201901514d0+_ (275.93799589896263864d0+_ 2.5066282746310005024d0*z)*z)*z)*z)*z)*z)*z)*z)*z)*z)*(z+11d0)^(z+0.5d0)_ *exp(-z-11d0)/(3628800d0+(10628640d0+(12753576d0+(8409500d0+(3416930d0+_ (902055d0+(157773d0+(18150d0+(1320d0+(55d0+z)*z)*z)*z)*z)*z)*z)*z)*z)*z))END FUNCTION
0 1 1 1 2 2 3 6 4 24 5 120 6 720 7 5040 8 40320 9 362880 10 3628800 11 39916800 12 479001600 13 6227020800 14 87178291200 15 1307674368000 16 20922789888000 17 355687428096000
0 1 1 .9999999999999998 2 2.000000000000001 3 6 4 24 5 120 6 720 7 5040.000000000001 8 40319.99999999994 9 362879.9999999995 10 3628800.000000004 11 39916799.99999993 12 479001599.9999987 13 6227020799.999996 14 87178291200.00023 15 1307674368000.004 16 20922789888000.04 17 355687428096001.8
Have you tried _FLOAT?