On 2/13/06, J. Garrett Morris <[EMAIL PROTECTED]> wrote: > I think the function you're looking for is: > > myRound n places = round (n / fromIntegral factor) * factor > where factor = 10 ^ (places - 1) >
This gives: *Main> myRound 123123.123 2 123120 Whereas my (revised) version gives *Main> myround 123123.123 2 120000.0 I may be wrong, but I think it's this latter result he's looking for(?). /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
