]> www.ginac.de Git - cln.git/blob - src/float/transcendental/cl_LF_ratsumseries_pqcd.cc
Initial revision
[cln.git] / src / float / transcendental / cl_LF_ratsumseries_pqcd.cc
1 // eval_pqcd_series().
2
3 // General includes.
4 #include "cl_sysdep.h"
5
6 // Specification.
7 #include "cl_LF_tran.h"
8
9
10 // Implementation.
11
12 #include "cl_lfloat.h"
13 #include "cl_integer.h"
14 #include "cl_abort.h"
15 #include "cl_LF.h"
16
17 const cl_LF eval_pqcd_series (uintL N, cl_pqcd_series_term* args, uintC len)
18 {
19         if (N==0)
20                 return cl_I_to_LF(0,len);
21         var cl_pqcd_series_result sums;
22         eval_pqcd_series_aux(N,args,sums);
23         // Instead of computing  fsum = T/Q  and  gsum = V/(D*Q)
24         // and then dividing them, to compute  gsum/fsum, we save two
25         // divisions by computing  V/(D*T).
26         return
27           cl_I_to_LF(sums.V,len) / The(cl_LF)(sums.D * cl_I_to_LF(sums.T,len));
28 }