Re: Float comparison
- From: Keith Thompson <kst-u@xxxxxxx>
- Date: Tue, 12 May 2009 11:04:59 -0700
Beej Jorgensen <beej@xxxxxxx> writes:
Keith Thompson <kst-u@xxxxxxx> wrote:
Beej Jorgensen <beej@xxxxxxx> writes:
Keith Thompson <kst-u@xxxxxxx> wrote:
The model, at least if you look at just those two paragraphs
[5.2.4.2.2p1-2], defines a mapping from floating-point values to real
values, not vice versa.
Hey, Keith--sorry to bring this back up, but I'm not following exactly
what you mean here. Can I not take the digits of a real number and use
the model to construct a floating point number?
Not in general, no, but it depends on what kind of mapping you're
looking for.
It was the "in general" part that I was missing from the previous post.
It seems to me the standard does define a mapping from *representable*
reals to floating point values, yes? (Via The Model.)
Sure. Well, it does so implicitly. The Model defines a mapping that
specifies, for each FP value, what its real value is. You can
trivially invert that mapping to get a mapping from a subset of the
reals to FP values. INAIAU.
--
Keith Thompson (The_Other_Keith) kst-u@xxxxxxx <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
.
- Follow-Ups:
- Re: Float comparison
- From: Richard Heathfield
- Re: Float comparison
- From: Spiros Bousbouras
- Re: Float comparison
- References:
- Re: Float comparison
- From: Keith Thompson
- Re: Float comparison
- From: Beej Jorgensen
- Re: Float comparison
- From: Keith Thompson
- Re: Float comparison
- From: Beej Jorgensen
- Re: Float comparison
- Prev by Date: Re: When shorts are longer than longs !
- Next by Date: Re: When shorts are longer than longs !
- Previous by thread: Re: Float comparison
- Next by thread: Re: Float comparison
- Index(es):
Relevant Pages
|