> 6. There may be more flags than we need. For integer division by > zero we can use the overflow, since that's the only way a division can > be out of range. For floating point division by zero, infinity seems > like a natural choice, but I recall there was some discussion on the > list some time ago about special requirement for the Inf and NaN > semantics for rendering so I'm not sure whether we need to differentiate > Inf and zero division for float.
For signed integer division, dividing the most negative value by minus one will cause overflow. However as per previous discussions it's unclear whether integer division is a worthwhile feature. For FP operations then there are well defined conventions for NAN/Inf handling (a.k.a. IEEE 754). I strongly recommend either follow that, or not support NaN/Inf at all. In the latter case you typically saturate +-Inf and convert NaN to zero. There are some algorithms where NaNs are useful, but I'm pretty sure graphics isn't one of them. Paul _______________________________________________ Open-graphics mailing list [email protected] http://lists.duskglow.com/mailman/listinfo/open-graphics List service provided by Duskglow Consulting, LLC (www.duskglow.com)
