Commit 1f9f21de authored by Mart Lubbers's avatar Mart Lubbers

Add epsilon to StdReal.dcl

Useful for comparing Real's.
https://en.wikipedia.org/wiki/Machine_epsilon
parent dceae337
......@@ -71,6 +71,7 @@ entier :: !Real -> Int :== code { entierR }
Infinity :== 1E9999
NaN :== 1E9999+(-1E9999)
Epsilon :== 2.22E-16
isNaN x :== if (x==x) False True
isInfinity x :== if (abs x==1E9999) True False
......
......@@ -71,6 +71,7 @@ entier :: !Real -> Int :== code { entierR }
Infinity :== 1E9999
NaN :== 1E9999+(-1E9999)
Epsilon :== 2.22E-16
isNaN x :== if (x==x) False True
isInfinity x :== if (abs x==1E9999) True False
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment