HaloO,

I realized from the typed literal thread that S03 now explicitly states
that div on two Ints returns a Rat. I remember the state of affairs
being that it returns an Int that adheres to the division of an Int $y
by another Int $x such that

     $y == ($y div $x) * $x + ($y mod $x)

holds with floor semantics as the default. This is now not the case
anymore. Why?

Isn't the special handling of integer division by infix:</> enough?
There the result becomes a Num only if needed such that it preserves
precision as long as possible. Question: does such a 'Num but Rat' type
dispatch to the Rat versions of operators?

Regards, TSa.
--

"The unavoidable price of reliability is simplicity" -- C.A.R. Hoare
"Simplicity does not precede complexity, but follows it." -- A.J. Perlis
1 + 2 + 3 + 4 + ... = -1/12  -- Srinivasa Ramanujan

Reply via email to