Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / odd reactions-help?

Author
Message
Pixelator
17
Years of Service
User Offline
Joined: 8th Jul 2007
Location: here
Posted: 30th Aug 2007 00:21
I was just reading "A Treatise on Time" and i wanted to figure out what the square root of -1 is.
so i come downstairs and type in:

and i get
Quote: "-1.#IND"

What does that mean?

"tada, and now my sig: AND NOW MY SIG(hint hint):
sorry we seem to be experiencing technical difficulties... oh and the sig is missing."
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 30th Aug 2007 08:15
It basically means you tried to produce an undefinable number. In this case, an imaginary or complex number. Most computer languages don't handle complex numbers. If you wanted to denote such a number, sqrt(-1) is often written as i. So if you wrote a routine, you might return the value of a positive sqaure root as a string and then add the i to it to indicate that it is imaginary.

sqrt(-4) might become
complex$=str$(sqrt(4))+"i"

Enjoy your day.
Insert Name Here
18
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 30th Aug 2007 11:16 Edited at: 1st Sep 2007 01:00
There can be no square root of -1. Being as to get a suqare root you need to multiply a number by itself, and pos*pos=pos, therefore not -1, and neg*neg=pos, therefore not being -1, makes sqrt(-1) impossible to work out. Latch is right, the accepted answer is i.

Acording to Grandma, I am now enemy of the evil republic, who captured Paris Hilton and couldn't manage it.
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 31st Aug 2007 20:13 Edited at: 31st Aug 2007 20:13
isn't the square root of 1 = 1?
and square root isn't n*n that is square, you find the square root by first guessing what it is then dividing the original number by it and adjusting to the average, here's an example.

let's say we want to find the square root of 9. A computer can't guess so let's just start off with 2.
Quote: "
9/2 = 4.5
(4.5 + 2) = 6.5 /2 = 3.25

9/3.25 = 2.77
(2.77 + 3.25) = 6.02 /2 = 3.01

9/3.01 = 2.99
(2.99 + 3.01) = 6 /2 = 3

9/3 = 3
Bingo!
"


Your signature has been erased by a mod because it was rubbish.
Insert Name Here
18
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 1st Sep 2007 01:00
oops, imeant -1.

Acording to Grandma, I am now enemy of the evil republic, who captured Paris Hilton and couldn't manage it.
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 1st Sep 2007 02:11
I never understood SQRT, then I looked it up and bam! now I do
I guess that's called learning

Your signature has been erased by a mod because it was rubbish.

Login to post a reply

Server time is: 2025-06-02 06:31:59
Your offset time is: 2025-06-02 06:31:59