Talk:Real

From Valve Developer Community
Jump to: navigation, search

The downside to using reals is that real variables use more space than integer variables

This is not strictly true. A float is usually the same size as an int (usually 32 bits), and a double is usually twice that size and the same size as a long, though of course actual sizes are not guaranteed. The real downside to using floating-point variables is that rounding errors can make them inaccurate, which means testing a floating-point variable for strict equality with something else (either floating-point or integral) is a bad idea. —MightyMooquack 22:48, 14 Jul 2005 (PDT)


Is there any reason this is a stub? It seams pretty much complete to me--Pon 05:54, 6 Aug 2005 (PDT)

I think this page could use some help, for numbers with no decimal part (to quote the article "health") I really don't see the argument that float would be better than an int. And the part about higher accuracy is actually a bit misleading considering natural rounding errors -- InvaderZim