[Bf-committers] UI float subtraction leads to predictable decimal garbage

Lyndon Tremblay bf-committers@blender.org
Tue, 28 Oct 2003 17:57:16 -0800


There is a problem with floats in the scroller UI control.
Starting with an input number, "0.00"
Scrolling all the way to +10000 (this was tested in the Logic window, on a 
float property),
  the slower you scroll this number back to 0, the more the fraction 
increases.
Playing this game for several seconds leads to something like: 
"120.11289978",
  displayed to the terminal with a custom print function.
  (Displayed as "120.11" in the control).

It seems to be a problem with subtraction, perhaps during compile.
If anything it will be a compiler flag that should be avoided. (like 
-ffast-math).

--Humasect

_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*   
http://join.msn.com/?page=features/junkmail