On Wed, 07 Feb 2007 23:22:46 -0700, didier deshommes <[EMAIL PROTECTED]> wrote:

>
> On 2/8/07, Luis Finotti <[EMAIL PROTECTED]> wrote:
>> Thanks!  I could not find that in the Reference Manual...
>>
>> On the other hand, it seems that Sage (or Python) does not handle
>> equality of reals very well:
>
> Hi,
> this is most likey due to rounding errors. The equality holds for fractions:
>
> {{{
> sage: 1/2==1/2
>  True
> sage: 1/2==1/2+1-1
>  True
> }}}
>
> But note that rearranging your equation, we can still get equality:
> {{{
> sage: sqrt (2) - sqrt(2) + 1 - 1 ==0
>  True
> }}}
>
> Hope that helps.

Didier,

Would RealLib, which still hasn't fully made its way into SAGE, be very relevant
to this question?  Can it somehow decide equality of some class of real numbers
defined via an algorithm (e.g., sqrt(2) + 1 - 1 is defined by an algorithm...)?
Anyway, if RealLib is relevant, could you say something about that?

William

--~--~---------~--~----~------------~-------~--~----~
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/sage-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to