

last edited 13 years ago by japp 
1 2 3 4  
Editor: japp
Time: 2008/10/29 11:24:30 GMT7 

Note: 
added:
From japp Wed Oct 29 11:24:30 0700 2008
From: japp
Date: Wed, 29 Oct 2008 11:24:30 0700
Subject:
MessageID: <200810291124300700@axiomwiki.newsynthesis.org>
Status: open => fix proposed
In trigcat.spad.pamphlet:
asin x == atan(x/sqrt(1x**2))
asin(1.0)
(1) 
asin(complex(1.0,0.0))
(2) 
Transferred from savannah.
if $ has Field and $ has sqrt: $ > $ then  asin x == atan(x/sqrt(1x**2)) asin x == ASIN(COMPLEX(real x,imag x)$Lisp)$Lisp
but the form of x when complex in axiom is not that of lisp, i.e. asin gets passed a nonnumber:
>> System error: ((1 . 0) 0 . 0) is not of type NUMBER.
In general, I think it a good idea to avoid having to duplicate the functionality of the standard lisp functions in axiom, but there may be some philosophical reason for doing this due to the domain structures or some such. If one needs the correct logic for a duplicate implementation, one can look at the gcl_numlib.lsp file in the lsp/ subdirectory.
No, here it is a Complex(Float), the implementation of float allow arbitrary precision, Common Lisp no. Morever, it'a generic implementation (in a category) OK, then what we want is something like:asin x ==  %i * log( %i * x + sqrt(1  x*x))
but this does not appear to be used when put into trigcat.spad.pamphlet and recompiling. Perhaps someone could explain?
Secondly, perhaps ist is of use to bring forward GMP/mpfr optimized multiprecision floating point in GCL for use by axiom here?
I understand the multiprecision argument, but is there a difference between a "generic imlementation" and the lisp one where the category of the domain coincides precisely with the lisp type?
Lastly, do we have to use this difficult interface as opposed to the developer email list?
take care,
take care
... Yes I think it's a good idea to add mpfr to gcl
argument
as described in bug #47 will persist if we fix it this way.
I think that a lot of care has to be taken if we use Lisp functions instead of "homegrown" ones.
Concerning the place of discussion, I too think that it would be better to:
Since any change on IssueTracker will notify axiomdeveloper, there is no danger of missing anything.
I think that the following definition would work:asin x == if x = 1 then pi()/2::$ else atan(x/sqrt(1x**2))
There is one thing that puzzles me, though. Also in TRANFUN
, the following definition is given for pi()
:
pi() == 2*asin(1)
which seems to be asking for trouble. However, I couldn't find a domain that would use this definition for pi()
. Maybe it should be rather defined in terms of atan
?
From #333:
I propose to remplace in asin x == atan (x/sqrt(1x**2)) in trigcat.spad line 162 byThe result seems right...
Status: open => fix proposed