On November 30, 2006 1:27 PM Vanuxem Gregory wrote: > ... > > 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)) + (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. > > It seems that you did not notice the errors, as me at first glance: > > (and (a > -1.0) (a < 1.0)) > > This is not Lisp code :-) > Oh! Duh, <embarrassment> ... So this doesn't cause an error when compiling Axiom with GCL? Does #+(or :cmu :akcl cause it to be excluded? But maybe for the sake of other lisp targets rather than deleting it, maybe re-writing it to correct the error would be better? Anyway. No problem. You decide. Cheers, Bill Page. _______________________________________________ Axiom-developer mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/axiom-developer
