axiom-developer
[Top][All Lists]
Advanced

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

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


From: Bill Page
Subject: [Axiom-developer] [#119 solve returns wrong answers and multiple answers to same trig problem] Ah, so subtle are the Axiom types!
Date: Thu, 10 Mar 2005 09:50:32 -0600

Changes 
http://page.axiom-developer.org/zope/mathaction/119SolveReturnsWrongAnswersAndMultipleAnswersToSameTrigProblem/diff
--
William,

Thank you for the explanation. Now I "get it". The kind of
coercion that I really wanted to do was like this::

  sin(1)::Expression Float

This is taking something from Expression Integer to Expression Float
which always works even for:
\begin{axiom}
  sin(x)::Expression Float
\end{axiom}

But when x converts to Float then the whole expression can be
displayed like Float (even though it remains Expression Float!).
In the coercion we are just changing the 'ground type' of the
Expression. In fact it can be converted to Float by the function
'ground'.
\begin{axiom}
ground(sin(1)::Expression Float)
\end{axiom}

Or just
\begin{axiom}
sin(1)::Expression Float::Float
\end{axiom}

Perhaps a function 'groundIfCan' would be nice :)

But in general the interpreter should not be expected know
that such a chain of coercions is possible. Right

Neat and very general. Its the same for all trig, exp, log,
etc. functions.

So now I also agree that the coercion to Complex Float does
**not** make sense. Notice that the following error messages
should be the same:
\begin{axiom}
log(10.0 q)::Float
log(10.0 q)::Complex Integer
log(10.0 q)::Complex Float
\end{axiom}

But the Complex Float domain is doing something extra.

If this is because of the interpreter then I think it is
trying too hard and as a result it makes it difficult to
explain this behaviour to the novice user. In this case I
would prefer the interpretation to be more *categorical*
and consistent so that we can explain this subtly from the
very beginning.

Bill Page.

--
forwarded from http://page.axiom-developer.org/zope/mathaction/address@hidden




reply via email to

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