[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] [#119 solve returns wrong answers and multiple answers

From: wyscc
Subject: [Axiom-developer] [#119 solve returns wrong answers and multiple answers to same trig problem] Why Complex Float?
Date: Thu, 10 Mar 2005 07:16:25 -0600



<pre>From: wyscc, Thur, 10 Mar 2005 08:16:00</pre>

Of course you don't, from a mathematical view point, and the problem is 
apparently the Interpreter needs help. If you put the argument into 
<code>Float</code> or the expression into <code>Expression Float</code>, Axiom 
will oblige.
asin(1/2)::Expression Float
But in fact, even coercion to <code>Complex Float</code> won't always work.
asin(%i/2)::Complex Float
There is no modemap from <code>Expression Integer</code> to <code>Complex 
Float</code> (Use hyperdoc <code>Browse, Selectable</code> to search, with wild 
character in the name field).  This is reasonable since it is not possible in 
general to evaluate numerically a symbolic expression. I believe the 
Interpreter actually tries this:
asin(1/2)$(Complex Float)
which succeed in both cases because <code>asin</code> has modemaps in those 
domains. Exactly why it was able to change a  non-existing coercion in one case 
but not the other is unclear, but this seems to be because the Interpreter code 
is not as categorical as the compiler code and these ``smart'' coercions may be 
done case by case. But even this reasoning has problem:

asin(%i/2::Complex Float)  -- easiest
asin(%i/2)::Expression Complex Float::Complex Float -- harder
asin(%i/2)$(Complex Float)  -- doesn't work

forwarded from

reply via email to

[Prev in Thread] Current Thread [Next in Thread]