-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAlgebraicNum.java
More file actions
59 lines (50 loc) · 1.6 KB
/
AlgebraicNum.java
File metadata and controls
59 lines (50 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/**
* This file was automatically generated from AlgebraicNum.cs
* w/ further modifications by:
* @author Christoph M. Wintersteiger (cwinter)
**/
package com.microsoft.z3;
/**
* Algebraic numbers
**/
public class AlgebraicNum extends ArithExpr
{
/**
* Return a upper bound for a given real algebraic number. The interval
* isolating the number is smaller than 1/10^<paramref name="precision"/>.
* <seealso cref="Expr.IsAlgebraicNumber"/> <param name="precision">the
* precision of the result</param>
*
* @return A numeral Expr of sort Real
**/
public RatNum toUpper(int precision) throws Z3Exception
{
return new RatNum(getContext(), Native.getAlgebraicNumberUpper(getContext()
.nCtx(), getNativeObject(), precision));
}
/**
* Return a lower bound for the given real algebraic number. The interval
* isolating the number is smaller than 1/10^<paramref name="precision"/>.
* <seealso cref="Expr.IsAlgebraicNumber"/> <param name="precision"></param>
*
* @return A numeral Expr of sort Real
**/
public RatNum toLower(int precision) throws Z3Exception
{
return new RatNum(getContext(), Native.getAlgebraicNumberLower(getContext()
.nCtx(), getNativeObject(), precision));
}
/**
* Returns a string representation in decimal notation. <remarks>The result
* has at most <paramref name="precision"/> decimal places.</remarks>
**/
public String toDecimal(int precision) throws Z3Exception
{
return Native.getNumeralDecimalString(getContext().nCtx(), getNativeObject(),
precision);
}
AlgebraicNum(Context ctx, long obj) throws Z3Exception
{
super(ctx, obj);
}
}