4 #include "base/cl_sysdep.h"
7 #include "cln/dfloat.h"
12 #include "float/dfloat/cl_DF.h"
17 const cl_DF operator- (const cl_DF& x1, const cl_DF& x2)
20 // (- x1 x2) = (+ x1 (- x2))
22 double_to_DF(DF_to_double(x1) - DF_to_double(x2), return ,
23 TRUE, TRUE, // Overflow und subnormale Zahl abfangen
24 FALSE, // kein Underflow mit Ergebnis +/- 0.0 möglich
25 // (nach Definition der subnormalen Zahlen)
26 FALSE, FALSE // keine Singularität, kein NaN als Ergebnis möglich
29 #if (cl_word_size==64)
30 var dfloat x2_ = TheDfloat(x2)->dfloat_value;
31 if (DF_uexp(x2_) == 0)
34 { return x1 + allocate_dfloat(x2_ ^ bit(63)); }
36 var uint32 x2_semhi = TheDfloat(x2)->dfloat_value.semhi;
37 var uint32 x2_mlo = TheDfloat(x2)->dfloat_value.mlo;
38 if (DF_uexp(x2_semhi) == 0)
41 { return x1 + allocate_dfloat(x2_semhi ^ bit(31), x2_mlo); }