[EMAIL PROTECTED] wrote:
> > I agree with what you said,
> > but I think you may have missed my point.
>
> Sounds likely on both counts.
Probably. I get confused a lot. :)
> So now I have to say ...
>
>denominator $ fromInteger (floor (23 % 45))
>
> Is this the same malarkey that you are
> I agree with what you said,
> but I think you may have missed my point.
Sounds likely on both counts.
The same thing annoys me, but my work is in exact or symbolic:
-- I don't claim this is a practical example
-- I'm just saying that it is logically plausible
denominator 2 % 3 == 3
[EMAIL PROTECTED] wrote:
> Basically, from the algebraic perspective, the float type is
> a messy fudge, and does not fit in nicely with any of the
> "pure" types. In general the containment
I agree with what you said, but I think you may have missed my point.
In numeric programming, at least wha
I just fluffed the To: field in the header, so my previous
message was bounced, I'm resending this ... sorry if it
turns up twice. (I also took the opportunity to make an addendum).
Yo,
> Haskell Integers are not a proper subset of Haskell Floats or
> Doubles. Haskell does not support real
G'day all.
On Mon, Mar 03, 2003 at 12:10:28PM -0500, Matthew Donadio wrote:
> This is my biggest gripe with Haskell, at least for what I do. The
> numeric class system is good, but it assumes that the sub-classes are
> distict, where in fact integers are a proper subset of reals, which
> are a p
"Matthew Donadio" <[EMAIL PROTECTED]> writes:
>> Thank does sound like a pain, but it's better than putting fromIntegral
>> all over my code. Why can't Haskell unify a an expected float with an
>> infered int? It seems that this would make life alot easier.
Personally, I think that one of the thi
>Thank does sound like a pain, but it's better than putting fromIntegral
>all over my code. Why can't Haskell unify a an expected float with an
>infered int? It seems that this would make life alot easier.
This is my biggest gripe with Haskell, at least for what I do. The numeric class
system is
Thank does sound like a pain, but it's better than putting fromIntegral
all over my code. Why can't Haskell unify a an expected float with an
infered int? It seems that this would make life alot easier.
-mike
On Sun, Mar 02, 2003 at 11:28:00AM +, Jorge Adriano wrote:
>
> > "Mike T. Machenry"
"Mike T. Machenry" <[EMAIL PROTECTED]> writes:
> I am having a problem. I recently desided I wanted a bunch function to return
> float instead of Int. I changed their type and wrote a new function that
> returned a float. I figured it'd be okay if all the others still returned
> Int since it's t
> "Mike T. Machenry" <[EMAIL PROTECTED]> writes:
> > I recently desided I wanted a bunch function to return
> > float instead of Int. [...] I found fromInteger but it
> > didn't seem to work on the return value of the cardinality
> > function for instance.
>
> Try fromIntegral, which works for Int
"Mike T. Machenry" <[EMAIL PROTECTED]> writes:
> I recently desided I wanted a bunch function to return
> float instead of Int. [...] I found fromInteger but it
> didn't seem to work on the return value of the cardinality
> function for instance.
Try fromIntegral, which works for Int and Integer,
Hello,
[snip]
Try
intToFloat :: Int -> Float
intToFloat n = fromInteger (toInteger n)
[snip]
Use the Prelude function realToFrac.
it sometimes happens to me that I must spend some time browsing
prelude to devise somethink like this; it might be useful to have
a library for this, that would defin
Use the Prelude function realToFrac.
-- Lennart
Mike T. Machenry wrote:
Hello,
I am having a problem. I recently desided I wanted a bunch function to return
float instead of Int. I changed their type and wrote a new function that
returned a float. I figured it'd be okay if all the others st
Try
intToFloat :: Int -> Float
intToFloat n = fromInteger (toInteger n)
-W-M-
@ @
|
\_/
On Fri, 28 Feb 2003, Mike T. Machenry wrote:
> Hello,
>
> I am having a problem. I recently desided I wanted a bunch function to return
> float instead of Int. I changed their type and wro
Hello,
I am having a problem. I recently desided I wanted a bunch function to return
float instead of Int. I changed their type and wrote a new function that
returned a float. I figured it'd be okay if all the others still returned
Int since it's trivial to convert Int to Float. Sadly Haskell wo
15 matches
Mail list logo