]> www.ginac.de Git - cln.git/blobdiff - include/cln/sfloat.h
Replace CL_REQUIRE/CL_PROVIDE(cl_C_ring) with portable code.
[cln.git] / include / cln / sfloat.h
index 1f69d90e7d85c85d325d2d782ae66b16f6f83b06..20348b751620579ef658967147d9408c806355ee 100644 (file)
@@ -20,7 +20,7 @@ extern const cl_SF operator- (const cl_SF& x);
 // Ergebnis: 0 falls x=y, +1 falls x>y, -1 falls x<y.
 extern cl_signean compare (const cl_SF& x, const cl_SF& 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_SF& x);
 
 inline bool operator== (const cl_SF& x, const cl_SF& y)
@@ -37,13 +37,13 @@ inline bool operator> (const cl_SF& x, const cl_SF& y)
        { return compare(x,y)>0; }
 
 // minusp(x) == (< x 0)
-extern cl_boolean minusp (const cl_SF& x);
+extern bool minusp (const cl_SF& x);
 
 // zerop(x) stellt fest, ob ein Short-Float x = 0.0 ist.
-extern cl_boolean zerop (const cl_SF& x);
+extern bool zerop (const cl_SF& x);
 
 // plusp(x) == (> x 0)
-extern cl_boolean plusp (const cl_SF& x);
+extern bool plusp (const cl_SF& x);
 
 // Liefert zu zwei Short-Float x und y : (+ x y), ein SF.
 extern const cl_SF operator+ (const cl_SF& x, const cl_SF& y);
@@ -223,7 +223,7 @@ extern const decoded_sfloat decode_float (const cl_SF& 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_SF& x);
+extern sintE float_exponent (const cl_SF& x);
 
 // float_radix(x) liefert (float-radix x), wo x ein Float ist.
 inline sintL float_radix (const cl_SF& x)
@@ -236,12 +236,12 @@ inline sintL float_radix (const cl_SF& x)
 extern const cl_SF float_sign (const cl_SF& x);
 
 // float_digits(x) liefert (float-digits x), wo x ein Float ist.
-// < ergebnis: ein uintL >0
-extern uintL float_digits (const cl_SF& x);
+// < ergebnis: ein uintC >0
+extern uintC float_digits (const cl_SF& x);
 
 // float_precision(x) liefert (float-precision x), wo x ein Float ist.
-// < ergebnis: ein uintL >=0
-extern uintL float_precision (const cl_SF& x);
+// < ergebnis: ein uintC >=0
+extern uintC float_precision (const cl_SF& x);
 
 
 // integer_decode_float(x) liefert zu einem Float x: (integer-decode-float x).
@@ -252,7 +252,7 @@ extern const cl_idecoded_float integer_decode_float (const cl_SF& x);
 
 
 // scale_float(x,delta) liefert x*2^delta, wo x ein SF ist.
-extern const cl_SF scale_float (const cl_SF& x, sintL delta);
+extern const cl_SF scale_float (const cl_SF& x, sintC delta);
 extern const cl_SF scale_float (const cl_SF& x, const cl_I& delta);
 
 
@@ -273,7 +273,6 @@ extern float float_approx (const cl_SF& x);
 extern double double_approx (const cl_SF& x);
 
 
-#ifdef WANT_OBFUSCATING_OPERATORS
 // This could be optimized to use in-place operations.
 inline cl_SF& operator+= (cl_SF& x, const cl_SF& y) { return x = x + y; }
 inline cl_SF& operator++ /* prefix */ (cl_SF& x) { return x = plus1(x); }
@@ -283,22 +282,17 @@ inline cl_SF& operator-- /* prefix */ (cl_SF& x) { return x = minus1(x); }
 inline void operator-- /* postfix */ (cl_SF& x, int dummy) { (void)dummy; x = minus1(x); }
 inline cl_SF& operator*= (cl_SF& x, const cl_SF& y) { return x = x * y; }
 inline cl_SF& operator/= (cl_SF& x, const cl_SF& y) { return x = x / y; }
-#endif
 
 
 // Runtime typing support.
 extern cl_class cl_class_sfloat;
-static const void* const cl_SF_classes_dummy[] = { &cl_SF_classes_dummy,
-       &cl_class_sfloat
-};
+CL_FORCE_LINK(cl_SF_classes_dummy, cl_class_sfloat)
 
 
 // Debugging support.
 #ifdef CL_DEBUG
 extern int cl_SF_debug_module;
-static void* const cl_SF_debug_dummy[] = { &cl_SF_debug_dummy,
-       &cl_SF_debug_module
-};
+CL_FORCE_LINK(cl_SF_debug_dummy, cl_SF_debug_module)
 #endif
 
 }  // namespace cln