1 // float_negative_epsilon().
16 #include "cl_LF_impl.h"
20 static inline const cl_LF LF_negative_epsilon (uintC len)
22 var Lfloat erg = allocate_lfloat(len,LF_exp_mid-intDsize*len,0);
23 var uintD* ptr = &TheLfloat(erg)->data[0];
24 #if CL_DS_BIG_ENDIAN_P
25 *ptr++ = bit(intDsize-1);
26 ptr = clear_loop_up(ptr,len-2);
30 ptr = clear_loop_up(ptr,len-2);
31 *ptr = bit(intDsize-1);
36 const cl_F float_negative_epsilon (float_format_t f)
38 // Bei Floats mit d Bits (incl. Hiddem Bit, also d = ?F_mant_len+1)
39 // ist ?F_negative_epsilon = 2^(-d-1)*(1+2^(1-d)),
40 // d.h. Mantisse 10...01, Vorzeichen +.
42 static const cl_SF SF_negative_epsilon =
43 make_SF(0,SF_exp_mid-SF_mant_len-1,bit(SF_mant_len)+1);
45 static const cl_FF FF_negative_epsilon =
46 encode_FF(0,-FF_mant_len-1,bit(FF_mant_len)+1);
48 static const cl_DF DF_negative_epsilon =
49 #if (cl_word_size==64)
50 encode_DF(0,-DF_mant_len-1,bit(DF_mant_len)+1);
52 encode_DF(0,-DF_mant_len-1,bit(DF_mant_len-32),1);
55 floatformatcase((uintC)f
56 , return SF_negative_epsilon;
57 , return FF_negative_epsilon;
58 , return DF_negative_epsilon;
59 , return LF_negative_epsilon(len);