On Sun, 3 Jun 2007, bretm wrote:
I just got started learning Haskell a few days ago. I've implemented a
numeric data type that can represent some irrational numbers exactly, and
I'd like to instantiate the RealFrac class so I can do truncate, round,
etc., in the most natural way in the
Awesomely complete response. Thank you.
Henning Thielemann wrote:
There are several things that are inconvenient in the numeric part of
Haskell 98 Prelude. As always I suggest a look at alternative numeric
class hierarchies, like NumericPrelude:
DavidA-2 wrote:
Yes, I'm afraid that you are understanding correctly. Annoying isn't it.
It is well-known (among Haskell mathematicians at least) that the numeric
type
classes in the prelude are broken.
Here's one proposal for a small step in the right direction:
On Mon, 4 Jun 2007, bretm wrote:
Henning Thielemann wrote:
Is your approach more like symbolic calculation or more like a
representation for computable reals?
http://www.haskell.org/haskellwiki/Applications_and_libraries/Mathematics#Number_representations
Computable reals,
I just got started learning Haskell a few days ago. I've implemented a
numeric data type that can represent some irrational numbers exactly, and
I'd like to instantiate the RealFrac class so I can do truncate, round,
etc., in the most natural way in the language.
Implementing properFraction