Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Mac > Mac Programmer Help > Re: float vs. d...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 7 of 10 Topic 3779 of 3882
Post > Topic >>

Re: float vs. double

by Korchkidu <korchkidu@[EMAIL PROTECTED] > Jun 24, 2008 at 07:55 AM

> I don't know why double would be twice as fast as float, considering
> that the ASM code shows a separate instruction for +,-,*,/ for both
> floats and doubles. Perhaps the double math instructions take few
> internal processor cycles than the float instructions. In any case, my
> original conclusion still holds: I should upgrade to double.
Hi,

as far as I know, using double is normally faster than using float.
Indeed, all calculations are done using doubles internally. When you
use floats, they are first cast into doubles, then the computation is
done, and the result is cast bask into float. The only reason I see to
use float is only for memory purposes.

K.
 




 10 Posts in Topic:
float vs. double
MacRules <dodeca001@[E  2008-06-22 09:37:54 
Re: float vs. double
MacRules <dodeca001@[E  2008-06-22 19:55:39 
Re: float vs. double
Gregory Weston <uce@[E  2008-06-22 23:42:28 
Re: float vs. double
Reinder Verlinde <rein  2008-06-23 18:56:28 
Re: float vs. double
MacRules <dodeca001@[E  2008-06-23 05:31:21 
Re: float vs. double
MacRules <dodeca001@[E  2008-06-23 18:32:47 
Re: float vs. double
Korchkidu <korchkidu@[  2008-06-24 07:55:57 
Re: float vs. double
MacRules <dodeca001@[E  2008-06-24 09:39:46 
Re: float vs. double
Korchkidu <korchkidu@[  2008-06-29 08:14:36 
Re: float vs. double
glenn andreas <gandrea  2008-06-29 10:35:42 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 10:41:05 CST 2008.