mirror of
				https://github.com/Z3Prover/z3
				synced 2025-10-31 11:42:28 +00:00 
			
		
		
		
	Added accessors to extract sign/exponent/significand BV numerals from FP numerals.
This commit is contained in:
		
							parent
							
								
									5716eaafed
								
							
						
					
					
						commit
						6b474adc8a
					
				
					 7 changed files with 246 additions and 5 deletions
				
			
		|  | @ -21,6 +21,33 @@ package com.microsoft.z3; | |||
|  */ | ||||
| public class FPNum extends FPExpr | ||||
| { | ||||
|     /** | ||||
|      * The sign of a floating-point numeral as a bit-vector expression | ||||
|      * Remarks: NaN's do not have a bit-vector sign, so they are invalid arguments. | ||||
|      * @throws Z3Exception  | ||||
|      */ | ||||
|     public BitVecExpr getBVSign() { | ||||
|         return new BitVecExpr(getContext(), Native.fpaGetNumeralSignBv(getContext().nCtx(), getNativeObject())); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * The exponent of a floating-point numeral as a bit-vector expression | ||||
|      * Remarks:  +oo, -oo, and NaN's do not have a bit-vector exponent, so they are invalid arguments. | ||||
|      * @throws Z3Exception  | ||||
|      */ | ||||
|     public BitVecExpr getBVExponent() { | ||||
|         return new BitVecExpr(getContext(), Native.fpaGetNumeralExponentBv(getContext().nCtx(), getNativeObject())); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * The significand of a floating-point numeral as a bit-vector expression | ||||
|      * Remarks: +oo, -oo, and NaN's do not have a bit-vector significand, so they are invalid arguments. | ||||
|      * @throws Z3Exception  | ||||
|      */ | ||||
|     public BitVecExpr getBVSignificand() { | ||||
|         return new BitVecExpr(getContext(), Native.fpaGetNumeralSignificandBv(getContext().nCtx(), getNativeObject())); | ||||
|     } | ||||
|      | ||||
|     /** | ||||
|      * Retrieves the sign of a floating-point literal      | ||||
|      * Remarks: returns true if the numeral is negative  | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue