Bill Page wrote: 
> 
> On Fri, Sep 5, 2008 at 11:58 PM, Waldek Hebisch wrote:
>
> > But printing a float and reading it back is likely to mangle the value.
> >
> 
> Printing is not important but representing an object as a string is
> important. Currently both
> 
>    float(156649750673941512323,-66,2)
> 
> and
> 
>    2.123
> 
> produce the same result when input to the interpreter:
> 
> (1) -> test(float(156649750673941512323,-66,2)=2.123)
> 
>    (1)  true
>                                                          Type: Boolean
> 
> Can you give an example when this might not be the case?
> 

Just increase precision.  Internally number are stored with higher
precision than specified, so probably if you fix precision any
value given up to this precision after read will give you equal
output.  But I belive that numbers coming from calculations will
change after a round trip (with small, but non-negligable probability).

-- 
                              Waldek Hebisch
[EMAIL PROTECTED] 

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