On 02/11/11 09:34 AM, daly wrote:
On Fri, 2011-02-11 at 09:20 +0000, David Kirkby wrote:
On 10 February 2011 14:51, rjf<fate...@gmail.com>  wrote:
in maxima, gcd(1/4,1/6)  is 1/12,  lcm is 1/2

Since maxima immediately simplifies 2/1  to 2, there is no
distinction between gcd(2/1, ....)   and gcd(2, ...)

FWIW, I just noticed that Mathematica treats 2/1 as an integer and not
as a rational.

In[1]:= Head[2]

Out[1]= Integer

In[2]:= Head[1/3]

Out[2]= Rational

In[3]:= Head[2/1]

Out[3]= Integer

What does MMA do with gcd(2/1,4)



This is version 7.0 - the latest is 8.0

In[2]:= GCD[2/1,4]

Out[2]= 2

You can try this in Wolfram|Alpha too, which uses the latest Mathematica (8.0). Just go to

http://www.wolframalpha.com/

and type in "GCD[2/1,4]"

A direct URL is actually:

http://www.wolframalpha.com/input/?i=GCD[2%2F1%2C4]

What is interesting is that Wolfram|Alpha shows an alternate expression too:

8/LCM[2,4]

If I evaluate that in Mathematica, I get:

In[6]:= 8/LCM[2,4]

Out[6]= 2

If you ever want to know the output from Mathematica, you can try typing it in Wolfram|Alpha. Obviously Wolfram|Alpha does not have the full functionality of Mathematica exposed, as otherwise nobody would buy Mathematica. But a fair amount of it seems to be available.

Using Wolfram|Alpha is a lot easier if you know the Mathematica expression. Using the text a human would type is a lot more tedious, though typing "whats the greatest common divider of 2 divided by one and 4?" does actually get the right result.

http://www.wolframalpha.com/input/?i=whats+the+greatess+common+divider+of+2+divided+by+one+and+4%3F

Dave
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to