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