mirror of
				https://github.com/Z3Prover/z3
				synced 2025-10-31 11:42:28 +00:00 
			
		
		
		
	Added FPA numeral predicates to Java API
This commit is contained in:
		
							parent
							
								
									c573a7446b
								
							
						
					
					
						commit
						935c523ef8
					
				
					 1 changed files with 62 additions and 2 deletions
				
			
		|  | @ -106,6 +106,67 @@ public class FPNum extends FPExpr | |||
|         return new BitVecExpr(getContext(), Native.fpaGetNumeralExponentBv(getContext().nCtx(), getNativeObject(), biased)); | ||||
|     } | ||||
| 
 | ||||
|      | ||||
|     /** | ||||
|      * Indicates whether the numeral is a NaN. | ||||
|      * @throws Z3Exception on error | ||||
|      * @return a boolean | ||||
|      **/ | ||||
|     public boolean isNaN() | ||||
|     { | ||||
|         return Native.fpaIsNumeralNan(getContext().nCtx(), getNativeObject()); | ||||
|     }     | ||||
| 
 | ||||
|     /** | ||||
|      * Indicates whether the numeral is a +oo or -oo. | ||||
|      * @throws Z3Exception on error | ||||
|      * @return a boolean | ||||
|      **/ | ||||
|     public boolean isInf() | ||||
|     { | ||||
|         return Native.fpaIsNumeralInf(getContext().nCtx(), getNativeObject()); | ||||
|     } | ||||
|      | ||||
|     /** | ||||
|      * Indicates whether the numeral is +zero or -zero. | ||||
|      * @throws Z3Exception on error | ||||
|      * @return a boolean | ||||
|      **/ | ||||
|     public boolean isZero() | ||||
|     { | ||||
|         return Native.fpaIsNumeralZero(getContext().nCtx(), getNativeObject()); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * Indicates whether the numeral is normal. | ||||
|      * @throws Z3Exception on error | ||||
|      * @return a boolean | ||||
|      **/ | ||||
|     public boolean isNormal() | ||||
|     { | ||||
|         return Native.fpaIsNumeralNormal(getContext().nCtx(), getNativeObject()); | ||||
|     } | ||||
|      | ||||
|     /** | ||||
|      * Indicates whether the numeral is subnormal. | ||||
|      * @throws Z3Exception on error | ||||
|      * @return a boolean | ||||
|      **/ | ||||
|     public boolean isSubnormal() | ||||
|     { | ||||
|         return Native.fpaIsNumeralSubnormal(getContext().nCtx(), getNativeObject()); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * Indicates whether the numeral is positive. | ||||
|      * @throws Z3Exception on error | ||||
|      * @return a boolean | ||||
|      **/ | ||||
|     public boolean isPositive() | ||||
|     { | ||||
|         return Native.fpaIsNumeralPositive(getContext().nCtx(), getNativeObject()); | ||||
|     } | ||||
|      | ||||
|     public FPNum(Context ctx, long obj) | ||||
|     { | ||||
|         super(ctx, obj); | ||||
|  | @ -118,5 +179,4 @@ public class FPNum extends FPExpr | |||
|     { | ||||
|         return Native.getNumeralString(getContext().nCtx(), getNativeObject()); | ||||
|     }     | ||||
| 
 | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue