fix rng not being inclusive

This commit is contained in:
2020-10-25 12:50:40 +01:00
parent 506a4e42a2
commit 1cfab8d21e
4 changed files with 55 additions and 37 deletions
+6
View File
@@ -0,0 +1,6 @@
(
(ld r0 5)
(:next)
(rng r1 0 1 (z? (lds @cout "(1€)\n")) (else? (lds @cout "(::)\n")))
(dec r0 (nz? (j :next)))
)
+8
View File
@@ -0,0 +1,8 @@
(
(:loop)
(frng r0 0.0 1.0)
(fcmp r0 1.0
(lt? (j :loop))
(eq? (lds @cout "OK"))
(gt? (lds @cout "OVER!")))
)