Revamping the numeric classes

Marcin 'Qrczak' Kowalczyk qrczak@knm.org.pl
8 Feb 2001 20:30:31 GMT


Thu, 08 Feb 2001 11:24:49 +0000, Jerzy Karczmarczuk <karczma@info.unicaen.fr> pisze:

> The implicit coercion of numeric constants: 3.14 -=->>  (fromDouble
> 3.14) etc. is sick.

What do you propose instead?

(BTW, it's fromRational, to keep arbitrarily large precision.)

> Now, signum and abs seem to be quite distincts beasts. Signum seem
> to require Ord (and a generic zero...).

Signum doesn't require Ord.
    signum z = z / abs z
for complex numbers.

-- 
 __("<  Marcin Kowalczyk * qrczak@knm.org.pl http://qrczak.ids.net.pl/
 \__/
  ^^                      SYGNATURA ZASTĘPCZA
QRCZAK