Waldek Hebisch <[email protected]> writes:

> I wrote:
>> Tracing suggest that op3 is using floating point arithmetic, that
>> would explain error.

You are quite right.  For the record:


(1) -> op2(f : SUP INT): SUP INT == 1/2*f
   Function declaration op2 : SparseUnivariatePolynomial(Integer) -> 
      SparseUnivariatePolynomial(Integer) has been added to workspace.
                                                                   Type: Void
(2) -> p2: SUP INT := (10^21+126)

   (2)  1000000000000000000126
                                    Type: SparseUnivariatePolynomial(Integer)
(3) -> )se me bo on
(3) -> )tr SUP2 )ma
 
   Parameterized constructors traced:
      SUP2
(3) -> op2 p2

 Function Selection for op2
      Arguments: SUP(INT) 

 Function Selection for /
      Arguments: (PI,PI) 
      Target type: SUP(INT) 
   -> no appropriate / found in PositiveInteger 
   -> no appropriate / found in Integer 
   -> no appropriate / found in SparseUnivariatePolynomial(Integer) 
   -> no appropriate / found in PositiveInteger 
   -> no appropriate / found in Integer 
   -> no appropriate / found in SparseUnivariatePolynomial(Integer) 

 Modemaps from Associated Packages 
   no modemaps

 Remaining General Modemaps 
   [1] (D,D1) -> D from D
            if D has MATCAT(D1,D2,D3) and D1 has RING and D2 has FLAGG(
            D1) and D3 has FLAGG(D1) and D1 has FIELD
   [2] (D1,D1) -> D from D if D has QFCAT(D1) and D1 has INTDOM
   [3] (D,D) -> D from D if D has FIELD
   [4] (Float,Integer) -> Float from Float
   [5] (D,D1) -> D from D if D has VSPACE(D1) and D1 has FIELD
   [6] (D,D) -> D from D
            if D = EQ(D1) and D1 has FIELD and D1 has TYPE or D = EQ(D1
            ) and D1 has GROUP and D1 has TYPE
   [7] (DoubleFloat,Integer) -> DoubleFloat from DoubleFloat
   [8] (D,D1) -> D from D
            if D has AMR(D1,D2) and D1 has RING and D2 has OAMON and D1
            has FIELD
   [9] (D,D1) -> D from D
            if D has RMATCAT(D2,D3,D1,D4,D5) and D1 has RING and D4 has
            DIRPCAT(D3,D1) and D5 has DIRPCAT(D2,D1) and D1 has FIELD
         
   [10] (D,D1) -> D from D
            if D has LIECAT(D1) and D1 has COMRING and D1 has FIELD
   [11] (D,D) -> D from D if D has GROUP
   [12] (SparseMultivariatePolynomial(D2,Kernel(D)),
            SparseMultivariatePolynomial(D2,Kernel(D))) -> D
            from D if D2 has INTDOM and D2 has COMPAR and D has FS(D2)
            
 
 [1]  signature:   (FLOAT,INT) -> FLOAT
      implemented: slot $$(Integer) from FLOAT
 [2]  signature:   (DFLOAT,INT) -> DFLOAT
      implemented: slot $$(Integer) from DFLOAT
 [3]  signature:   (FRAC(INT),FRAC(INT)) -> FRAC(INT)
      implemented: slot $$$ from FRAC(INT)
 [4]  signature:   (EQ(FRAC(INT)),EQ(FRAC(INT))) -> EQ(FRAC(INT))
      implemented: slot $$$ from EQ(FRAC(INT))
 

 Function Selection for *
      Arguments: (FLOAT,SUP(INT)) 
      Target type: SUP(INT) 
   -> no appropriate * found in Float 
   -> no appropriate * found in SparseUnivariatePolynomial(Integer) 
   -> no appropriate * found in SparseUnivariatePolynomial(Float) 
   -> no appropriate * found in Integer 
   -> no appropriate * found in Float 
   -> no appropriate * found in SparseUnivariatePolynomial(Integer) 
   -> no appropriate map found in SparseUnivariatePolynomial(Integer) 
   -> no appropriate map found in Integer 
   -> no appropriate map found in SparseUnivariatePolynomial(Float) 
   -> no appropriate map found in Float 
   -> no appropriate map found in Integer 
   -> no appropriate map found in Float 

 Modemaps from Associated Packages 
   [1] ((D4 -> D5),SparseUnivariatePolynomial(D4)) -> 
            SparseUnivariatePolynomial(D5)
            from SparseUnivariatePolynomialFunctions2(D4,D5)
            if D4 has RING and D5 has RING
   -> no appropriate * found in SparseUnivariatePolynomial(Float) 
   -> no appropriate * found in Integer 

 Modemaps from Associated Packages 
   no modemaps

 Remaining General Modemaps 
   [1] (NonNegativeInteger,D) -> D from D if D has ABELMON
   [2] (D1,D) -> D from D if D has LMODULE(D1) and D1 has RNG
   [3] (D,D1) -> D1 from D
            if D has SMATCAT(D2,D3,D4,D1) and D3 has RING and D4 has 
            DIRPCAT(D2,D3) and D1 has DIRPCAT(D2,D3)
   [4] (D1,D) -> D1 from D
            if D has SMATCAT(D2,D3,D1,D4) and D3 has RING and D1 has 
            DIRPCAT(D2,D3) and D4 has DIRPCAT(D2,D3)
   [5] (PolynomialIdeals(D1,D2,D3,D4),PolynomialIdeals(D1,D2,D3,D4))
             -> PolynomialIdeals(D1,D2,D3,D4)
            from PolynomialIdeals(D1,D2,D3,D4)
            if D1 has FIELD and D2 has OAMONS and D3 has ORDSET and D4 
            has POLYCAT(D1,D2,D3)
   [6] (DenavitHartenbergMatrix(D2),Point(D2)) -> Point(D2)
            from DenavitHartenbergMatrix(D2)
            if D2 has Join(Field,TranscendentalFunctionCategory)
   [7] (D,D) -> D from D
            if D has MATCAT(D1,D2,D3) and D1 has RING and D2 has FLAGG(
            D1) and D3 has FLAGG(D1)
   [8] (D1,D) -> D from D
            if D has MATCAT(D1,D2,D3) and D1 has RING and D2 has FLAGG(
            D1) and D3 has FLAGG(D1)
   [9] (D,D1) -> D from D
            if D has MATCAT(D1,D2,D3) and D1 has RING and D2 has FLAGG(
            D1) and D3 has FLAGG(D1)
   [10] (Integer,D) -> D from D
            if D has MATCAT(D2,D3,D4) and D2 has RING and D3 has FLAGG(
            D2) and D4 has FLAGG(D2)
   [11] (D,D1) -> D1 from D
            if D has MATCAT(D2,D3,D1) and D2 has RING and D3 has FLAGG(
            D2) and D1 has FLAGG(D2)
   [12] (D1,D) -> D1 from D
            if D has MATCAT(D2,D1,D3) and D2 has RING and D1 has FLAGG(
            D2) and D3 has FLAGG(D2)
   [13] (Integer,D) -> D from D if D has ABELGRP
   [14] (PositiveInteger,D) -> D from D if D has ABELSG
   [15] (D,D) -> D from D if D has SGROUP
   [16] (D,D) -> D from D if D has MONAD
   [17] ((D5 -> D6),(D4 -> D5)) -> (D4 -> D6) from MappingPackage3(D4,
            D5,D6)
            if D4 has SETCAT and D5 has SETCAT and D6 has SETCAT
   [18] (PositiveInteger,Color) -> Color from Color
   [19] (DoubleFloat,Color) -> Color from Color
   [20] (CartesianTensor(D1,D2,D3),CartesianTensor(D1,D2,D3)) -> 
            CartesianTensor(D1,D2,D3)
            from CartesianTensor(D1,D2,D3)
            if D1: INT and D2: NNI and D3 has COMRING
   [21] (Integer,D) -> D from D
            if D has VECTCAT(D2) and D2 has TYPE and D2 has ABELGRP
   [22] (D1,D) -> D from D
            if D has VECTCAT(D1) and D1 has TYPE and D1 has MONOID
   [23] (D,D1) -> D from D
            if D has VECTCAT(D1) and D1 has TYPE and D1 has MONOID
   [24] (D1,D) -> D from D
            if D has GRMOD(D1,D2) and D1 has COMRING and D2 has ABELMON
            
   [25] (D,D1) -> D from D
            if D has GRMOD(D1,D2) and D1 has COMRING and D2 has ABELMON
            
   [26] (D,D1) -> D from D
            if D has XFALG(D2,D1) and D2 has ORDSET and D1 has RING
   [27] (D1,D) -> D from D
            if D has XFALG(D1,D2) and D1 has ORDSET and D2 has RING
   [28] (Equation(D1),D1) -> Equation(D1) from Equation(D1)
            if D1 has SGROUP and D1 has TYPE
   [29] (D1,Equation(D1)) -> Equation(D1) from Equation(D1)
            if D1 has SGROUP and D1 has TYPE
   [30] (D1,D2) -> D from D
            if D has FMCAT(D1,D2) and D1 has RING and D2 has ORDSET
   [31] (D1,D2) -> D from D
            if D has FMCAT(D2,D1) and D2 has RING and D1 has ORDSET
   [32] (D,D1) -> D from D
            if D has DIRPCAT(D2,D1) and D1 has TYPE and D1 has MONOID
         
   [33] (D1,D) -> D from D
            if D has DIRPCAT(D2,D1) and D1 has TYPE and D1 has MONOID
         
   [34] (D,D1) -> D from D if D has RMODULE(D1) and D1 has RNG
   [35] (D1,D2) -> D from D
            if D has FAMONC(D2,D1) and D2 has SETCAT and D1 has CABMON
            
 
 [1]  signature:   (SUP(FLOAT),SUP(FLOAT)) -> SUP(FLOAT)
      implemented: slot $$$ from SUP(FLOAT)
 [2]  signature:   (SUP(FLOAT),SUP(FLOAT)) -> SUP(FLOAT)
      implemented: slot $$$ from SUP(FLOAT)
 [3]  signature:   (SUP(FLOAT),SUP(FLOAT)) -> SUP(FLOAT)
      implemented: slot $$$ from SUP(FLOAT)
 
   Compiling function op2 with type SparseUnivariatePolynomial(Integer)
       -> SparseUnivariatePolynomial(Integer) 
 
 [1]  signature:   SUP(INT) -> SUP(INT)
      implemented: local function *1;op2;1;frame1
 

 Function Selection for map by coercion facility (map) 
      Arguments: ((INT -> FLOAT),SUP(INT)) 
      Target type: SUP(FLOAT) 
   -> no appropriate map found in SparseUnivariatePolynomial(Integer) 
   -> no appropriate map found in SparseUnivariatePolynomial(Float) 
   -> no appropriate map found in Float 
   -> no appropriate map found in Integer 
   -> no appropriate map found in Float 

 Modemaps from Associated Packages 
   [1] ((D4 -> D5),SparseUnivariatePolynomial(D4)) -> 
            SparseUnivariatePolynomial(D5)
            from SparseUnivariatePolynomialFunctions2(D4,D5)
            if D4 has RING and D5 has RING
 
 [1]  signature:   ((INT -> FLOAT),SUP(INT)) -> SUP(FLOAT)
      implemented: slot (SparseUnivariatePolynomial (Float))(Mapping (Float) 
(Integer))(SparseUnivariatePolynomial (Integer)) from SUP2(INT,FLOAT)
 
 1<enter SparseUnivariatePolynomialFunctions2.map,13 
