]> www.ginac.de Git - cln.git/blob - src/float/transcendental/cl_LF_ratsumseries_pqcd.cc
* All Files have been modified for inclusion of namespace cln;
[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 "cln/lfloat.h"
13 #include "cln/integer.h"
14 #include "cln/abort.h"
15 #include "cl_LF.h"
16
17 namespace cln {
18
19 const cl_LF eval_pqcd_series (uintL N, cl_pqcd_series_term* args, uintC len)
20 {
21         if (N==0)
22                 return cl_I_to_LF(0,len);
23         var cl_pqcd_series_result sums;
24         eval_pqcd_series_aux(N,args,sums);
25         // Instead of computing  fsum = T/Q  and  gsum = V/(D*Q)
26         // and then dividing them, to compute  gsum/fsum, we save two
27         // divisions by computing  V/(D*T).
28         return
29           cl_I_to_LF(sums.V,len) / The(cl_LF)(sums.D * cl_I_to_LF(sums.T,len));
30 }
31
32 }  // namespace cln