當前位置: 首頁>>代碼示例>>C#>>正文


C# Z3.FPExpr類代碼示例

本文整理匯總了C#中Microsoft.Z3.FPExpr的典型用法代碼示例。如果您正苦於以下問題:C# FPExpr類的具體用法?C# FPExpr怎麽用?C# FPExpr使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


FPExpr類屬於Microsoft.Z3命名空間,在下文中一共展示了FPExpr類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: MkFPToReal

 /// <summary>
 /// Conversion of a floating-point term into a real-numbered term.
 /// </summary>
 /// <remarks>
 /// Produces a term that represents the conversion of the floating-poiunt term t into a
 /// real number. Note that this type of conversion will often result in non-linear 
 /// constraints over real terms.
 /// </remarks>        
 /// <param name="t">FloatingPoint term</param>
 public RealExpr MkFPToReal(FPExpr t)
 {
     Contract.Ensures(Contract.Result<RealExpr>() != null);
     return new RealExpr(this, Native.Z3_mk_fpa_to_real(this.nCtx, t.NativeObject));
 }
開發者ID:hitmoon,項目名稱:z3,代碼行數:14,代碼來源:Context.cs

示例2: MkFPToFP

 /// <summary>
 /// Conversion of a floating-point number to another FloatingPoint sort s.
 /// </summary>
 /// <remarks>
 /// Produces a term that represents the conversion of a floating-point term t to a different
 /// FloatingPoint sort s. If necessary, rounding according to rm is applied. 
 /// </remarks>
 /// <param name="s">FloatingPoint sort</param>
 /// <param name="rm">floating-point rounding mode term</param>
 /// <param name="t">floating-point term</param>
 public FPExpr MkFPToFP(FPSort s, FPRMExpr rm, FPExpr t)
 {
     Contract.Ensures(Contract.Result<FPExpr>() != null);
     return new FPExpr(this, Native.Z3_mk_fpa_to_fp_float(this.nCtx, s.NativeObject, rm.NativeObject, t.NativeObject));
 }
開發者ID:hitmoon,項目名稱:z3,代碼行數:15,代碼來源:Context.cs

示例3: MkFPToIEEEBV

 /// <summary>
 /// Conversion of a floating-point term into a bit-vector term in IEEE 754-2008 format.
 /// </summary>
 /// <remarks>
 /// The size of the resulting bit-vector is automatically determined. Note that 
 /// IEEE 754-2008 allows multiple different representations of NaN. This conversion 
 /// knows only one NaN and it will always produce the same bit-vector represenatation of 
 /// that NaN. 
 /// </remarks>
 /// <param name="t">FloatingPoint term.</param>
 public BitVecExpr MkFPToIEEEBV(FPExpr t)
 {
     Contract.Ensures(Contract.Result<BitVecExpr>() != null);
     return new BitVecExpr(this, Native.Z3_mk_fpa_to_ieee_bv(this.nCtx, t.NativeObject));
 }
開發者ID:hitmoon,項目名稱:z3,代碼行數:15,代碼來源:Context.cs

示例4: MkFPSub

 /// <summary>
 /// Floating-point subtraction
 /// </summary>
 /// <param name="rm">rounding mode term</param>
 /// <param name="t1">floating-point term</param>
 /// <param name="t2">floating-point term</param>
 public FPExpr MkFPSub(FPRMExpr rm, FPExpr t1, FPExpr t2)
 {
     Contract.Ensures(Contract.Result<FPNum>() != null);
     return new FPExpr(this, Native.Z3_mk_fpa_sub(this.nCtx, rm.NativeObject, t1.NativeObject, t2.NativeObject));
 }
開發者ID:hitmoon,項目名稱:z3,代碼行數:11,代碼來源:Context.cs