: 
 arg1= theMap(coerceIntByMapInner)
 arg2= 1000000000000000000126
 1>exit  SparseUnivariatePolynomialFunctions2.map,13 
: 
 0.1000000000 0000000001 E 22

 Function Selection for map by coercion facility (map) 
      Arguments: ((FLOAT -> INT),SUP(FLOAT)) 
      Target type: SUP(INT) 
   -> no appropriate map found in SparseUnivariatePolynomial(Float) 
   -> no appropriate map found in SparseUnivariatePolynomial(Integer) 
   -> no appropriate map found in Integer 
   -> no appropriate map found in Float 
   -> no appropriate map found in Integer 

 Modemaps from Associated Packages 
   [1] ((D4 -> D5),SparseUnivariatePolynomial(D4)) -> 
            SparseUnivariatePolynomial(D5)
            from SparseUnivariatePolynomialFunctions2(D4,D5)
            if D4 has RING and D5 has RING
 
 [1]  signature:   ((FLOAT -> INT),SUP(FLOAT)) -> SUP(INT)
      implemented: slot (SparseUnivariatePolynomial (Integer))(Mapping 
(Integer) (Float))(SparseUnivariatePolynomial (Float)) from SUP2(FLOAT,INT)
 
 1<enter SparseUnivariatePolynomialFunctions2.map,13 
: 
 arg1= theMap(coerceIntByMapInner)
 arg2= 0.5000000000 0000000006 E 21
 1>exit  SparseUnivariatePolynomialFunctions2.map,13 
: 
 500000000000000000064

   (3)  500000000000000000064
                                    Type: SparseUnivariatePolynomial(Integer)

Martin

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to