Re: Singles to Doubles
- From: dpb <none@xxxxxxx>
- Date: Wed, 18 Jul 2007 09:21:38 -0500
Steve Gerrard wrote:
"dpb" <none@xxxxxxx> wrote in message news:f7l31j$a0t$1@xxxxxxxxxxxSteve Gerrard wrote:"Karl E. Peterson" <karl@xxxxxxxx> wrote in message news:erLwZ2IyHHA.5888@xxxxxxxxxxxxxxxxxxxxxxx...snip example code...Agreed, on the whole. Working towards comparable results at the moment. May even abandon the "rounding" once we've demonstrated comparability.Here is the point I was also making elsewhere in this thread, about using the native single->double over "reparsing" the decimal version, on the grounds that conversions to double were probably taking place during the manipulations of the data.I think I would be more comfortable with D1 than D2, if I was trying to reproduce what originally happened with S.The point I was trying to make was a somewhat different one, though. Your last sentence is the one that emphasizes that difference. I've been sticking w/ the original question of trying to keep the appearance of the external data consistent with that previously output by the system. Two different objectives and depending on Karl's customers' needs/desires, either may be the right choice. It just isn't possible to tell from here which _is_ the better choice for sure, I'm thinking...
Yup. If it is a question of getting the same calculated results, you go one way; if it is a question of starting with "known" data, you go the other. I put "known" in quotes, because what we see in base 10 representation is not the same as what actually gets processed in base 2 representation.
I find it fascinating that we are naturally biased to the base 10 version of numbers, and floating point calculations force us to confront the fact that it is just one of many possible bases. What numbers really mean is slightly different from what we routinely think they mean.
Undoubtedly because we have ten fingers... :)
Floating point numbers in particular may (and often do) mean something _far_ different than what we routinely consider them to be.
There's a current thread in comp.lang.fortran on interpretation of the Standard on presentation of positive and negative zero for those systems which can differentiate. As is usual there, it has delved off into some rather far-ranging discussions... :)
--
--
.
- References:
- Singles to Doubles
- From: Karl E. Peterson
- Re: Singles to Doubles
- From: Bob Butler
- Re: Singles to Doubles
- From: Karl E. Peterson
- Re: Singles to Doubles
- From: Steve Gerrard
- Re: Singles to Doubles
- From: Karl E. Peterson
- Re: Singles to Doubles
- From: Steve Gerrard
- Re: Singles to Doubles
- From: Karl E. Peterson
- Re: Singles to Doubles
- From: Steve Gerrard
- Re: Singles to Doubles
- From: dpb
- Re: Singles to Doubles
- From: Steve Gerrard
- Singles to Doubles
- Prev by Date: Re: Singles to Doubles
- Next by Date: Re: Execute function in Visual Basic
- Previous by thread: Re: Singles to Doubles
- Next by thread: Re: Singles to Doubles
- Index(es):
Relevant Pages
|
Loading