X-Git-Url: https://ginac.de/CLN/cln.git//cln.git?a=blobdiff_plain;f=src%2Ffloat%2Ftranscendental%2Fcl_LF_ratsumseries_pqcd.cc;h=2392fd799043ddf37ae29f269df0402ee9d2a981;hb=3af2cde18b3aabed4c808b0113daa81c2263b0bd;hp=7c22c811b10a13f8521dcf2e5479d96c06525f66;hpb=c84c6db5d56829d69083c819688a973867694a2a;p=cln.git diff --git a/src/float/transcendental/cl_LF_ratsumseries_pqcd.cc b/src/float/transcendental/cl_LF_ratsumseries_pqcd.cc index 7c22c81..2392fd7 100644 --- a/src/float/transcendental/cl_LF_ratsumseries_pqcd.cc +++ b/src/float/transcendental/cl_LF_ratsumseries_pqcd.cc @@ -1,18 +1,18 @@ // eval_pqcd_series(). // General includes. -#include "cl_sysdep.h" +#include "base/cl_sysdep.h" // Specification. -#include "cl_LF_tran.h" +#include "float/transcendental/cl_LF_tran.h" // Implementation. #include "cln/lfloat.h" #include "cln/integer.h" -#include "cln/abort.h" -#include "cl_LF.h" +#include "cln/real.h" +#include "float/lfloat/cl_LF.h" namespace cln { @@ -20,7 +20,7 @@ const cl_LF eval_pqcd_series (uintC N, cl_pqcd_series_term* args, uintC len) { if (N==0) return cl_I_to_LF(0,len); - var cl_pqcd_series_result sums; + var cl_pqcd_series_result sums; eval_pqcd_series_aux(N,args,sums); // Instead of computing fsum = T/Q and gsum = V/(D*Q) // and then dividing them, to compute gsum/fsum, we save two @@ -29,4 +29,30 @@ const cl_LF eval_pqcd_series (uintC N, cl_pqcd_series_term* args, uintC len) cl_I_to_LF(sums.V,len) / The(cl_LF)(sums.D * cl_I_to_LF(sums.T,len)); } +const cl_LF eval_pqcd_series (uintC N, cl_pqcd_series_stream& args, uintC len) +{ + if (N==0) + return cl_I_to_LF(0,len); + var cl_pqcd_series_result sums; + eval_pqcd_series_aux(N,args,sums); + // Instead of computing fsum = T/Q and gsum = V/(D*Q) + // and then dividing them, to compute gsum/fsum, we save two + // divisions by computing V/(D*T). + return + cl_I_to_LF(sums.V,len) / The(cl_LF)(sums.D * cl_I_to_LF(sums.T,len)); +} + +const cl_LF eval_pqcd_series (uintC N, cl_pqcd_series_stream& args, uintC len, uintC trunclen) +{ + if (N==0) + return cl_I_to_LF(0,len); + var cl_pqcd_series_result sums; + eval_pqcd_series_aux(N,args,sums,trunclen); + // Instead of computing fsum = T/Q and gsum = V/(D*Q) + // and then dividing them, to compute gsum/fsum, we save two + // divisions by computing V/(D*T). + return + cl_R_to_LF(sums.V,len) / The(cl_LF)(sums.D * cl_R_to_LF(sums.T,len)); +} + } // namespace cln