]> www.ginac.de Git - cln.git/blobdiff - src/float/lfloat/cl_LF.h
Make the long-float overflow check work on 64-bit platforms.
[cln.git] / src / float / lfloat / cl_LF.h
index 3a3fc96c223e63e813fc0fdf4d3d331d21072abb..8da8d4013a9749d9ee46b69a0a04f31b3f733f0f 100644 (file)
@@ -20,9 +20,11 @@ struct cl_heap_lfloat : cl_heap {
 // so that a LF has not fewer mantissa bits than a DF.
   #define LF_minlen  ceiling(53,intDsize)
 // Exponent.
+// Define as 'unsigned int', not 'unsigned long', so that
+// LF_exp_high+1 wraps around to 0 just like the 'expo' field does.
   #define LF_exp_low  1
-  #define LF_exp_mid  0x80000000UL
-  #define LF_exp_high 0xFFFFFFFFUL
+  #define LF_exp_mid  0x80000000U
+  #define LF_exp_high 0xFFFFFFFFU
 
 inline cl_heap_lfloat* TheLfloat (cl_heap_lfloat* p)
        { return p; }