Skip to content

Commit 884c5e3

Browse files
oscardssmithoscarddssmith
andauthored
bump slop for twiceprecision division (#59140)
division (unlike the other intrinsics) can have table-maker dilema problems since the true result has infinite bits. Bumping the slop for it by 1 reduces failures from 80 in 10^10 to <1 in 10^11. I think accepting an extra bit of inaccuracy is reasonable here (the alternative would be to make the division do an extra loop and do some extra extended precision, which seems unlikely to be worth it. fixes #23497 Co-authored-by: oscarddssmith <[email protected]>
1 parent 0d4cdfc commit 884c5e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/ranges.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ end
230230
@test cmp_sn2(Tw(xw+yw), astuple(x+y)..., slopbits)
231231
@test cmp_sn2(Tw(xw-yw), astuple(x-y)..., slopbits)
232232
@test cmp_sn2(Tw(xw*yw), astuple(x*y)..., slopbits)
233-
@test cmp_sn2(Tw(xw/yw), astuple(x/y)..., slopbits)
233+
@test cmp_sn2(Tw(xw/yw), astuple(x/y)..., slopbits+1) # extra bit because division is hard
234234
y = rand(T)
235235
yw = widen(widen(y))
236236
@test cmp_sn2(Tw(xw+yw), astuple(x+y)..., slopbits)

0 commit comments

Comments
 (0)