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