2 * The following tests assume the default value for fpprec; make sure
8 unit_in_last_place(0) ;
11 unit_in_last_place(-534234) ;
14 unit_in_last_place(2/3) ;
17 unit_in_last_place(0.0b0) ;
20 unit_in_last_place(0.0) - least_positive_float ;
23 unit_in_last_place(2*unit_in_last_place(0.0)) - least_positive_float ;
26 unit_in_last_place(unit_in_last_place(0.0)*(2^53+1)) - least_positive_float ;
29 unit_in_last_place(unit_in_last_place(0.0)*(2^53+2)) - 2*least_positive_float ;
32 2*unit_in_last_place(float((0+2^52)/2^1073)) - unit_in_last_place(float((1+2^52)/2^1073)) ;
35 unit_in_last_place(1.0)-unit_in_last_place(.9999) ;
38 unit_in_last_place(1.0001)-2*unit_in_last_place(1.0000) ;
41 unit_in_last_place(1.0b0)-unit_in_last_place(.9999b0) ;
44 unit_in_last_place(1.0001b0)-2*unit_in_last_place(1.0000b0) ;
47 2.0^1023*(2.0-unit_in_last_place(2.0)) - most_positive_float ;
50 unit_in_last_place(-1.0)-unit_in_last_place(1.0) ;
59 is_power_of_two(1048576) ;
62 is_power_of_two(1048575) ;
65 is_power_of_two(1048577) ;
68 is_power_of_two(1/256) ;
71 is_power_of_two(1/384) ;
74 is_power_of_two(0.0e0) ;
77 is_power_of_two(1.0e0) ;
80 is_power_of_two(1048576.0e0) ;
83 is_power_of_two(1048575.0e0) ;
86 is_power_of_two(1048577.0e0) ;
89 is_power_of_two(1/256.0e0) ;
92 is_power_of_two(0.0b0) ;
95 is_power_of_two(1.0b0) ;
98 is_power_of_two(1048576.0b0) ;
101 is_power_of_two(1048575.0b0) ;
104 is_power_of_two(1048577.0b0) ;
107 is_power_of_two(1/256.0b0) ;
119 decode_float(-0.25b0);
120 [1.0b0, - 2, - 1.0b0];
122 decode_float(least_positive_normalized_float);
125 decode_float(most_positive_float);
126 [1.9999999999999998, 1023, 1.0];
128 /* This assumes denormals are supported .*/
129 decode_float(least_positive_float);
132 integer_decode_float(3.0);
133 [6755399441055744, - 51, 1];
135 integer_decode_float(-0.25);
136 [4503599627370496, - 54, - 1];
138 integer_decode_float(3b0);
139 [54043195528445952, - 54, 1];
141 integer_decode_float(-0.25b0);
142 [36028797018963968, - 57, - 1];
144 integer_decode_float(least_positive_normalized_float);
145 [4503599627370496, - 1074, 1];
147 integer_decode_float(most_positive_float);
148 [9007199254740991, 971, 1];
150 /* This assumes denormals are supported .*/
151 integer_decode_float(least_positive_float);
157 scale_float(-1.0, 2);
160 scale_float(1.0, -5000);
164 * The second scale_float was determined from integer_decode_float to
165 * get the bits, and scaled by -53 to get the final result.
167 scale_float(most_positive_float, -1024) - scale_float(float(9007199254740991),-53);
173 scale_float(-1b0, 2);
176 scale_float(0.125b0, 3);