diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-04-01 16:55:24 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-04-01 16:55:24 -0400 |
| commit | 6de2d68a700a137bbe55668e036c62280ece8bb5 (patch) | |
| tree | eb1e3cee37cd9b2f1458b9ceff0141bfbd7a91a9 /test/integers.tm | |
| parent | a32c3747568562251d6c390faf325bf3ed3946e6 (diff) | |
Moved RNG out of the compiler and into a standalone library
Diffstat (limited to 'test/integers.tm')
| -rw-r--r-- | test/integers.tm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/integers.tm b/test/integers.tm index c8fd5c9b..04256c88 100644 --- a/test/integers.tm +++ b/test/integers.tm @@ -85,12 +85,12 @@ func main(): = 10000000000000000000000 do: - for in 20: - >> n := random:int(-999999, 999999) - >> d := random:int(-999, 999) - !! n=$n, d=$d: - >> (n/d)*d + (n mod d) == n - = yes + interesting_numerators := [-999999, -100, -23, -1, 0, 1, 23, 100, 999999] + interesting_denominators := [-99, -20, -17, -1, 1, 17, 20, 99] + for n in interesting_numerators: + for d in interesting_denominators: + >> (n/d)*d + (n mod d) == n + = yes >> 0:next_prime() = 2 |
