7 #include "cln/dfloat.h"
19 const cl_DF operator- (const cl_DF& x1, const cl_DF& x2)
22 // (- x1 x2) = (+ x1 (- x2))
24 double_to_DF(DF_to_double(x1) - DF_to_double(x2), return ,
25 TRUE, TRUE, // Overflow und subnormale Zahl abfangen
26 FALSE, // kein Underflow mit Ergebnis +/- 0.0 möglich
27 // (nach Definition der subnormalen Zahlen)
28 FALSE, FALSE // keine Singularität, kein NaN als Ergebnis möglich
31 #if (cl_word_size==64)
32 var dfloat x2_ = TheDfloat(x2)->dfloat_value;
33 if (DF_uexp(x2_) == 0)
36 { return x1 + allocate_dfloat(x2_ ^ bit(63)); }
38 var uint32 x2_semhi = TheDfloat(x2)->dfloat_value.semhi;
39 var uint32 x2_mlo = TheDfloat(x2)->dfloat_value.mlo;
40 if (DF_uexp(x2_semhi) == 0)
43 { return x1 + allocate_dfloat(x2_semhi ^ bit(31), x2_mlo); }