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 217
217
T = rawtype (N)
218
218
float_err = 0.0
219
219
for i = typemin (T): typemax (T)
220
- f_expected = Tf (i / BigFloat (FixedPointNumbers. rawone (N)))
220
+ b_expected = i / BigFloat (FixedPointNumbers. rawone (N))
221
+ f_expected = Tf (promote_type (Tf, Float32)(b_expected)) # workaround for issue #246
221
222
isinf (f_expected) && break # for Float16(::Normed{UInt16,1})
222
223
f_actual = Tf (reinterpret (N, i))
223
224
float_err += abs (f_actual - f_expected)
228
229
T = rawtype (N)
229
230
error_count = 0
230
231
for i in vcat (T (0x00 ): T (0xFF ), (typemax (T)- 0xFF ): typemax (T))
231
- f_expected = Tf (i / BigFloat (FixedPointNumbers. rawone (N)))
232
+ b_expected = i / BigFloat (FixedPointNumbers. rawone (N))
233
+ f_expected = Tf (promote_type (Tf, Float32)(b_expected)) # workaround for issue #246
232
234
isinf (f_expected) && break # for Float16() and Float32()
233
235
f_actual = Tf (reinterpret (N, i))
234
236
f_actual == f_expected && continue
You can’t perform that action at this time.
0 commit comments