[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Axiom-developer] Re: [Gcl-devel] Segmentation violation:cstack ok:s
From: |
Page, Bill |
Subject: |
RE: [Axiom-developer] Re: [Gcl-devel] Segmentation violation:cstack ok:signalling error with GCL-2.7.0 (cvs head) |
Date: |
Wed, 29 Nov 2006 21:20:51 -0500 |
On Wednesday, November 29, 2006 8:28 PM Vanuxem Gregory wrote:
>
> Le mercredi 29 novembre 2006 à 15:25 -0500, Page, Bill a écrit :
> > On Wednesday, November 29, 2006 2:38 PM Vanuxem Gregory wrote:
> > >
> > > Le mercredi 29 novembre 2006 à 18:18 +0100, Gabriel Dos
> Reis a écrit :
> > > [...]
> > >
> > > > vmlisp.lisp has become a kind of black hole attracting all
> > > > kinds of macros.
> > > >
> > > > We will make sure that that black hole stops growing, and in
> > > > particular there is only one symbol, dsetq and it is defined.
> > >
> > > Since you speak about this, the 'asec' function in vmlisp.lisp is
> > > defined two times for gcl and cmucl. Kai Kaminski "literated"
> > > this file some times ago, he probably fixed this issue.
> > >
> >
> > You should pull the updated source from the src link here:
> >
> > http://wiki.axiom-developer.org/axiom--test--1/src/interp/VmlispLisp
> >
>
> I'm going to suppress the Juergen Weiss's asec definition.
>
> And just for the fun, here is its definition :
>
> #+:(or :cmu :akcl :gcl)
> (defun asec (a)
> (if (and (a > -1.0) (a < 1.0))
> 0.0
> (acos (/ 1.0 a))))
>
> And no one sees the errors :-)
>
I think this may be "reasonable" compromize definition for a
function with signature
Float -> Float
Juergen recognized this pecularity.
On 29 Oct 2003 14:35:25 +0100 Juergen Weiss wrote:
> Here the lisp version of the C versions in csl
> One problem: the formula may work for real arguments
> only.
>
>
> ;; stolen from csl
> #+(or :cmu :akcl)
> (defun cot (a)
> (if (or (> a 1000.0) (< a -1000.0))
> (/ (cos a) (sin a))
> (/ 1.0 (tan a))))
>
> ;; stolen from csl
> #+(or :cmu :akcl)
> (defun asec (a)
> (if (and (a > -1.0) (a < 1.0))
> 0.0
> (acos (/ 1.0 a))))
>
Perhaps a better argument checking would be a good idea, but
obviously Axiom does not try to call this asec function for
real values between -1 and 1.
(1) -> )cl all
All user variables and function definitions have been cleared.
(1) -> asec(1.9)$Float
(1) 1.0165344923 4256851184
Type: Float
(2) -> asec(0.9)$Float
>> Error detected within library code:
acos: argument > 1 in magnitude
protected-symbol-warn called with (NIL)
(2) -> asec(0.9)$Complex(Float)
(2) 3.1415926535 8979323846 + 0.4671453081 0326201812 8 %i
Type: Complex Float
-----
Regards,
Bill Page.