1 // least_negative_float().
6 CL_PROVIDE(cl_F_leastneg)
18 #include "cl_LF_impl.h"
20 // Exponent so klein wie möglich, Mantisse 10...0, Vorzeichen -.
22 static const cl_SF least_negative_SF =
23 make_SF(-1,SF_exp_low,bit(SF_mant_len));
25 static const cl_FF least_negative_FF =
26 encode_FF(-1,FF_exp_low-FF_exp_mid,bit(FF_mant_len));
28 static const cl_DF least_negative_DF =
29 #if (cl_word_size==64)
30 encode_DF(-1,DF_exp_low-DF_exp_mid,bit(DF_mant_len));
32 encode_DF(-1,DF_exp_low-DF_exp_mid,bit(DF_mant_len-32),0);
35 inline const cl_LF least_negative_LF (uintC len)
37 var Lfloat erg = allocate_lfloat(len,LF_exp_low,-1);
38 #if CL_DS_BIG_ENDIAN_P
39 TheLfloat(erg)->data[0] = bit(intDsize-1);
40 clear_loop_up(&TheLfloat(erg)->data[1],len-1);
42 var uintD* ptr = clear_loop_up(&TheLfloat(erg)->data[0],len-1);
43 *ptr = bit(intDsize-1);
48 const cl_F least_negative_float (cl_float_format_t f)
50 floatformatcase((uintL)f
51 , return least_negative_SF;
52 , return least_negative_FF;
53 , return least_negative_DF;
54 , return least_negative_LF(len);
58 CL_PROVIDE_END(cl_F_leastneg)