|
identify - find a closed form for a decimal approximation of a number
|
|
Calling Sequence
|
|
identify(x,opts)
|
|
|
Parameters
|
|
|
x
|
-
|
a real or complex floating-point number or expression
|
|
opts
|
-
|
equations in the form of option=value, where option is one of all, BasisSizeAlg, BasisPolyConst, BasisProdConst, BasisSumConst, extension, LearnBasis, Rational, Algebraic, FuncRat, FuncAlg, PolyConst, FuncPoly, SumConst, FuncSum, ProdConst, and FuncProd.
|
|
|
|
|
|
Description
|
|
|
•
|
If the input is a floating-point constant x, for example, , the identify command searches for an exact expression for the number. In this case, it determines that this is the constant .
|
|
•
|
If the input is a complex floating-point constant, for example, , the identify command is applied to the real and imaginary parts separately. In this case, it determines that this is the constant .
|
|
•
|
The identify command applies the tests listed in the following section. If the input cannot be identified as an exact constant, then the numerical value x is returned. For the identify command to succeed, enough digits must be provided to approximate the number.
|
|
•
|
If the input is not a (complex) floating-point constant, then the identify command maps recursively over the input expression applying itself to each floating-point constant in the expression.
|
|
|
Applied Tests
|
|
|
|
The tests made are as follows.
|
|
2.
|
Test if x is algebraic of degree 6 (default) or less.
|
|
3.
|
Test if x is a function of a rational number e.g. .
|
|
4.
|
Test if x is a function of an algebraic number of degree 6 or less.
|
|
6.
|
(optional) Test if x is a function of the above form.
|
|
7.
|
Test if x is of the form where are known algebraic or transcendental constants.
|
|
8.
|
(optional) Test if x is a function of the above form.
|
|
10.
|
(optional) Test if x is a function of the above form.
|
|
|
|
Options
|
|
|
|
The remaining arguments to the identify command are treated as options. They are equations of the form option=value. The following options are supported.
|
|
|
The option all=true specifies trying all tests, including the optional ones. The option all=false specifies only the tests that are explicitly asked for, as specified below.
|
|
|
The option BasisSizeAlg=n specifies when testing whether x is an algebraic number, to search up to degree (default is 6).
|
|
|
The option BasisSizePoly=n specifies the value of to use in test 5.
|
|
|
The option BasisSizeSum=n specifies the value of to use in test 7 (default 3).
|
|
|
The option BasisSizeProd=n specifies the value of to use in test 9 (default 3).
|
|
|
The option extension=B specifies adding the elements of , a list of real constants, to the bases , when making tests 5, 7, and 9.
|
|
|
The option LearnBasis=true specifies the use of non-rational constants found in tests 1-4 when making tests 5-10. The default for this option is false.
|
|
|
Rational, Algebraic, FuncRat, FuncAlg, PolyConst, SumConst, and ProdConst
|
|
|
The options Rational=false, Algebraic=false, FuncRat=false, FuncAlg=false, PolyConst=false, SumConst=false, and ProdConst=false specify not to perform tests 1, 2, 3, 4, 5, 7, and 9 respectively.
|
|
|
FuncPoly, FuncSum, and FuncProd
|
|
|
The options FuncPoly=true, FuncSum=true, FuncProd=true specify the performance of tests 6, 8 and 10 respectively.
|
|
|
|
|
Examples
|
|
|
>
|
|
|
| (1) |
|
>
|
|
|
| (2) |
|
>
|
|
|
| (3) |
|
>
|
|
|
| (4) |
|
>
|
|
|
| (5) |
|
>
|
|
|
| (6) |
|
>
|
|
|
| (7) |
|
>
|
|
|
| (8) |
|
>
|
|
|
| (9) |
|
>
|
|
|
| (10) |
|
>
|
|
|
| (11) |
|
>
|
|
|
| (12) |
|
>
|
|
|
| (13) |
|
>
|
|
|
| (14) |
|
>
|
|
|
| (15) |
|
|