Re: complex numbers



In sci.physics.relativity, Dirk Van de moortel
<dirkvandemoortel@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
wrote
on Mon, 13 Jun 2005 13:36:53 GMT
<VZfre.119624$ia5.6770755@xxxxxxxxxxxxxxxxxxxxx>:
>
> "N:dlzc D:aol T:com (dlzc)" <N: dlzc1 D:cox T:net@xxxxxxxxxx> wrote in message news:uLfre.7177$7s.91@xxxxxxxxxxxxx
>> Dear jem:
>>
>> "jem" <xxx@xxxxxxx> wrote in message
>> news:FVere.91014$sy6.84187@xxxxxxxxxxxxx
>> > The TimeLord wrote:
>> ...
>> >> You can see that unless you keep straight just what
>> >> the square root is defined to be,
>> >
>> > Sqrt() is defined to be a function so e.g. Sqrt(1) = 1,
>> > not +-1, and of course i^2 = -1, not +-1.
>>
>> sqrt() may be defined by programming languages to be "the
>> positive square root", allowing the programmer to assign whatever
>> sign(s) the programmer chooses. But the result of the square
>> root is bivalued
>
> Well, point me to *one* single technical or engineering
> publication or text in the world where they have an equation
> where they mean anything other than 3 when they write sqrt(9),
> and you are in business.
> sqrt is the positive root of a positive number.
>
>> (except for sqrt(0) ). sqrt(-1) is the
>> conundrum, i^2 is the solution.
>
> There is no such thing as sqrt(-1).
> sqrt(-1) is for bad enceclopedias.

It may depend on the language and the environment.
GP/PARI has no problem with it, for example:

$ gp
....
? sqrt(-1)
%1 = 1.000000000000000000000000000*I
?

I suspect Mathematica has similar capabilities but I don't have a copy.

But that's a bit of a special case, and is easily programmed around:

function csqrt(real r)
{
if(r >= 0) return rsqrt(r);
else return i * rsqrt(-r);
}

where 'rsqrt' is a hypothetical function that computes the positive
square root of a positive real number, and 'csqrt' is the function
one wishes to define, and 'i' is some sort of marker token.

It gets more complicated if one wants to take the square root of
a complex number but that can be reduced as well, if one can get
Re(z) and Im(z). It basically amounts to solving the equation

(a+bi)(a+bi) = z
or
a^2-b^2+2abi = z

for a and b, which becomes the system

a^2-b^2 = Re(z)
2ab = Im(z)

One can then take b = Im(z)/(2a) and continue, except for
some special cases.

>
>> And note that +/-i *is* a
>> solution, and valid result.
>
> Bot i and -i are things that give -1 when squared. You can
> safely forget everything else.
>
> Dirk Vdm
>
>


--
#191, ewill3@xxxxxxxxxxxxx
It's still legal to go .sigless.
.



Relevant Pages

  • Re: complex numbers
    ... "Dirk Van de moortel" ... >> signthe programmer chooses. ... > sqrt is the positive root of a positive number. ... We have chosen the negative sign of the square root in equation ...
    (sci.physics.relativity)
  • Re: complex numbers
    ... >>> You can see that unless you keep straight just what ... > positive square root", allowing the programmer to assign whatever ... > signthe programmer chooses. ... sqrt is the positive root of a positive number. ...
    (sci.physics.relativity)
  • Re: complex numbers
    ... sqrtmay be defined by programming languages to be "the positive square root", allowing the programmer to assign whatever signthe programmer chooses. ...
    (sci.physics.relativity)
  • Re: complex numbers
    ... >> You can see that unless you keep straight just what ... sqrt() may be defined by programming languages to be "the ... positive square root", allowing the programmer to assign whatever ... signthe programmer chooses. ...
    (sci.physics.relativity)
  • Re: Writing text at an angle on a VB Form
    ... >Programming languages, on the other hand, can be used to perform almost ... programmer, but some smaller things are best done oneself rather than ... >All True Type fonts can be displayed at any angle you wish (both on the ... >display and on the printer). ...
    (comp.lang.basic.visual.misc)

Loading