[Date Index]
[Thread Index]
[Author Index]
BUG in Calculus`VectorAnalysis` CoordinatesFromCartesian?
*To*: mathgroup at smc.vnet.net
*Subject*: [mg15010] BUG in Calculus`VectorAnalysis` CoordinatesFromCartesian?
*From*: "none" <none at nowhere>
*Date*: Sat, 5 Dec 1998 01:30:14 -0500
*Organization*: The University of Texas at Austin, Austin, Texas
*Sender*: owner-wri-mathgroup at wolfram.com
Hi there!
I worked a little bit with the Calculus`VectorAnalysis package, and
think I found a minor BUG.
The problem occurred when using spherical coordinates:
Needs["Calculus`VectorAnalysis`"];
SetCoordinates[Spherical];
ein={e,45Degree,0Degree};
CoordinatesToCartesian[ein]
Out={e/Sqrt[2], 0, e/Sqrt[2]}
That is ok so far! But now...
CoordinatesFromCartesian[%]
Out={Sqrt[e^2], ArcCos[e/(Sqrt[2]*Sqrt[e^2])], ArcTan[e/Sqrt[2], 0]}
The 3rd list entry (Pphi) contains the ArcTan with an invalid argument.
Although the package checks for both arguments to be zero at the same
time, it does not check just for the second one to be zero alone.
(Interested ones should examine the source package -- the second
argument is simply the y-coordinate in the Cartesian system, which
indeed can be zero!)
I would call this a BUG in the package.
Even though I do not think that the BUG is version dependent: I am using
Mathematica 3.1 on a Windows95 system with 64MB RAM and 200MHz Pentium
Processor.
Two workarounds for the problem are: Overwrite the ArcTan function to
check for the second argument not to be zero
or
Modify the package
This BUG may already be known to the guys at Wolfram Research, but I
post this message anyways, since I do not know for sure.
Greetings
Marcus Heidkamp
msheidka at physics.utexas.edu
Prev by Date:
**Re: mathlink & MS Visual C++ 6.0**
Next by Date:
**Variables names**
Previous by thread:
**Re: mathlink & MS Visual C++ 6.0**
Next by thread:
**Re: BUG in Calculus`VectorAnalysis` CoordinatesFromCartesian?**
| |