diff --git a/prism/src/param/BigRational.java b/prism/src/param/BigRational.java index fcd397c6..8e484e20 100644 --- a/prism/src/param/BigRational.java +++ b/prism/src/param/BigRational.java @@ -774,6 +774,18 @@ public final class BigRational implements Comparable return !isNaN() && !isInf() && !isMInf(); } + /** + * Returns true iff this object represents an integer, i.e., + * is not not-a-number, positive, or negative infinity and + * the denominator is 1. + * + * @return true iff this object represents an integer + */ + public boolean isInteger() + { + return isRational() && getDen().equals(ONE); + } + /** * Returns true iff this value represents a special number. * This is the case if this is either not-a-number, positive or