Commit 71efd39f authored by John van Groningen's avatar John van Groningen

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

parent 4c8e1531
......@@ -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
......@@ -57,3 +57,10 @@ instance atanh Real // Arc Hyperbolic Tangent, partial function, only defined i
// Additional conversion:
entier :: !Real -> Int // Convert Real into Int by taking entier
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