]> www.ginac.de Git - cln.git/blob - src/float/lfloat/misc/cl_LF_as.cc
Extend the exponent range from 32 bits to 64 bits on selected platforms.
[cln.git] / src / float / lfloat / misc / cl_LF_as.cc
1 // cl_LF_As().
2
3 // General includes.
4 #include "cl_sysdep.h"
5
6 // Specification.
7 #include "cln/lfloat.h"
8
9
10 // Implementation.
11
12 #include "cl_N.h"
13
14 namespace cln {
15
16 inline cl_boolean cl_LF_p (const cl_number& x)
17 {
18         if (x.pointer_p())
19                 if (x.heappointer->type == &cl_class_lfloat)
20                         return cl_true;
21         return cl_false;
22 }
23
24 const cl_LF& cl_LF_As (const cl_number& x, const char * filename, int line)
25 {
26         if (cl_LF_p(x)) {
27                 DeclareType(cl_LF,x);
28                 return x;
29         } else
30                 cl_as_error(x,"a long-float number",filename,line);
31 }
32
33 }  // namespace cln