]> www.ginac.de Git - cln.git/blobdiff - include/cln/lfloat.h
Finalize CLN 1.3.7 release.
[cln.git] / include / cln / lfloat.h
index 033ed431108bb02a320984f0d498db8e182aafb0..d619ec3d68a2d72a639d38e966ff071584bc16b8 100644 (file)
@@ -20,7 +20,7 @@ extern const cl_LF operator- (const cl_LF& x);
 // Ergebnis: 0 falls x=y, +1 falls x>y, -1 falls x<y.
 extern cl_signean compare (const cl_LF& x, const cl_LF& y);
 
-// equal_hashcode(x) liefert einen equal-invarianten Hashcode für x.
+// equal_hashcode(x) liefert einen equal-invarianten Hashcode für x.
 extern uint32 equal_hashcode (const cl_LF& x);
 
 inline bool operator== (const cl_LF& x, const cl_LF& y)
@@ -37,13 +37,13 @@ inline bool operator> (const cl_LF& x, const cl_LF& y)
        { return compare(x,y)>0; }
 
 // minusp(x) == (< x 0)
-extern cl_boolean minusp (const cl_LF& x);
+extern bool minusp (const cl_LF& x);
 
 // zerop(x) stellt fest, ob ein Long-Float x = 0.0 ist.
-extern cl_boolean zerop (const cl_LF& x);
+extern bool zerop (const cl_LF& x);
 
 // plusp(x) == (> x 0)
-extern cl_boolean plusp (const cl_LF& x);
+extern bool plusp (const cl_LF& x);
 
 // Liefert zu zwei Long-Float x und y : (+ x y), ein LF.
 extern const cl_LF operator+ (const cl_LF& x, const cl_LF& y);
@@ -74,7 +74,7 @@ inline const cl_R operator* (const cl_RA& x, const cl_LF& y)
        extern const cl_R cl_LF_RA_mul (const cl_LF&, const cl_RA&);
        return cl_LF_RA_mul(y,x);
 }
-// Dem C++-Compiler muß man auch das Folgende sagen (wg. `int * cl_LF' u.ä.):
+// Dem C++-Compiler muß man auch das Folgende sagen (wg. `int * cl_LF' u.ä.):
 inline const cl_R operator* (const int x, const cl_LF& y)
        { return cl_I(x) * y; }
 inline const cl_R operator* (const unsigned int x, const cl_LF& y)
@@ -83,6 +83,10 @@ inline const cl_R operator* (const long x, const cl_LF& y)
        { return cl_I(x) * y; }
 inline const cl_R operator* (const unsigned long x, const cl_LF& y)
        { return cl_I(x) * y; }
+inline const cl_R operator* (const long long x, const cl_LF& y)
+       { return cl_I(x) * y; }
+inline const cl_R operator* (const unsigned long long x, const cl_LF& y)
+       { return cl_I(x) * y; }
 inline const cl_R operator* (const cl_LF& x, const int y)
        { return x * cl_I(y); }
 inline const cl_R operator* (const cl_LF& x, const unsigned int y)
@@ -91,6 +95,10 @@ inline const cl_R operator* (const cl_LF& x, const long y)
        { return x * cl_I(y); }
 inline const cl_R operator* (const cl_LF& x, const unsigned long y)
        { return x * cl_I(y); }
+inline const cl_R operator* (const cl_LF& x, const long long y)
+       { return x * cl_I(y); }
+inline const cl_R operator* (const cl_LF& x, const unsigned long long y)
+       { return x * cl_I(y); }
 // Spezialfall x = y.
 // Liefert zu einem Long-Float x : (* x x), ein LF.
 extern const cl_LF square (const cl_LF& x);
@@ -118,7 +126,7 @@ inline const cl_R operator/ (const cl_RA& x, const cl_LF& y)
        extern const cl_R cl_RA_LF_div (const cl_RA& x, const cl_LF& y);
        return cl_RA_LF_div(x,y);
 }
-// Dem C++-Compiler muß man nun auch das Folgende sagen:
+// Dem C++-Compiler muß man nun auch das Folgende sagen:
 inline const cl_LF operator/ (const cl_LF& x, const int y)
        { return x / cl_I(y); }
 inline const cl_LF operator/ (const cl_LF& x, const unsigned int y)
