[chuck-users] Integer divisions
Hans Aberg
haberg at math.su.se
Tue Dec 15 07:11:53 EST 2009
On 15 Dec 2009, at 12:07, Stefan Blixt wrote:
> I don't know... isn't this how most of the curly bracket languages
> work?
It is really the C legacy. Typical of C is having a lot of implicit
conversion, also when loosing data.
In Haskell, or at least running interactively in Hugs, "/" on integers
are treated as floats. I figure if one enforces the numbers to be Int
(int) or Integer (multiprecision integer), then the result must be
Rational - multiprecision rational numbers.
> Might as well keep ChucK in line with the other languages. Btw,
> shouldn't it be the same as this:
>
> [Interval.r(1), Interval.r(1), Interval.r(1), Interval.r(1)]
Yes, I was thinking about cents :-), that is the trivial interval.
Hans
More information about the chuck-users
mailing list