On Oct 30, 2008, at 5:21 PM, Bertram Felgenhauer wrote:
George Pollard wrote:
There's also the ieee-utils package, which provides an IEEE monad
with
`setRound`:
http://hackage.haskell.org/packages/archive/ieee-utils/0.4.0/doc/
html/Numeric-IEEE-RoundMode.html
When run with +RTS -N2 -R
George Pollard wrote:
> There's also the ieee-utils package, which provides an IEEE monad with
> `setRound`:
>
> http://hackage.haskell.org/packages/archive/ieee-utils/0.4.0/doc/html/Numeric-IEEE-RoundMode.html
Hmm, this does not work well with the threaded RTS:
> import Numeric.IEEE.Monad
> imp
There's also the ieee-utils package, which provides an IEEE monad with
`setRound`:
http://hackage.haskell.org/packages/archive/ieee-utils/0.4.0/doc/html/Numeric-IEEE-RoundMode.html
signature.asc
Description: This is a digitally signed message part
___
Let me offer another suggestion which I think can be
fitted into Haskell quite well. For the applications
of rounding choice that I'm aware of, you want to
choose when you write the code, not when you run it.
This was actually reflected in the design of a real
machine: the DEC Alpha. Floating p
I agree that the name is not the most descriptive one, and perhaps we
should have the more descriptive ones.
But when I hear "round", I assume it's the kind of rounding Haskell
does. And I assumed this before Haskell came about.
On Tue, Oct 28, 2008 at 6:07 PM, Bart Massey <[EMAIL PROTECTED]> wro
Bart Massey wrote:
Peter Gavin gmail.com> writes:
The reason for doing it this way is that e.g. 2.5 is
exactly between 2 and 3, and rounding *up* every time
would cause an uneven bias toward 3. To counteract that
effect, rounding to the nearest even integer is used,
which causes the half of th
On Tue, Oct 28, 2008 at 04:07:12PM +, Bart Massey wrote:
> I'm just saying that the name "round" is unfortunate, since
> there's no single universally accepted mathematical
> definition for it. For this reason many programming
> languages either don't provide it or provide a different
> version
Lennart Augustsson augustsson.net> writes:
> On Mon, Oct 27 2008, Bart Massey cs.pdx.edu> wrote:
> > I think given that the Haskell 98 Report is pretty
> > explicit about the behavior of round, we're stuck with
> > it, but I don't like it. It's yet another tiny
> > impediment to Haskell newbies,
On Mon, Oct 27, 2008 at 6:15 PM, Bart Massey <[EMAIL PROTECTED]> wrote:
> BTW, in case anyone is unclear, IEEE 854 supports a large
> variety of required and optional rounding modes; it takes no
> strong position on a "correct" rounding strategy. In
> particular, round-up ("round-half-up") and roun
You're assuming newbies from a bad educational system that hasn't
taught them how to round properly. :)
-- Lennart
On Mon, Oct 27, 2008 at 10:15 PM, Bart Massey <[EMAIL PROTECTED]> wrote:
> I think given that the Haskell 98 Report is pretty explicit
> about the behavior of round, we're stuck wi
Daniel Fischer <[EMAIL PROTECTED]> wrote:
> Am Montag, 27. Oktober 2008 13:34 schrieb Achim Schneider:
> > >
> > > Who does such horrible things?
> > > Repeat after me: 1 is NOT a prime. Never, under no circumstances.
> >
> > Then chase it out of your prime factor products. You'd be the first
> >
On 2008-10-27, Bart Massey <[EMAIL PROTECTED]> wrote:
> Peter Gavin gmail.com> writes:
>> The reason for doing it this way is that e.g. 2.5 is
>> exactly between 2 and 3, and rounding *up* every time
>> would cause an uneven bias toward 3. To counteract that
>> effect, rounding to the nearest eve
Peter Gavin gmail.com> writes:
> The reason for doing it this way is that e.g. 2.5 is
> exactly between 2 and 3, and rounding *up* every time
> would cause an uneven bias toward 3. To counteract that
> effect, rounding to the nearest even integer is used,
> which causes the half of the x.5 values
G'day all.
Quoting Daniel Fischer <[EMAIL PROTECTED]>:
Who does such horrible things?
Repeat after me: 1 is NOT a prime. Never, under no circumstances.
The definition of "prime" is well-understood standard terminology, but
that doesn't escape the fact that it's arbitrary and human-defined.
I
>>> 2.4x -> x
>> That's supposed to be 2.4x -> 2, of course.
> Ah, damn it. I was hoping for a long discussion on just what math
> would look like with rounding like that ;-)
I think it has a name... "modulo" maybe?
Stefan
___
Haskell-Cafe m
But you shouldn't use the "common round function", you should use the
Haskell round function.
That's the one that is mathematically better and has hardware support.
On Mon, Oct 27, 2008 at 2:05 PM, L.Guo <[EMAIL PROTECTED]> wrote:
> Thank you all for instructions.
>
> I am not the same education r
Am Montag, 27. Oktober 2008 13:34 schrieb Achim Schneider:
> >
> > Who does such horrible things?
> > Repeat after me: 1 is NOT a prime. Never, under no circumstances.
>
> Then chase it out of your prime factor products. You'd be the first one
> to break a monoid and locate unsafeCalculate#.
Huh?
"Felipe Lessa" <[EMAIL PROTECTED]> wrote:
> On Mon, Oct 27, 2008 at 10:20 AM, Achim Schneider <[EMAIL PROTECTED]>
> wrote:
> > Hmmm... I'm wondering whether there's a standard C way to set the
> > rounding direction.
>
> nearbyint() and rint() may be used, and the rounding mode can be set
> by fe
Daniel Fischer <[EMAIL PROTECTED]> wrote:
> Am Montag, 27. Oktober 2008 12:35 schrieb Achim Schneider:
> > Daniel Fischer <[EMAIL PROTECTED]> wrote:
> > > Am Montag, 27. Oktober 2008 11:46 schrieb Henning Thielemann:
> > > > I also know a didact which tells teachers that 1 has no prime
> > > > dec
On Mon, Oct 27, 2008 at 10:20 AM, Achim Schneider <[EMAIL PROTECTED]> wrote:
> Hmmm... I'm wondering whether there's a standard C way to set the
> rounding direction.
nearbyint() and rint() may be used, and the rounding mode can be set
by fesetround(). IIRC, this is C99.
--
Felipe.
_
Henning Thielemann <[EMAIL PROTECTED]> wrote:
>
> On Mon, 27 Oct 2008, L.Guo wrote:
>
> > And then, in haskell, is that means, I have to use 'floor . (.5+)'
> > instead of 'round' to get the common round function ?
>
> That's certainly the best to do.
>
Hmmm... I'm wondering whether there's a
On Mon, 27 Oct 2008, L.Guo wrote:
And then, in haskell, is that means, I have to use 'floor . (.5+)'
instead of 'round' to get the common round function ?
That's certainly the best to do.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http:/
Thank you all for instructions.
I am not the same education route with you, so i just heard round-to-even for
the very first time.
Now I understand why it exists in theory.
And then, in haskell, is that means, I have to use 'floor . (.5+)' instead of
'round' to get the common round function ?
Am Montag, 27. Oktober 2008 12:35 schrieb Achim Schneider:
> Daniel Fischer <[EMAIL PROTECTED]> wrote:
> > Am Montag, 27. Oktober 2008 11:46 schrieb Henning Thielemann:
> > > I also know a didact which tells teachers that 1 has no prime
> > > decomposition. Oh, I see, she may have copied that from
Daniel Fischer <[EMAIL PROTECTED]> wrote:
> Am Montag, 27. Oktober 2008 11:46 schrieb Henning Thielemann:
>
> > I also know a didact which tells teachers that 1 has no prime
> > decomposition. Oh, I see, she may have copied that from Wikipedia:
> > http://en.wikipedia.org/wiki/Prime_factorisat
"L.Guo" <[EMAIL PROTECTED]> wrote:
> "round x returns the nearest integer to x, the even integer if x is
> equidistant between two integers."
>
>
> Is there any explanation about that ?
>
Yes. math.h, rint() and IEEE.
The Right Way(tm) to round is rounding every other n.5 into a different
dire
26 matches
Mail list logo