Andy Tai wrote: > Is this a bug? On a x86 PC running Ubnutu, > > fprintf(stderr, "%f\n", > CLUTTER_FIXED_TO_FLOAT(CLUTTER_FIXED_DIV(CLUTTER_INT_TO_FIXED(146), > CLUTTER_INT_TO_FIXED(182)))) ; > > > produces > > -0.601562
CLUTTER_FIXED_DIV() has very limited precision that varies depending on the arguments; it should only be used where this is not an issue. If you need better precision use CLUTTER_FIXED_QDIV() instead. Also, note that it makes no sense to use the DIV macros when the divisor is an int; if you do CLUTTER_INT_TO_FIXED(146) / 182 you will get much better precision. (Same goes for multiplication BTW.) Tomas -- To unsubscribe send a mail to [EMAIL PROTECTED]