示例5: MkFPToBV

 /// <summary>
 /// Conversion of a floating-point term into a bit-vector.
 /// </summary>
 /// <remarks>
 /// Produces a term that represents the conversion of the floating-poiunt term t into a
 /// bit-vector term of size sz in 2's complement format (signed when signed==true). If necessary, 
 /// the result will be rounded according to rounding mode rm.
 /// </remarks>        
 /// <param name="rm">RoundingMode term.</param>
 /// <param name="t">FloatingPoint term</param>
 /// <param name="sz">Size of the resulting bit-vector.</param>
 /// <param name="signed">Indicates whether the result is a signed or unsigned bit-vector.</param>
 public BitVecExpr MkFPToBV(FPRMExpr rm, FPExpr t, uint sz, bool signed)
 {
     Contract.Ensures(Contract.Result<BitVecExpr>() != null);
     if (signed)
         return new BitVecExpr(this, Native.Z3_mk_fpa_to_sbv(this.nCtx, rm.NativeObject, t.NativeObject, sz));
     else
         return new BitVecExpr(this, Native.Z3_mk_fpa_to_ubv(this.nCtx, rm.NativeObject, t.NativeObject, sz));
 }
開發者ID:hitmoon,項目名稱:z3,代碼行數:20,代碼來源:Context.cs

示例6: MkFPRoundToIntegral

 /// <summary>
 /// Floating-point roundToIntegral. Rounds a floating-point number to 
 /// the closest integer, again represented as a floating-point number.
 /// </summary>        
 /// <param name="rm">term of RoundingMode sort</param>
 /// <param name="t">floating-point term</param>
 public FPExpr MkFPRoundToIntegral(FPRMExpr rm, FPExpr t)
 {
     Contract.Ensures(Contract.Result<FPNum>() != null);
     return new FPExpr(this, Native.Z3_mk_fpa_round_to_integral(this.nCtx, rm.NativeObject, t.NativeObject));
 }
開發者ID:hitmoon,項目名稱:z3,代碼行數:11,代碼來源:Context.cs

示例7: MkFPNeg

 /// <summary>
 /// Floating-point negation
 /// </summary>
 /// <param name="t">floating-point term</param>
 public FPExpr MkFPNeg(FPExpr t)
 {
     Contract.Ensures(Contract.Result<FPNum>() != null);
     return new FPExpr(this, Native.Z3_mk_fpa_neg(this.nCtx, t.NativeObject));
 }
開發者ID:hitmoon,項目名稱:z3,代碼行數:9,代碼來源:Context.cs

示例8: MkFPLt

 /// <summary>
 /// Floating-point less than.
 /// </summary>        
 /// <param name="t1">floating-point term</param>
 /// <param name="t2">floating-point term</param>
 public BoolExpr MkFPLt(FPExpr t1, FPExpr t2)
 {
     Contract.Ensures(Contract.Result<BoolExpr>() != null);
     return new BoolExpr(this, Native.Z3_mk_fpa_lt(this.nCtx, t1.NativeObject, t2.NativeObject));
 }
開發者ID:hitmoon,項目名稱:z3,代碼行數:10,代碼來源:Context.cs

示例9: MkFPIsZero

 /// <summary>
 /// Predicate indicating whether t is a floating-point number with zero value, i.e., +0 or -0.
 /// </summary>        
 /// <param name="t">floating-point term</param>        
 public BoolExpr MkFPIsZero(FPExpr t)
 {
     Contract.Ensures(Contract.Result<BoolExpr>() != null);
     return new BoolExpr(this, Native.Z3_mk_fpa_is_zero(this.nCtx, t.NativeObject));
 }
開發者ID:hitmoon,項目名稱:z3,代碼行數:9,代碼來源:Context.cs

示例10: ToFPExprArray

 /// <summary>
 /// Translates an ASTVector into a FPExpr[]
 /// </summary>    
 public FPExpr[] ToFPExprArray()
 {
     uint n = Size;
     FPExpr[] res = new FPExpr[n];
     for (uint i = 0; i < n; i++)
         res[i] = (FPExpr)Expr.Create(this.Context, this[i].NativeObject);
     return res;
 }
開發者ID:perillaseed,項目名稱:z3,代碼行數:11,代碼來源:ASTVector.cs


注:本文中的Microsoft.Z3.FPExpr類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。