axiom-developer
[Top][All Lists]
Advanced

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

[Axiom-developer] [#29 for i in 1..1 repeatprint(sin(i) :: Complex Float


From: anonymous
Subject: [Axiom-developer] [#29 for i in 1..1 repeatprint(sin(i) :: Complex Float)] additional information
Date: Tue, 18 Jan 2005 22:29:10 -0600

 > -> for i in 1..1 repeat print(sin(i) :: Complex Float)
 >    sin(1)
 >
 > The same behavior with many other functions.
 > 
 > for i in 1..1 repeat print(sqrt(i) :: Complex Float)
 > for i in 1..1 repeat print(exp(i) :: Complex Float)
 > for i in 1..1 repeat print(log(i) :: Complex Float)
 > for i in 1..1 repeat print(atan(i) :: Complex Float)

I'd say that it's a bug. A workaround (not a fix...) is to say

for i in 1..1 repeat print(sqrt(i) @ Complex Float)

It is quite clear that Axioms behaviour will be the same for all operators
(defined in op.spad).

Tracing the call with

)set message bottom on

yields

for i in 1..3 repeat print((sin(i))::Complex Float)

 Function Selection for sin
      Arguments: PI 
   -> no appropriate sin found in PositiveInteger 
   -> no appropriate sin found in Integer 
   -> no appropriate sin found in PositiveInteger 
   -> no appropriate sin found in Integer 

 Modemaps from Associated Packages 
   no modemaps

 Remaining General Modemaps 
   [1] D -> D from D if D has TRIGCAT
   [2] FortranExpression(D1,D2,D3) -> FortranExpression(D1,D2,D3)
            from FortranExpression(D1,D2,D3)
            if D1: LIST SYMBOL and D2: LIST SYMBOL and D3 has FMTC
 
 [1]  signature:   EXPR INT -> EXPR INT
      implemented: slot $$ from EXPR INT
 
 Function Selection for print
      Arguments: COMPLEX FLOAT 
   -> no appropriate print found in Complex Float 
   -> no appropriate print found in Complex Float 

 Modemaps from Associated Packages 
   no modemaps

 Remaining General Modemaps 
   [1] OutputForm -> Void from PrintPackage
 
 [1]  signature:   OUTFORM -> VOID
      implemented: slot (Void)(OutputForm) from PRINT
 

   sin(1)
   sin(2)
   sin(3)
                                                                   Type: Void

which looks quite strange: Axiom is looking for a function print with argument
of type Complex Float, but the thing it prints is not of this type...


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




reply via email to

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