Block-I/O in Haskell

Tomasz Zielonka t.zielonka at students.mimuw.edu.pl
Fri Oct 15 03:36:50 EDT 2004


On Fri, Oct 15, 2004 at 01:15:16AM -0400, David Menendez wrote:
> Tomasz Zielonka writes:
> > Hmmm, that's right. Perhaps it would be best to use some fixed-point
> > type with unbounded integral part, like those used for representing
> > currency, but not necessarily decimal.
> 
> I'd go with ratios. Haskell has a built-in type, and they can give you
> as many digits of precision as you need--unless you're dealing with an
> irrational timeout value.

Unfortunately, they have the unpleasant tendency that after many
operations even if the absolute value is small, the two integers that
constitute the ratio can be very big. That's why (I think) it's not that
good idea to solve linear equation systems using unbounded ratios.

Why not use typeclasses and let the user decide?

Best regards,
Tom

-- 
.signature: Too many levels of symbolic links


More information about the Libraries mailing list