7 #include "cln/ffloat.h"
16 cl_signean compare (const cl_FF& x, const cl_FF& y)
19 // x und y haben verschiedenes Vorzeichen ->
22 // x und y haben gleiches Vorzeichen ->
23 // x >=0 -> vergleiche x und y (die rechten 24 Bits)
24 // x <0 -> vergleiche y und x (die rechten 24 Bits)
25 var uint32 x_ = cl_ffloat_value(x);
26 var uint32 y_ = cl_ffloat_value(y);
29 { if ((sint32)x_ >= 0)
31 { if (x_ < y_) return signean_minus; // x<y
32 if (x_ > y_) return signean_plus; // x>y
37 { return signean_minus; } // x<y
40 { if ((sint32)x_ >= 0)
42 { return signean_plus; } // x>y
45 { if (x_ > y_) return signean_minus; // |x|>|y| -> x<y
46 if (x_ < y_) return signean_plus; // |x|<|y| -> x>y