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 227
227
T = rawtype (N)
228
228
float_err = zero (Tf)
229
229
for i = typemin (T): typemax (T)
230
- f_expected = Tf (i / BigFloat (FixedPointNumbers. rawone (N)))
230
+ b_expected = i / BigFloat (FixedPointNumbers. rawone (N))
231
+ f_expected = Tf (promote_type (Tf, Float32)(b_expected)) # workaround for issue #246
231
232
isinf (f_expected) && break # for Float16(::Normed{UInt16,1})
232
233
f_actual = Tf (reinterpret (N, i))
233
234
float_err += abs (f_actual - f_expected)
238
239
T = rawtype (N)
239
240
error_count = 0
240
241
for i in vcat (T (0x00 ): T (0xFF ), (typemax (T)- 0xFF ): typemax (T))
241
- f_expected = Tf (i / BigFloat (FixedPointNumbers. rawone (N)))
242
+ b_expected = i / BigFloat (FixedPointNumbers. rawone (N))
243
+ f_expected = Tf (promote_type (Tf, Float32)(b_expected)) # workaround for issue #246
242
244
isinf (f_expected) && break # for Float16() and Float32()
243
245
f_actual = Tf (reinterpret (N, i))
244
246
f_actual == f_expected && continue
You can’t perform that action at this time.
0 commit comments