This repository was archived by the owner on Apr 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +73
-2
lines changed Expand file tree Collapse file tree 1 file changed +73
-2
lines changed Original file line number Diff line number Diff line change 4646 if n > exp_max {
4747 x *= f_exp_max;
4848 n -= exp_max;
49- if n > exp_max {
49+
50+ if F :: BITS < 32 && n > exp_max {
51+ x *= f_exp_max;
52+ n -= exp_max;
53+
54+ if n > exp_max {
55+ x *= f_exp_max;
56+ n -= exp_max;
57+ if n > exp_max {
58+ x *= f_exp_max;
59+ n -= exp_max;
60+ if n > exp_max {
61+ x *= f_exp_max;
62+ n -= exp_max;
63+ if n > exp_max {
64+ n = exp_max;
65+ }
66+ }
67+ }
68+ }
69+ } else if n > exp_max {
5070 n = exp_max;
5171 }
5272 }
5979 if n < exp_min {
6080 x *= mul;
6181 n += add;
62- if n < exp_min {
82+ if F :: BITS < 32 {
83+ if n < exp_min {
84+ x *= mul;
85+ n += add;
86+
87+ if n < exp_min {
88+ x *= mul;
89+ n += add;
90+
91+ if n < exp_min {
92+ x *= mul;
93+ n += add;
94+
95+ if n < exp_min {
96+ x *= mul;
97+ n += add;
98+
99+ if n < exp_min {
100+ x *= mul;
101+ n += add;
102+
103+ if n < exp_min {
104+ x *= mul;
105+ n += add;
106+
107+ if n < exp_min {
108+ x *= mul;
109+ n += add;
110+
111+ if n < exp_min {
112+ n = exp_min;
113+ }
114+ }
115+ }
116+ }
117+ }
118+ }
119+ }
120+ }
121+ } else if n < exp_min {
63122 n = exp_min;
64123 }
65124 }
@@ -111,6 +170,12 @@ mod tests {
111170 assert ! ( scalbn( -F :: NAN , -10 ) . is_nan( ) ) ;
112171 }
113172
173+ #[ test]
174+ #[ cfg( f16_enabled) ]
175+ fn spec_test_f16 ( ) {
176+ spec_test :: < f16 > ( ) ;
177+ }
178+
114179 #[ test]
115180 fn spec_test_f32 ( ) {
116181 spec_test :: < f32 > ( ) ;
@@ -120,4 +185,10 @@ mod tests {
120185 fn spec_test_f64 ( ) {
121186 spec_test :: < f64 > ( ) ;
122187 }
188+
189+ #[ test]
190+ #[ cfg( f128_enabled) ]
191+ fn spec_test_f128 ( ) {
192+ spec_test :: < f128 > ( ) ;
193+ }
123194}
You can’t perform that action at this time.
0 commit comments