diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/test/lux/math/number/frac.lux | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/stdlib/source/test/lux/math/number/frac.lux b/stdlib/source/test/lux/math/number/frac.lux index 88862c47f..9c97d2835 100644 --- a/stdlib/source/test/lux/math/number/frac.lux +++ b/stdlib/source/test/lux/math/number/frac.lux @@ -26,11 +26,11 @@ ["r" rev] ["[0]" i64]]]]) -(def: random +(def random (Random Frac) (at random.monad each (|>> (i.% +1,000,000) i.frac) random.int)) -(def: constant +(def constant Test (do random.monad [sample random.safe_frac] @@ -50,7 +50,7 @@ (/.not_a_number? sample))))) ))) -(def: predicate +(def predicate Test (do [! random.monad] [sample ..random @@ -75,7 +75,7 @@ (/.number? sample))) ))) -(def: conversion +(def conversion Test (all _.and (do [! random.monad] @@ -93,7 +93,7 @@ (|> expected r.frac /.rev (r.= expected)))) )) -(def: signature +(def signature Test (`` (all _.and (_.for [/.equivalence /.=] @@ -128,15 +128,15 @@ @.jvm (these <jvm>) (these))) -(def: margin_of_error +(def margin_of_error +0.0000001) -(def: (trigonometric_symmetry forward backward angle) +(def (trigonometric_symmetry forward backward angle) (-> (-> Frac Frac) (-> Frac Frac) Frac Bit) (let [normal (|> angle forward backward)] (|> normal forward backward (/.approximately? ..margin_of_error normal)))) -(def: test|math +(def test|math Test (all _.and (do [! random.monad] @@ -270,7 +270,7 @@ (|> (/.factorial of) (n.% of) (n.= 0))))) )) -(def: .public test +(def .public test Test (<| (_.covering /._) (_.for [.Frac]) |