Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Mathematica and Lisp
Replies: 16   Last Post: Mar 7, 2013 3:58 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Richard Fateman

Posts: 286
Registered: 12/7/04
Re: Mathematica and Lisp
Posted: Mar 6, 2013 5:54 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 3/5/2013 7:54 PM, djmpark wrote:
> Reverse the order of what? ArcTan of one argument has only one argument and
> how can that be reversed? What has two arguments is the coordinate
> specification {x, y} and they are not reversed in ArcTan[x, y].
>
> It is the one argument form ArcTan[y/x] that seems poorly designed and would
> probably only be used when one knows the quotient and not x and y - so there
> wouldn't be anything to reverse.
>
>
> David Park
> djmpark@comcast.net
> http://home.comcast.net/~djmpark/index.html
>
>
>
>
> From: Richard Fateman [mailto:fateman@cs.berkeley.edu]
>
> (simple example: why does Mathematica reverse the order of arguments to
> arctan of 2 args?)
>
> RJf
>
>

ArcTan[x,y] in Mathematica gives the ArcTan[y/x] but in the correct
quadrant.
atan2 (y,x) in FORTRAN gives the arctangent of y/x). Note the order of
arguments.
in C++
in Pascal
in Java
in Lisp (atan y x)
in PHP
in Python v 3.3.0
in Ruby



I was able to find just one programming language that agrees with the
order in Mathematica.
That is Microsoft's Excel. Now it could be that compatibility with Excel is
more important than compatibility with those other languages. Google
docs has to
use the same order as Excel, but I think it is generally recognized as being
compatible with an error.
Just sayin'.
RJF












Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.