more three problems...



Rainer Joswig wrote:
> In article <463BB1D1.50300 at ericsson.com>,
>  Raymond Toy <raymond.toy at ericsson.com> wrote:
>
>   
>> Rainer Joswig wrote:
>>     
>>> In article <463BA4D1.60902 at ericsson.com>,
>>>  Raymond Toy <raymond.toy at ericsson.com> wrote:
>>>
>>>       
>>>> Rainer Joswig wrote:
>>>>         
>>>>> Maxima 5.12.0
>>>>>
>>>>> I got the Lisp part mostly running under LispWorks 5.
>>>>>
>>>>> Three remaining problems from the testsuite:
>>>>>
>>>>>
>>>>> Running tests in rtest9: 
>>>>> ********************** Problem 18 ***************
>>>>> Input:
>>>>> errcatch(ev(%, x = 1.0E+20))
>>>>>
>>>>>
>>>>> Result:
>>>>> [7.000000000000015E+19]
>>>>>
>>>>> This differed from the expected result:
>>>>> [7.0E+19]
>>>>>           
>>>> Can you evaluate (in Lisp)
>>>>
>>>> (+ (* 1d-20 (expt 1d20 2)) (* -5.5d0 1d20) 5.2d20)?
>>>>
>>>> Does this produce 7d19 or something else?
>>>>         
>>> 7.000000000000013E19
>>>       
>> Interesting.  I'm guessing LW doesn't read the numbers quite right. Or 
>> something.
>>     
>
> PPC and Intel on Mac OS X 10.4.9.
>
>   
Don't know what else to do except try some experiments to see if each
part is computed correctly.


>>>>>
>>>>>
>>>>>
>>>>> 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