@@ -127,6 +135,10 @@ inline const cl_LF operator/ (const cl_LF& x, const long y)
        { return x / cl_I(y); }
 inline const cl_LF operator/ (const cl_LF& x, const unsigned long y)
        { return x / cl_I(y); }
+inline const cl_LF operator/ (const cl_LF& x, const long long y)
+       { return x / cl_I(y); }
+inline const cl_LF operator/ (const cl_LF& x, const unsigned long long y)
+       { return x / cl_I(y); }
 inline const cl_R operator/ (const int x, const cl_LF& y)
        { return cl_I(x) / y; }
 inline const cl_R operator/ (const unsigned int x, const cl_LF& y)
@@ -135,6 +147,10 @@ inline const cl_R operator/ (const long x, const cl_LF& y)
        { return cl_I(x) / y; }
 inline const cl_R operator/ (const unsigned long x, const cl_LF& y)
        { return cl_I(x) / y; }
+inline const cl_R operator/ (const long long x, const cl_LF& y)
+       { return cl_I(x) / y; }
+inline const cl_R operator/ (const unsigned long long x, const cl_LF& y)
+       { return cl_I(x) / y; }
 
 // Liefert zu einem Long-Float x>=0 : (sqrt x), ein LF.
 extern const cl_LF sqrt (const cl_LF& x);
@@ -333,7 +349,7 @@ extern const decoded_lfloat decode_float (const cl_LF& x);
 // den Exponenten von (decode-float x).
 // x = 0.0 liefert 0.
 // x = (-1)^s * 2^e * m liefert e.
-extern sintL float_exponent (const cl_LF& x);
+extern sintE float_exponent (const cl_LF& x);
 
 // float_radix(x) liefert (float-radix x), wo x ein Float ist.
 inline sintL float_radix (const cl_LF& x)
@@ -346,12 +362,12 @@ inline sintL float_radix (const cl_LF& x)
 extern const cl_LF float_sign (const cl_LF& x);
 
 // float_digits(x) liefert (float-digits x), wo x ein Float ist.
-// < ergebnis: ein uintL >0
-extern uintL float_digits (const cl_LF& x);
+// < ergebnis: ein uintC >0
+extern uintC float_digits (const cl_LF& x);
 
 // float_precision(x) liefert (float-precision x), wo x ein Float ist.
-// < ergebnis: ein uintL >=0
-extern uintL float_precision (const cl_LF& x);
+// < ergebnis: ein uintC >=0
+extern uintC float_precision (const cl_LF& x);
 
 
 // integer_decode_float(x) liefert zu einem Float x: (integer-decode-float x).
@@ -362,7 +378,7 @@ extern const cl_idecoded_float integer_decode_float (const cl_LF& x);
 
 
 // scale_float(x,delta) liefert x*2^delta, wo x ein LF ist.
-extern const cl_LF scale_float (const cl_LF& x, sintL delta);
+extern const cl_LF scale_float (const cl_LF& x, sintC delta);
 extern const cl_LF scale_float (const cl_LF& x, const cl_I& delta);
 
 
@@ -383,7 +399,6 @@ extern float float_approx (const cl_LF& x);
 extern double double_approx (const cl_LF& x);
 
 
-#ifdef WANT_OBFUSCATING_OPERATORS
 // This could be optimized to use in-place operations.
 inline cl_LF& operator+= (cl_LF& x, const cl_LF& y) { return x = x + y; }
 inline cl_LF& operator++ /* prefix */ (cl_LF& x) { return x = plus1(x); }
@@ -393,7 +408,6 @@ inline cl_LF& operator-- /* prefix */ (cl_LF& x) { return x = minus1(x); }
 inline void operator-- /* postfix */ (cl_LF& x, int dummy) { (void)dummy; x = minus1(x); }
 inline cl_LF& operator*= (cl_LF& x, const cl_LF& y) { return x = x * y; }
 inline cl_LF& operator/= (cl_LF& x, const cl_LF& y) { return x = x / y; }
-#endif
 
 
 // Runtime typing support.
@@ -403,9 +417,7 @@ extern cl_class cl_class_lfloat;
 // Debugging support.
 #ifdef CL_DEBUG
 extern int cl_LF_debug_module;
-static void* const cl_LF_debug_dummy[] = { &cl_LF_debug_dummy,
-       &cl_LF_debug_module
-};
+CL_FORCE_LINK(cl_LF_debug_dummy, cl_LF_debug_module)
 #endif
 
 }  // namespace cln