In article <463BC69B.50901 at gmail.com>,
Raymond Toy <toy.raymond at gmail.com> wrote:
> >>>>> Running tests in rtest_trig:
> >>>>>
> >>>>> ********************** Problem 60 ***************
> >>>>> Input:
> >>>>> block([buggy : []], for f in alltrig do for p in pts do block([e,
> >>>>> fop : op(f)], e : buildq([p, fop], lambda([],
> >>>>> cabs(float(rectform(fop(p))) - fop(float(p))))),
> >>>>> if e() > 1.0E-13 then buggy : cons(e, buggy)), buggy)
> >>>>>
> >>>>>
> >>>>> Result:
> >>>>> The number 1.0*%i+2.0 isn't in the domain of acot
> >>>>> -- an error. To debug this try debugmode(true);
> >>>>> 0
> >>>>>
> >>>> In maxima, try acot(2.0+%i*1.0); If that produces an error, try
> >>>> atan(1/(2.0+%i*1.0)). If that doesn't work, use Lisp and evaluate (atan
> >>>> (/ #c(2d0 1d0))).
> >>>>
> >>> (%i3) acot(2.0+%i*1.0);
> >>> The number 1.0*%i+2.0 isn't in the domain of acot
> >>> -- an error. To debug this try debugmode(true);
> >>>
> >>> (%i4) atan(1/(2.0+%i*1.0));
> >>> 1
> >>> (%o4) atan(------------)
> >>> 1.0 %i + 2.0
> >>>
> >>>
> >> Oops. Try float(atan(1/(2.0+1.0*%i))).
> >>
> >> Ray
> >>
> >
> > (%i5) float(atan(1/(2.0+1.0*%i)));
> >
> > 1
> > (%o5) atan(------------)
> > 1.0 %i + 2.0
> >
> >
> Hmm. I confess that I didn't try it, but float(%o5), %o5, numer, etc.,
> doesn't do anything. That seems like a bug.
>
> Try float(atan(2/5-%i/5)).
>
> The reason I'm asking is that acot(x) is evaluated via atan(1/x). If
> atan(1/x) returns nil, a domain error is signaled.
>
> Ray
(%i1) float(atan(2/5-%i/5));
(%o1) - 1.0 (.1732867951399863 %i - .3926990816987241)
--
http://lispm.dyndns.org