Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Is it true that it's impossible to put square roots in cog?
Is it true that it's impossible to put square roots in cog?
2001-06-17, 5:31 AM #1
Is it true that it's impossible to put square roots in cogs?

------------------
"...and may the Force be with you."
-Luke Skywalker

Dark Luke, known for dressed like Vader (But no helmets and computer stuffs on), ignites his green lightsaber, ready to fight against evil and defend the light side.

Zone name: WD_Deedlit
Jedi vs. Sith - Dark Luke's Jedi Knight web site: Informations, addons, etc.
(Draws his undead great sword out, and with a variety of magical spells, gets ready to fight.

Music composer (presented as Undead Knight and maker of JK SP projects - download soundtrack of Dark Emperor 2 here!

Jedi vs. Sith - Dark Luke's Jedi Knight web site: Informations, addons, etc.
2001-06-17, 5:33 AM #2
That's true.
2001-06-17, 6:32 AM #3
You could use the Heron method.
more at
http://www.seanet.com/~ksbrown/kmath190.htm

It's easy to program, but I dunno if its possible in cog, but I think it should.
--
You are all just jealous because you can't hear the small voices!!
2001-06-17, 6:40 AM #4
here's the method programmed in pascal.. just translate and you're set


program heron;
uses crt;
var
zahl, wurzel,x,y,hilfe:extended;
begin
clrscr;
writeln("Number");readln(zahl);
y:=1;
wurzel:=zahl;
if zahl<1 then
begin
hilfe:=zahl;
zahl:=y;
y:=hilfe;
end;
while wurzel > <+0.0000000001 do
begin
wurzel:=(wurzel+y)/2;
y:=zahl/wurzel;
end;
writeln(wurzel);
end.
--
You are all just jealous because you can't hear the small voices!!
2001-06-17, 6:42 AM #5
that one line should read
while wurzel > y+0.00000001 do
--
You are all just jealous because you can't hear the small voices!!
2001-06-17, 7:12 AM #6
Sorry, I meant there is no specific verb for it.
2001-06-17, 10:17 PM #7
Yes I have a cog that will do square roots ... I'll give it to you soon.
2001-06-18, 6:25 AM #8
Well since I've learned about the existance of VectorLen(thing) I don't need the square root thing anymore (It was intended to find the speed of player moving)

------------------
"...and may the Force be with you."
-Luke Skywalker

Dark Luke, known for dressed like Vader (But no helmets and computer stuffs on), ignites his green lightsaber, ready to fight against evil and defend the light side.

Zone name: WD_Deedlit
Jedi vs. Sith - Dark Luke's Jedi Knight web site: Informations, addons, etc.
(Draws his undead great sword out, and with a variety of magical spells, gets ready to fight.

Music composer (presented as Undead Knight and maker of JK SP projects - download soundtrack of Dark Emperor 2 here!

Jedi vs. Sith - Dark Luke's Jedi Knight web site: Informations, addons, etc.

↑ Up to the top!