Still a Sage newbie. I discovered the "==" comparison operator and tried
this:
sage: 2*n+3==(6*n+9)/3
True
sage: 4==5
False
So I thought Sage would be useful to check on some messy algebra I was
doing (one example out of many):
sage: (2*j*2^(18*q) + 13*2^(18*q)/27 - 13/27)
==
(2^(18*q)*(2*j+0)+13*(2^(18*q)-1)/27)
2*j*2^(18*q) + 13*2^(18*q)/27 - 13/27
==
2*j*2^(18*q) + 13*(2^(18*q) - 1)/27
(well the email program folded the lines so for clarity I refolded them
in a more-readable manner)
But that comparison did not tell me what I was expecting. In fact it
didn't tell me anythig.
The following is a rather lame substitute (proof by example<big laugh>):
sage: for q in range(2):
for j in range(2):
(2*j*2^(18*q) + 13*2^(18*q)/27 -
13/27)==(2^(18*q)*(2*j+0)+13*(2^(18*q)-1)/27) + 1
....:
False
False
False
False
sage: for q in range(2):
for j in range(2):
(2*j*2^(18*q) + 13*2^(18*q)/27 -
13/27)==(2^(18*q)*(2*j+0)+13*(2^(18*q)-1)/27)
....:
True
True
True
True
(No refolding of lines there...) At least that approach serves as a
credibility check.
The question is: how do I use Sage to check on my algebra?
Bob Wonderly
--~--~---------~--~----~------------~-------~--~----~
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://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---