Evaluating the Polynomial Confluent Hypergeometric
Function 1F1(-n;b;x)



D. Baruth, x87@iging.com





Kummer’s Confluent Hypergeometric Function  1F1(a;b;x) [1,2]  is calculated with either[3]  _F_1F1  that utilizes the 80-bit x87 FPU Registers or  _G_1F1  that uses Virtual Registers.[4]  The first is very fast but limited to extended precision (64-bit mantissa and 15-bit exponent), the latter is much slower but can handle large FP numbers (256-bit mantissa and 31-bit exponent). The abilities and limitations of both procedures are demonstrated for the special case where Kummer’s Function is the polynomial:

1F1(-n ; ½ ; x) = 1 – 2nx + 2n(n-1)x²/3 + … + (-1)nxn/(½)n

For x = 1, 10 and 100, benchmarks are set at values of n, below which the same precision can be reached even faster.  In the table below, results are given with 128-bit precision.  The darkened digits correspond to the precision of a particular procedure at a given evaluation time t.   Time is measured in “clock” ≡ ck units:  For a 1.47 GHz CPU/FPU, 1.47*109 ck = 1 sec.[5]

1F1(-n ; ½ ; x)
n, x  t [_F_1F1  t[_G_1F1 1F1    [ε ≤ 2-128]
 1F1(-35 ; ½ ; 1)  1300    +1.256926730491604228067389969032865718E+0 
 1F1(-720 ; ½ ; 1)    273K  -1.5914064253677328254520325969269185301E+0 
 1F1(-1980 ; ½ ; 1)    920K  +8.438199091443311996685663784571684528E-1 
 1F1(-8 ; ½ ; 10)  700    -1.14537191203857870524537191203857870524E+1 
 1F1(-95 ; ½ ; 10)    266K  +2.8680160339038035500964801522560300601E+1 
 1F1(-250 ; ½ ; 10)    893K  +1.186453085023340704572061749231623591E+2 
 1F1(-20 ; ½ ; 100)  1100    +2.0581070293547637767050981811789686078E+20 
 1F1(-50 ; ½ ; 100)    146K  -6.1067540112176437522317082681536869527E+21 
 1F1(-81 ; ½ ; 100)    408K  -3.510324688236286184881898194864510532E+21 

The maximum precision of the procedure  _G_1F1  can be set to 64, 128 or 256 bits. The 64-bits option, however, cannot compete with  _F_1F1  that is two orders of magnitude faster.



  1. Handbook of Mathematical Functions, Abramowitz & Stegun, Dover Publications, fifth printing; Confluent Hypergeometric Function, Chapter 13.
  2. Table of Integrals Series and Products, Gradshteyn & Ryzhik, Academic Press, 1965; Degenerate Hypergeometric Function, 9.21, pp1057.
  3. _F_1F1 and _G_1F1 are part of a special math-library for transcendental functions written by the author in assembly (MASM 5.1).   Interfaces with high-level languages -- e.g. FORTRAN, C, Basic, etc. -- can thus be easily customized.
  4. See Introduction to Virtual Registers by the author.
  5. Calculations were performed with an AMD Athlon XP 1700+, 1.47 GHz CPU.



Copyright Dan Baruth © 2007.  All rights reserved.