diff --git a/src/main/java/com/vectron/fcl/types/Num.java b/src/main/java/com/vectron/fcl/types/Num.java index 20a70c8..f393bf7 100644 --- a/src/main/java/com/vectron/fcl/types/Num.java +++ b/src/main/java/com/vectron/fcl/types/Num.java @@ -269,4 +269,10 @@ public class Num implements Obj, LogicOperand, ArithmeticOperand { ? Double.compare(doubleValue(), ((Num) other).doubleValue()) : -1; } + + public boolean isReal() { + if (value instanceof Double) + return !((Double) value).isNaN() && !((Double) value).isInfinite(); + return true; + } }