Re: BUG in Calculus`VectorAnalysis` CoordinatesFromCartesian?
- To: mathgroup at smc.vnet.net
- Subject: [mg15042] Re: [mg15010] BUG in Calculus`VectorAnalysis` CoordinatesFromCartesian?
- From: David Withoff <withoff>
- Date: Wed, 9 Dec 1998 04:12:25 -0500
- Sender: owner-wri-mathgroup at wolfram.com
> I worked a little bit with the Calculus`VectorAnalysis package, and > think I found a minor BUG. > > Needs["Calculus`VectorAnalysis`"]; > SetCoordinates[Spherical]; > > ein={e,45Degree,0Degree}; > CoordinatesToCartesian[ein] > Out={e/Sqrt[2], 0, e/Sqrt[2]} > > 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. > > Marcus Heidkamp > > msheidka at physics.utexas.edu The result with ArcTan[e/Sqrt[2], 0] is correct. Zero is a valid argument here. If e is real, ArcTan[e/Sqrt[2], 0] is zero for e>0 and Pi for e < 0. Perhaps you were thinking of something else. Dave Withoff Wolfram Research