Commit 58627404 authored by John van Groningen's avatar John van Groningen Committed by Camil Staps

add macros for Infinity, NaN, isNaN, isInfinity and isFinite

parent 139c98e0
......@@ -325,3 +325,10 @@ entier a
= code inline {
entierR
}
Infinity :== 1E9999
NaN :== 1E9999+(-1E9999)
isNaN x :== if (x==x) False True
isInfinity x :== if (abs x==1E9999) True False
isFinite x :== if (x-x==0.0) True False
......@@ -67,3 +67,10 @@ instance atanh Real // Arc Hyperbolic Tangent, partial function, only defined i
* @result The largest integer smaller than the parameter
*/
entier :: !Real -> Int
Infinity :== 1E9999
NaN :== 1E9999+(-1E9999)
isNaN x :== if (x==x) False True
isInfinity x :== if (abs x==1E9999) True False
isFinite x :== if (x-x==0.0) True False
......@@ -325,3 +325,10 @@ entier a
= code inline {
entierR
}
Infinity :== 1E9999
NaN :== 1E9999+(-1E9999)
isNaN x :== if (x==x) False True
isInfinity x :== if (abs x==1E9999) True False
isFinite x :== if (x-x==0.0) 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