Re: [Haskell-cafe] Set of reals...?

29 Oct
2004
29 Oct
'04
8:31 a.m.
Keith Wansbrough wrote:
Which brings me to a question: is there a better way to write -inf and +inf in Haskell than "-1/0" and "1/0"?
Why not do it with types: data InfDbl = Dbl Double | PositiveInfinity | NegativeInfinity Keean.

29 Oct
29 Oct
8:42 a.m.
New subject: Set of reals...?
Keith Wansbrough wrote:
Which brings me to a question: is there a better way to write -inf and +inf in Haskell than "-1/0" and "1/0"?
Why not do it with types:
data InfDbl = Dbl Double | PositiveInfinity | NegativeInfinity
?
Double already has +Inf and -Inf; it's just that Haskell doesn't have
(AFAIK) syntax to write them as constants.
--KW 8-)
--
Keith Wansbrough
7508
Age (days ago)
7508
Last active (days ago)
1 comments
2 participants
participants (2)
-
Keith Wansbrough
-
MR K P SCHUPKE