[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## [Axiom-developer] [#130 SpecialFunction(Integer) doesn't return Expressi

**From**: |
Bill Page |

**Subject**: |
[Axiom-developer] [#130 SpecialFunction(Integer) doesn't return Expression Integer] |

**Date**: |
Wed, 23 Mar 2005 16:15:05 -0600 |

Changes
http://page.axiom-developer.org/zope/mathaction/130SpecialFunctionIntegerDoesntReturnExpressionInteger/diff
--
??changed:
-digamma 2 => 0.42278433509846725 (DoubleFloat)
-<br>
-Has to return digamma(2) (EXPR INT)
Original Issue Report
\begin{axiom}
digamma 2
\end{axiom}
Has to return digamma(2) (EXPR INT)
Analysis
The statement of the issue is to terse and vague to be sure
what the author had in mind, but assuming that s/he expected
the result to be of type EXPR INT, here is how to see what is
going on. Use the option ')set message selection on' to trace
how Axiom finds the signature of the appropriate digamma
function:
\begin{axiom}
)set message selection on
digamma 2
\end{axiom}
Axiom finds 3 possible signatures and applies the first one
because 2 can be coerced to DoubleFloat. But we can ask Axiom
to take the third option by either specifically treating the
type of the input 2 as EXPR INT or by asking for something of
type EXPR INT as the result.
\begin{axiom}
digamma(2::EXPR INT)
digamma(2)@(EXPR INT)
\end{axiom}
Of course as something of type EXPR INT this expression has
no simplier representation.
--
forwarded from http://page.axiom-developer.org/zope/mathaction/address@hidden

**[Axiom-developer] [#130 SpecialFunction(Integer) doesn't return Expression Integer]**,
*Bill Page* **<=**