15 Dec
2009
15 Dec
'09
5:29 a.m.
I find the integer divisions C rule is problematic when working with intervals. Suppose I have [8/7, 7/6, 7/6, 8/7] and implement it as [Interval.r(8/7), Interval.r(7/6), Interval.r(7/6), Interval.r(8/7)] Then this is the same as: [Interval.r(0), Interval.r(0), Interval.r(0), Interval.r(0)] One has to add ".0" one of the numerator/denominator: [Interval.r(8.0/7), Interval.r(7.0/6), Interval.r(7.0/6), Interval.r(8.0/7)], One possible rule might be converting 32-bit int to 64-bit floats, and then only back to int when needed. The question if it then affects some ChucK legacy code. Hans