MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: (-1)^(1/2.) on Mathematica!

  • To: mathgroup at smc.vnet.net
  • Subject: [mg107543] Re: [mg107518] (-1)^(1/2.) on Mathematica!
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Tue, 16 Feb 2010 03:54:26 -0500 (EST)
  • Reply-to: hanlonr at cox.net

If you want exact results use exact numbers

Sqrt[-1]

I

(-1)^(1/2)

I

(-1)^Rationalize[(1/2.)]

I

Or clean up afterwards

(-1)^(1/2.) // Chop // Rationalize

I


Bob Hanlon

---- Legendre <sinankapcak at gmail.com> 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




  • Prev by Date: Re: (-1)^(1/2.) on Mathematica!
  • Next by Date: Re: NDSolve with Dirichlet boundary condition
  • Previous by thread: Re: (-1)^(1/2.) on Mathematica!
  • Next by thread: need help determined time to travel a path