Search the web
Sign In
New User? Sign Up
gbadev
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Sqaure Root   Message List  
Reply | Forward Message #3070 of 15019 |
Anyone know the performance of the BIOS Sqrt() call (typical clock cycles)?
I assume this would already be the worlds fastest ARM Square Root. I am
trying to avoid doing Sqrt but there may be no choice...

Cheers,
Jack




Wed May 2, 2001 12:43 pm

jack.ukleja@...
Send Email Send Email

Forward
Message #3070 of 15019 |
Expand Messages Author Sort by Date

Anyone know the performance of the BIOS Sqrt() call (typical clock cycles)? I assume this would already be the worlds fastest ARM Square Root. I am trying to...
Jack Ukleja
jack.ukleja@...
Send Email
May 2, 2001
1:34 pm

well you could always to a tablebased one that'd be even faster (but with less precision as usual) / jonas ... From: Jack Ukleja To: gbadev@yahoogroups.com ...
Jonas Lund
jonas.lund@...
Send Email
May 2, 2001
3:12 pm

The following URL is an interesting presentation of ARM square root code. http://www.finesse.demon.co.uk/steven/sqrt.html Cheers A -- _ _ _| _ _ _| _...
Andrew Davie
adavie@...
Send Email
May 2, 2001
3:15 pm

If you do end up using the BIOS square root, don't test it on IGBA as it seems not to emulate the real thing completely accurately. Well, I may be wrong but...
Tom Prosser
tom@...
Send Email
May 2, 2001
4:44 pm

You can be almost sure, that most emus will fake the system calls, which of course makes the cycle count very inccurate. ... From: Tom Prosser To:...
Eloist
Eloist@...
Send Email
May 3, 2001
9:22 pm

I wasn't bothered about the cycle count, I just found that my enemy AI doesn't work at all on IGBA, and can only guess that it's because the square root call...
Tom Prosser
tom@...
Send Email
May 3, 2001
11:49 pm

why on earth would you be using a squareroot in your AI ?!?!? evil CPU time sucking function - avoid! :0) heh ninge ... From: Tom Prosser To:...
ninge1
ninge1@...
Send Email
May 4, 2001
7:51 am

To find the distance between two points? Always handy in AI... --Jim ... From: ninge1 <ninge1@...> To: <gbadev@yahoogroups.com> Sent: Friday, May 04,...
James Boulton
jim@...
Send Email
May 4, 2001
8:40 am

In message <003601c0d475$9aa06940$0500a8c0@jimlaptop> ... For most AI purposes you can work perfectly well with an approximation like the following: in: r0,r1...
Dennis Ranke
exoticorn@...
Send Email
May 4, 2001
8:49 am

Ok, but surely there is no need at all to use the suareroot of that value? whats wrong with just doing your distance checking using the squared value? it'll be...
ninge1
ninge1@...
Send Email
May 4, 2001
8:45 am

... And for most purposes you can approximate even quicker than that. Something like largest(x, y) + smallest(x, y) >> 1 where x = abs(dx) and y = abs(dy) In...
Alex Amsel
gba@...
Send Email
May 4, 2001
10:26 am

Hello Alex, Friday, May 04, 2001, 12:30:57 PM, you wrote: AA> Oh, where are those warez everyone keeps talking about. I want all AA> 255 roms available on the...
groepaz
groepaz@...
Send Email
May 4, 2001
10:39 am

This is true of course, but note that "finding the distance between two points" and "doing distance checking" are not necessarily one and the same.... Tom...
Tom Prosser
tom@...
Send Email
May 4, 2001
11:54 am

Well, unless you like a whole lot of jitter, I recommend using a real sqrt function for camera control. The one someone posted up here (which is the one I've...
Shawn Freeman
sfreeman@...
Send Email
May 4, 2001
2:52 pm

That trick has served me well on many 8-bit systems! It was sure close enough to do 'homing' weapons and so on. I think you can even extend it into 3D but I've...
Sean Dunlevy
sean@...
Send Email
May 4, 2001
3:43 pm

How good is the 4 cycle/bit, 70 cycle worst case ARM code routine on the page http://www.finesse.demon.co.uk/steven/sqrt.html is it really 70 cycles worst ...
Dan Phillips
Dan.P@...
Send Email
May 4, 2001
3:45 pm

RE: [gbadev] Sqaure RootFrom my tests, it's just as accurate, but doesn't run in 70 cycles :) (it does for a small enough number). But if you're doing big...
Shawn Freeman
sfreeman@...
Send Email
May 4, 2001
4:04 pm

... You can :). Fortunately the square root function is a well behaved function so approximations are easy and accurate. Just Me, *SF...
Shawn Freeman
sfreeman@...
Send Email
May 4, 2001
4:08 pm

... I used this technique too, and though I don't remember the exact formula I used (something like 3a+b, where a was the larger number), I do remember the ...
Andrew Davie
adavie@...
Send Email
May 4, 2001
4:16 pm

Does anyone know what this approximation is in 3d? is it largest(a,b,c) + middle(a,b,c)>>1 + smallest(a,b,c)>>2?...
Jack Ukleja
jack.ukleja@...
Send Email
May 7, 2001
5:15 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help