Skip to content

Commit 9098d54

Browse files
committed
Compute the INTS strings
1 parent 0b23bea commit 9098d54

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

test/runtests.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ const keyvalues = Dict(
4747
# Floating point values written as integer strings. Useful for testing behaviours of
4848
# trunc, floor, and ceil.
4949
const INTS = Dict(
50-
1.22 => "12199999999999999733546474089962430298328399658203125",
51-
1.23 => "1229999999999999982236431605997495353221893310546875",
52-
1.51 => "15100000000000000088817841970012523233890533447265625",
53-
2.2 => "220000000000000017763568394002504646778106689453125",
54-
2.3 => "229999999999999982236431605997495353221893310546875"
50+
v => replace(@sprintf("%.200f", v), ".", "")
51+
for v in [
52+
1.22,
53+
1.23,
54+
1.51,
55+
2.2,
56+
2.3,
57+
]
5558
)
56-
for (k, v) in INTS
57-
INTS[k] = rpad(v, 201, "0")
58-
end
5959
const smaller_than_decimal = [1.22, 1.23, 2.3]
6060
const bigger_than_decimal = [1.51, 2.2]
6161

0 commit comments

Comments
 (0)