[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] [#166 elemnum.input] (new)
From: |
daly |
Subject: |
[Axiom-developer] [#166 elemnum.input] (new) |
Date: |
Sun, 12 Jun 2005 12:16:35 -0500 |
Changes http://page.axiom-developer.org/zope/mathaction/166ElemnumInput/diff
--
20050510 tpd src/interp/vmlisp.lisp define DFLOAT sec, csc, acsc, asec, csch
20050510 tpd src/interp/vmlisp.lisp define DFLOAT coth sech acsch acoth asech
The problem is that DFLOAT calls these lisp functions directly
but they have no definitions. I added the simple case definitions
that use the lisp versions. The proper fix would be to create
an "infinite float package" that could do arbitrary length
floating point computations. A less portable solution is to
use the hardware doublefloat, possibly thru gmp.
---------------------------------------------------------------------
in elemnum.input:
---------------------------------------------------------------------
x := 0.7::DoubleFloat ==> 0.69999999999999996
but should be 0.7
[exp log x] ==> [0.69999999999999996]
but should be [0.7]
x := 0.7::DoubleFloat
acsc x ==> ACSC is invalid as a function.
but should be Result is not real
x := 0.7::DoubleFloat
asec x ==> A is invalid as a function.
but should be Result is not real
x := 0.7::DoubleFloat
acoth x ==> ACOTH is invalid as a function.
but should be Result is not real
x := 1.1::DoubleFloat ==> 1.1000000000000001
but should be 1.1
[ tan atan x, cot acot x, csc acsc x, sec asec x ]
==> ACSC is invalid as a function
but should be [1.1,1.1,1.1,1.1]
[asin sin x, acos cos x, atan tan x, acot cot x, acsc csc x, asec sec x ]
==> CSC is invalid as a function
but should be [1.1,1.1,1.1,1.1,1.1,1.1]
[sinh asinh x,cosh acosh x, coth acoth x,csch acsch x ]
==> ACOTH is invalid as a function
but should be [1.1,1.1,1.1,1.1]
[asinh sinh x,acosh cosh x,atanh tanh x,acoth coth x,acsch csch x,asech sech x]
==> COTH is invalid as a function
but should be [1.1,1.1,1.1,1.1,1.1,1.1]
asech x ==> ASECH is invalid as a function.
but should be Result is not real
qtest(sa, sb, 1)
Compiling function qtest with type (DoubleFloat,DoubleFloat,
PositiveInteger) -> List Complex DoubleFloat
(28)
[1.1102230246251565E-16, 2.2204460492503131E-16 - 4.4408920985006262E-16%i,
1.1102230246251565E-16,
- 4.4408920985006262E-16 - 2.2204460492503131E-16%i,
4.4408920985006262E-16 + 2.2204460492503131E-16%i,
- 1.1102230246251565E-16,
- 2.2204460492503131E-16 - 2.2204460492503131E-16%i,
1.1102230246251565E-16,
- 2.2204460492503131E-16 - 2.2204460492503131E-16%i,
2.2204460492503131E-16 + 2.2204460492503131E-16%i,
3.3306690738754696E-16 - 2.2204460492503131E-16%i, 0.0,
- 6.6613381477509392E-16%i, - 1.1102230246251565E-16,
- 3.3306690738754696E-16 - 4.4408920985006262E-16%i,
3.3306690738754696E-16 - 2.2204460492503131E-16%i,
- 2.2204460492503131E-16,
- 3.3306690738754696E-16 - 4.4408920985006262E-16%i,
3.3306690738754696E-16 - 2.2204460492503131E-16%i,
- 5.5511151231257827E-16, - 2.2204460492503131E-16,
- 1.1102230246251565E-16, 1.1102230246251565E-16, 0.0,
- 1.1102230246251565E-16, - 1.1102230246251565E-16]
Type: List Complex DoubleFloat
but should be:
qtest(sa, sb, 1)
Compiling function qtest with type (DoubleFloat,DoubleFloat,
PositiveInteger) -> List Complex DoubleFloat
(35)
[1.11022302462516e-16, 1.11022302462516e-16 - 2.22044604925031e-16%i,
1.11022302462516e-16 - 2.22044604925031e-16%i, - 1.11022302462516e-16,
1.1102230246251565e-16, 1.1102230246251565e-16 + 2.2204460492503131e-16%i,
2.2204460492503131e-16%i, 1.11022302462516e-16,
1.11022302462516e-16 - 2.22044604925031e-16%i,
1.11022302462516e-16 - 2.22044604925031e-16%i, 3.3306690738754696e-16,
3.3306690738754696e-16 - 2.2204460492503131e-16%i,
1.1102230246251565e-16 - 2.2204460492503131e-16%i, - 1.11022302462516e-16,
0.0, 1.11022302462516e-16, 1.11022302462516e-16, 0.0,
1.1102230246251565e-16 - 2.2204460492503131e-16%i,
- 5.5511151231257827e-16, 1.11022302462516e-16, - 1.11022302462516e-16,
0.0, 2.2204460492503131e-16 + 2.2204460492503131e-16%i,
3.3306690738754696e-16,
- 2.2204460492503131e-16 + 2.2204460492503131e-16%i]
Type: List Complex DoubleFloat
qerr % ==> 1.1899284087167906E-31
but should be 5.6889007588053731e-32
qtest(sa, sb, 2)
(32)
[- 1.1102230246251565E-16,
- 2.2204460492503131E-16 - 4.4408920985006262E-16%i,
- 3.3306690738754696E-16,
4.4408920985006262E-16 - 2.2204460492503131E-16%i,
- 4.4408920985006262E-16 + 2.2204460492503131E-16%i,
- 1.1102230246251565E-16 - 2.2204460492503131E-16%i,
3.3306690738754696E-16 - 2.2204460492503131E-16%i,
- 1.1102230246251565E-16,
- 2.2204460492503131E-16 - 4.4408920985006262E-16%i,
- 2.2204460492503131E-16 + 2.2204460492503131E-16%i,
2.2204460492503131E-16 - 2.2204460492503131E-16%i,
- 1.1102230246251565E-16 - 2.2204460492503131E-16%i,
2.2204460492503131E-16 - 2.2204460492503131E-16%i, 0.0,
3.3306690738754696E-16 - 4.4408920985006262E-16%i,
- 1.1102230246251565E-16, 2.2204460492503131E-16,
3.3306690738754696E-16 - 4.4408920985006262E-16%i,
- 1.1102230246251565E-16, 8.8817841970012523E-16, 2.2204460492503131E-16,
1.1102230246251565E-16, 3.3306690738754696E-16,
- 1.1102230246251565E-16 + 2.2204460492503131E-16%i,
1.1102230246251565E-16, 2.2204460492503131E-16 - 2.2204460492503131E-16%i]
Type: List Complex DoubleFloat
but should be
qtest(sa, sb, 2)
(39)
[- 1.11022302462516e-16, - 1.11022302462516e-16 - 2.22044604925031e-16%i,
- 3.33066907387547e-16 - 2.22044604925031e-16%i, 1.11022302462516e-16,
- 1.1102230246251565e-16, - 2.2204460492503131e-16, 2.2204460492503131e-16,
- 1.11022302462516e-16, - 3.33066907387547e-16 - 2.22044604925031e-16%i,
- 1.11022302462516e-16 - 2.22044604925031e-16%i, - 3.3306690738754696e-16,
- 2.2204460492503131e-16,
- 1.1102230246251565e-16 - 2.2204460492503131e-16%i, 0.0, 0.0,
- 1.11022302462516e-16, - 1.11022302462516e-16, 0.0,
- 1.1102230246251565e-16 - 2.2204460492503131e-16%i,
8.8817841970012523e-16, - 1.11022302462516e-16, 1.11022302462516e-16, 0.0,
- 2.2204460492503131e-16 + 2.2204460492503131e-16%i,
- 3.3306690738754696e-16,
2.2204460492503131e-16 + 2.2204460492503131e-16%i]
Type: List Complex DoubleFloat
qerr % ==> 1.355854680848614E-31
but should be 7.7748310370340103e-32
qtest(sa, sb, 3)
(36)
[- 1.1102230246251565E-16, 0.0,
- 2.2204460492503131E-16 + 4.4408920985006262E-16%i,
- 2.2204460492503131E-16, 0.0, - 4.4408920985006262E-16,
- 1.1102230246251565E-16, - 1.1102230246251565E-16,
- 2.2204460492503131E-16 + 4.4408920985006262E-16%i,
- 2.2204460492503131E-16 - 2.2204460492503131E-16%i,
2.2204460492503131E-16 + 2.2204460492503131E-16%i,
- 1.1102230246251565E-16 + 2.2204460492503131E-16%i,
2.2204460492503131E-16 + 2.2204460492503131E-16%i, 0.0, 0.0,
- 3.3306690738754696E-16 + 2.2204460492503131E-16%i,
- 1.1102230246251565E-16, 0.0,
- 3.3306690738754696E-16 + 2.2204460492503131E-16%i,
8.8817841970012523E-16, 2.2204460492503131E-16, 1.1102230246251565E-16,
3.3306690738754696E-16,
- 1.1102230246251565E-16 - 2.2204460492503131E-16%i,
1.1102230246251565E-16, 2.2204460492503131E-16 + 2.2204460492503131E-16%i]
Type: List Complex DoubleFloat
but should be
qtest(sa, sb, 3)
(43)
[- 1.11022302462516e-16, - 1.11022302462516e-16 + 2.22044604925031e-16%i,
- 3.33066907387547e-16 + 2.22044604925031e-16%i, 1.11022302462516e-16,
- 1.1102230246251565e-16, - 2.2204460492503131e-16, 2.2204460492503131e-16,
- 1.11022302462516e-16, - 3.33066907387547e-16 + 2.22044604925031e-16%i,
- 1.11022302462516e-16 + 2.22044604925031e-16%i, - 3.3306690738754696e-16,
- 2.2204460492503131e-16,
- 1.1102230246251565e-16 + 2.2204460492503131e-16%i, 0.0, 0.0,
- 1.11022302462516e-16, - 1.11022302462516e-16, 0.0,
- 1.1102230246251565e-16 + 2.2204460492503131e-16%i,
8.8817841970012523e-16, - 1.11022302462516e-16, 1.11022302462516e-16, 0.0,
- 2.2204460492503131e-16 - 2.2204460492503131e-16%i,
- 3.3306690738754696e-16,
2.2204460492503131e-16 - 2.2204460492503131e-16%i]
Type: List Complex DoubleFloat
qerr % ==> 1.0002983834232781E-31
but should be 7.7748310370340103e-32
qtest(sa, sb, 4)
(40)
[1.1102230246251565E-16, 0.0,
3.3306690738754696E-16 + 4.4408920985006262E-16%i, 2.2204460492503131E-16,
0.0, 2.2204460492503131E-16 - 2.2204460492503131E-16%i,
2.2204460492503131E-16 + 2.2204460492503131E-16%i, 1.1102230246251565E-16,
- 2.2204460492503131E-16 + 2.2204460492503131E-16%i,
2.2204460492503131E-16 - 2.2204460492503131E-16%i,
3.3306690738754696E-16 + 2.2204460492503131E-16%i, 0.0,
6.6613381477509392E-16%i, - 1.1102230246251565E-16, 0.0,
1.1102230246251565E-16, 1.1102230246251565E-16, 0.0,
1.1102230246251565E-16, - 6.6613381477509392E-16, - 2.2204460492503131E-16,
- 1.1102230246251565E-16, 1.1102230246251565E-16, 0.0,
- 1.1102230246251565E-16, - 1.1102230246251565E-16]
Type: List Complex DoubleFloat
but should be
qtest(sa, sb, 4)
(47)
[1.11022302462516e-16, 1.11022302462516e-16 + 2.22044604925031e-16%i,
1.11022302462516e-16 + 2.22044604925031e-16%i, - 1.11022302462516e-16,
1.1102230246251565e-16, 1.1102230246251565e-16 - 2.2204460492503131e-16%i,
- 2.2204460492503131e-16%i, 1.11022302462516e-16,
1.11022302462516e-16 + 2.22044604925031e-16%i,
1.11022302462516e-16 + 2.22044604925031e-16%i, 3.3306690738754696e-16,
3.3306690738754696e-16 + 2.2204460492503131e-16%i,
1.1102230246251565e-16 + 2.2204460492503131e-16%i, - 1.11022302462516e-16,
0.0, 1.11022302462516e-16, 1.11022302462516e-16, 0.0,
1.1102230246251565e-16 + 2.2204460492503131e-16%i,
- 5.5511151231257827e-16, 1.11022302462516e-16, - 1.11022302462516e-16,
0.0, 2.2204460492503131e-16 - 2.2204460492503131e-16%i,
3.3306690738754696e-16,
- 2.2204460492503131e-16 - 2.2204460492503131e-16%i]
Type: List Complex DoubleFloat
qerr % ==> 7.5852010117404986E-32
but should be 5.6889007588053731e-32
x:=0.7::Float
csc x ==> 1.55227
the Float csc function comes from FLOAT
which comes from TrigonometricFunctionCategory (TRIGCAT)
(defun CSC (x) (/ 1 (sin x))) gives a value
x:=0.7::DoubleFloat
csc x ==> CSC is invalid as a function
x:=0.7::Float
acsch x ==> 1.15447
x:=0.7::DoubleFloat
acsch x ==> ACSCH is invalid as a function
x:=0.7::Float
coth x ==> 1.65462
x:=0.7::DoubleFloat
coth x ==> COTH is invalid as a function
x:=0.7::DoubleFloat
asec x ==> A is invalid as a function
x:=1.1::Float
acsc x ==> 1.14109
x:=1.1::DoubleFloat
acsc x ==> ACSC is invalid as a function
x:=1.1::Float
csc x ==> 1.100000
x:=1.1::DoubleFloat
csc x ==> CSC is invalid as a function
x:=1.1::Float
acoth x ==> 1.52226
x:=1.1::DoubleFloat
acoth x ==> ACOTH is invalid as a function
x:=1.1::Float
coth x ==> 1.24922
x:=1.1::DoubleFloat
coth x ==> COTH is invalid as a function
x:=1.1::Float
asech x ==> invalid argument to acosh
x:=1.1::DoubleFloat
asech x ==> ASECH is invalid as a function
--
forwarded from http://page.axiom-developer.org/zope/mathaction/address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Axiom-developer] [#166 elemnum.input] (new),
daly <=