From 6de2d68a700a137bbe55668e036c62280ece8bb5 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 1 Apr 2025 16:55:24 -0400 Subject: Moved RNG out of the compiler and into a standalone library --- test/integers.tm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test/integers.tm') 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 -- cgit v1.2.3