Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   How slow is floating point math really? (http://www.chiefdelphi.com/forums/showthread.php?t=63997)

Nathan 13-02-2008 19:09

How slow is floating point math really?
 
We currently have a couple floating point operations in our program. Is it absolutely vital that we change these? I know that I can multiply by 100 or 1000 to get rid the the decimal point, but I'd rather not for these operations.

So what do you guys think?

Thanks,
Nathan

psy_wombats 13-02-2008 19:32

Re: How slow is floating point math really?
 
I didn't think it was speed so much as general processor weirdness with memory. I'd multiply and remove the decimal. What exactly is preventing you from doing so? Time to execute? In that case, using floating point won't speed things up at all.

Joe Ross 13-02-2008 19:51

Re: How slow is floating point math really?
 
Here are some other threads with some real data:

http://www.chiefdelphi.com/forums/sh...ad.php?t=52479
http://www.chiefdelphi.com/forums/sh...ad.php?t=63159

Besides taking more time, they also use more memory, which can cause wierd errors.

Kevin Watson 13-02-2008 20:53

Re: How slow is floating point math really?
 
Quote:

Originally Posted by Nathan (Post 698324)
We currently have a couple floating point operations in our program. Is it absolutely vital that we change these?

No, a few floating point operations per 26ms cycle generally isn't a problem.

-Kevin


All times are GMT -5. The time now is 00:54.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi