Oberon || Library || Module Index || Search Engine || Definition || Module
VAR plusInfinity: REAL; VAR minusInfinity: REAL; VAR nan: REAL; VAR snan: REAL;
PROCEDURE Normalized(real: LONGREAL) : BOOLEAN; PROCEDURE Valid(real: LONGREAL) : BOOLEAN; PROCEDURE NotANumber(real: LONGREAL) : BOOLEAN;
Following variables contain special formats:
plusInfinity plus infinity minusInfinity minus infinity nan not-a-number (undefined value) snan signaling not-a-numberThe formats of not-a-numbers are not unique, thus NotANumber (see below) is needed to check a real value for being not-a-number. Signaling not-a-numbers are not generated by floating point operations. Operations with signaling not-a-numbers cause an event (UnixSignals.FPE) if the associated floating point exception is enabled. All variables are of type REAL and can be assigned to LONGREAL without losing their special format.
Normalized returns TRUE for normalized floating point numbers. Valid returns TRUE for normalized and denormalized real values but FALSE for infinity and not-a-numbers. NotANumber returns TRUE if real is a not-a-number (either signaling or not).
Oberon || Library || Module Index || Search Engine || Definition || Module