]> www.ginac.de Git - cln.git/blob - src/float/misc/cl_F_extendsqrtx.cc
Use paths relative the `src' directory in the #include directives.
[cln.git] / src / float / misc / cl_F_extendsqrtx.cc
1 // cl_F_extendsqrtx().
2
3 // General includes.
4 #include "base/cl_sysdep.h"
5
6 // Specification.
7 #include "float/cl_F.h"
8
9
10 // Implementation.
11
12 #include "float/sfloat/cl_SF.h"
13 #include "float/lfloat/cl_LF.h"
14
15 namespace cln {
16
17 const cl_F cl_F_extendsqrtx (const cl_F& x)
18 {
19 // Methode:
20 // SF -> DF wegen 17+sqrt(17)+2+7 = 30.2 < 53
21 // FF -> DF wegen 24+sqrt(24)+2+7 = 37.9 < 53
22 // DF -> LF(5) wegen 53+sqrt(53)+2+10 = 72.3 < 80
23 // LF(n) -> LF(n+i)
24         floatcase(x
25         ,       return cl_SF_to_DF(x); // 17+sqrt(17)+2+7 = 30.2 < 53
26         ,       return cl_FF_to_DF(x); // 24+sqrt(24)+2+7 = 37.9 < 53
27         ,       return cl_DF_to_LF(x,ceiling(73,intDsize)); // 53+sqrt(53)+2+10 = 72.3 < 73
28         ,       return extend(x,cl_LF_len_incsqrtx(TheLfloat(x)->len));
29         );
30 }
31
32 }  // namespace cln