示例#1
0
 public static BoolToken zero(BitVector term, TermContext context) {
   return BoolToken.of(term.isZero());
 }
 public static BoolToken sign(FloatToken term, TermContext context) {
   return BoolToken.of(term.bigFloatValue().sign());
 }
 public static BoolToken isNaN(FloatToken term, TermContext context) {
   return BoolToken.of(term.bigFloatValue().isNaN());
 }
 public static BoolToken le(FloatToken term1, FloatToken term2, TermContext context) {
   return BoolToken.of(term1.bigFloatValue().lessThanOrEqualTo(term2.bigFloatValue()));
 }
 public static BoolToken gt(FloatToken term1, FloatToken term2, TermContext context) {
   return BoolToken.of(term1.bigFloatValue().greaterThan(term2.bigFloatValue()));
 }
 /**
  * Floating point equality. Uses {@link BigFloat#equalTo(BigFloat)} and not {@link
  * BigFloat#equals(Object)} in order to preserve the behavior that -0.0 ==Float 0.0 and NaN
  * =/=Float NaN. ==K can be used to compare identity on floating point numbers.
  */
 public static BoolToken eq(FloatToken term1, FloatToken term2, TermContext context) {
   return BoolToken.of(term1.bigFloatValue().equalTo(term2.bigFloatValue()));
 }