Which boils down to

sage: sage.symbolic.relation.test_relation_maxima(SR(m) == SR(m1))
True

Which comes from

$ sage --maxima
;;; Loading #P"/home/vbraun/Code/sage.git/local/lib/ecl/sb-bsd-sockets.fas"
;;; Loading #P"/home/vbraun/Code/sage.git/local/lib/ecl/sockets.fas"
;;; Loading #P"/home/vbraun/Code/sage.git/local/lib/ecl/defsystem.fas"
;;; Loading #P"/home/vbraun/Code/sage.git/local/lib/ecl/cmp.fas"
Maxima 5.35.1 http://maxima.sourceforge.net
using Lisp ECL 13.5.1
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) is 
(equal(540579833922455191419978421211010409605356811833049025*sqrt(1/2), 
                382247666339265723780973363167714496025733124557617743));
(%o1)                                true


I suppose __nonzero__ should try to cast to QQbar and AA first before 
trying maxima.


On Monday, July 13, 2015 at 7:15:57 PM UTC+2, Volker Braun wrote:
>
> This is IMHO a bug in SR __nonzero__ only. Ginac/Pynac seems to handle the 
> comparison just fine:
>
> sage: RealField(300)(m) > RealField(300)(m1)
> True
> sage: RealField(300)(m) < RealField(300)(m1)
> False
>
> sage: cmp(SR(m), SR(m1))
> -1
> sage: cmp(RealField(100)(m), RealField(100)(m1))
> -1
>
> sage: bool(SR(m) > SR(m1))
> True
> sage: bool(SR(m) < SR(m1))
> False
>
> But this is wrong:
>
> sage: (SR(m1) - SR(m)).__nonzero__()
> False
>
>
>
> On Monday, July 13, 2015 at 10:48:14 AM UTC+2, David Goldberg wrote:
>>
>> This is in SageMath Version 6.6, Release Date: 2015-04-14 running on a 
>> MacBook.  The following lines print 'equal', even though m and m1 do not 
>> appear equal to me!
>>
>> m=540579833922455191419978421211010409605356811833049025*sqrt(1/2)
>> m1=382247666339265723780973363167714496025733124557617743
>> if m == m1:
>> print "equal"
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to