On Mon, Oct 5, 2009 at 11:02 AM, Sönke Hahn sh...@cs.tu-berlin.de wrote:
On 5 Oct 2009, at 21:06, Lennart Augustsson wrote:
OK, just pairs have no arithmetic, but one way of defining
arithmetic is to treat the pairs as complex numbers. Or as mantissa
and exponent. Or as something
On Mon, 5 Oct 2009, Jason Dagit wrote:
2. How can i use numeric literals to construct values, whose types are not
in
the Num class?
Numeric literals are treated as Integer or Rational, and are then
converted with the function fromInteger or fromRational, respectively, to
the required type.
Hi,
On Tue, Oct 6, 2009 at 2:37 AM, Henning Thielemann
lemm...@henning-thielemann.de wrote:
Numeric literals are treated as Integer or Rational, and are then converted
with the function fromInteger or fromRational, respectively, to the required
type. Whatever fromInteger function is in scope,
L.A. says:
complex numbers are just pairs of numbers.
Later :
Being a number is in the eye of the beholder. :)
Now, the readers of this forum will with horror witness a
discussion about the meaning of the word just...
American people will call it a discussion about semantics, and
we,
jerzy.karczmarc...@info.unicaen.fr wrote:
American people will call it a discussion about semantics, and
we, European will not understand why this word is used in a pejorative
context...
Semantics *should* be a pejorative word unless it refers to something
formally specified, and preferably
Just pairs have no natural arithmetic upon them.
Exactly my point.
BTW. the missing term of M.M. is DUAL NUMBERS.
Remembered this already. Thanks anyway.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
OK, just pairs have no arithmetic, but one way of defining
arithmetic is to treat the pairs as complex numbers. Or as mantissa
and exponent. Or as something else. So there's nothing wrong, IMO,
to make pairs an instance of Num if you so desire. (Though I'd
probably introduce a new type.)
On
And I agree that sometimes it can be suitable.
But simply defining an instance of Num without a single word on the
problem one
is trying to solve is not just pointless. It's something that should
not be done.
On 5 Oct 2009, at 21:06, Lennart Augustsson wrote:
OK, just pairs have no
On 5 Oct 2009, at 21:06, Lennart Augustsson wrote:
OK, just pairs have no arithmetic, but one way of defining
arithmetic is to treat the pairs as complex numbers. Or as mantissa
and exponent. Or as something else. So there's nothing wrong, IMO,
to make pairs an instance of Num if you