[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


-digamma 2 =>  0.42278433509846725 (DoubleFloat)
-Has to return digamma(2) (EXPR INT)
Original Issue Report

  digamma 2
  Has to return digamma(2) (EXPR INT)


  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
)set message selection on
digamma 2

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.

digamma(2::EXPR INT)
digamma(2)@(EXPR INT)

Of course as something of type EXPR INT this expression has
no simplier representation.

forwarded from

reply via email to

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