following strange and not desired effect: 

1. Compiling a package NCFLOAT with parameter R: Ring
2. using it with a concrete ring, here Float
3. change the behaviour of Float (outputFixed 2)
4. recompile the package
5. Side effect: the behaviour of Float is changed back again to original 
default, not only in calling NCFLOAT, but even for all Float's in the 
workspace 
I see no reasonable explanation or even justification for this behaviour.

(1) -> )co ncfloat
 
(1) -> NF := NotChangeFloat(Float)

   (1)  NotChangeFloat Float
                                                                 Type: Domain
(2) -> signValue(-0.0333333)$NF

   (2)  0.0333333
                                                                  Type: Float
(3) -> outputFixed 2
                                                                   Type: Void
(4) -> signValue(-0.0333333)$NF

   (4)  0.03
                                                                  Type: Float
(5) -> )co ncfloat

(5) -> signValue(-0.0333333)$NF

   (5)  0.0333333

(6) -> outputFixed 2
                                                                   Type: Void
(7) -> )co ncfloat

(7) -> 0.08999

   (7)  0.08999

The code of ncfloat.spad is trivial: 


)abb package NCFLOAT NotChangeFloat

NotChangeFloat(R : Ring):
 public == private where
  public ==> with
    signValue: R -> R
  private ==> add
    signValue(r: R): R == -r


-- 
Mit freundlichen Grüßen 
Johannes Grabmeier

Prof. Dr. Johannes Grabmeier
Köckstr. 1, D-94469-Deggendorf

Tel.-pv. +49-(0)-991-2979-584, Tel.-mob. 0171-550-3789 
Tel.-d   +49-(0)-991-3615-141, Sekr. -154
Fax-p: +49-(0)-1803-5518-17745

--~--~---------~--~----~------------~-------~--~----~
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