
29 Dec
2011
29 Dec
'11
4:49 a.m.
On Thu, Dec 29, 2011 at 00:33, Mike Meyer
So, is there a reasonable way to get the value of two Integral types divided by each other and rounded? How about one integral type and one RealFrac? I know I can get it truncated towards either 0 or negative infinity, but that's not what I want here.
You have two options: (1) use fromIntegral to coerce an Integral value to a RealFrac; (2) use (div) (division on Integrals) instead of (/). Which to use depends on what you're planning to do with the result. In this case, I'd probably use (/) and (fromIntegral). -- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms