File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 216
216
T = rawtype (N)
217
217
float_err = zero (Tf)
218
218
for i = typemin (T): typemax (T)
219
- f_expected = Tf (i / BigFloat (FixedPointNumbers. rawone (N)))
219
+ b_expected = i / BigFloat (FixedPointNumbers. rawone (N))
220
+ f_expected = Tf (promote_type (Tf, Float32)(b_expected)) # workaround for issue #246
220
221
isinf (f_expected) && break # for Float16(::Normed{UInt16,1})
221
222
f_actual = Tf (reinterpret (N, i))
222
223
float_err += abs (f_actual - f_expected)
227
228
T = rawtype (N)
228
229
error_count = 0
229
230
for i in vcat (T (0x00 ): T (0xFF ), (typemax (T)- 0xFF ): typemax (T))
230
- f_expected = Tf (i / BigFloat (FixedPointNumbers. rawone (N)))
231
+ b_expected = i / BigFloat (FixedPointNumbers. rawone (N))
232
+ f_expected = Tf (promote_type (Tf, Float32)(b_expected)) # workaround for issue #246
231
233
isinf (f_expected) && break # for Float16() and Float32()
232
234
f_actual = Tf (reinterpret (N, i))
233
235
f_actual == f_expected && continue
You can’t perform that action at this time.
0 commit comments