Re: (-1)^(1/2.) on Mathematica!
- To: mathgroup at smc.vnet.net
- Subject: [mg107531] Re: [mg107518] (-1)^(1/2.) on Mathematica!
- From: Murray Eisenberg <murray at math.umass.edu>
- Date: Tue, 16 Feb 2010 03:52:16 -0500 (EST)
- Organization: Mathematics & Statistics, Univ. of Mass./Amherst
- References: <201002151048.FAA28364@smc.vnet.net>
- Reply-to: murray at math.umass.edu
Nothing wrong there. Mathematica, like any computatational engine, is like a sewer: what you get out of it depends on what you put into it. The result 6.12323*10^(-17) + 1. i for (-1)^(1/2.) does not surprise me in the least. It just seems to be numerical garbage due to the limitations of finite precision. If you Chop the result, you'll get something closer to what you doubtless expected: (-1)^(1/2.) // Chop 1. I As an experiment, try, say: (-1)^(1/2.`20) On 2/15/2010 5:48 AM, Legendre wrote: > Hi, > > I tried the expression (-1)^(1/2.) on Mathematica 7.0, I got 6.12323*10^(-17) + 1. i. By using //N there is no problem. But using 2. it gives a wrong answer. > > Sinan > -- Murray Eisenberg murray at math.umass.edu Mathematics & Statistics Dept. Lederle Graduate Research Tower phone 413 549-1020 (H) University of Massachusetts 413 545-2859 (W) 710 North Pleasant Street fax 413 545-1801 Amherst, MA 01003-9305
- References:
- (-1)^(1/2.) on Mathematica!
- From: Legendre <sinankapcak@gmail.com>
- (-1)^(1/2.) on Mathematica!