Re: Singles to Doubles



Steve Gerrard wrote:
"dpb" <none@xxxxxxx> wrote in message news:f7l31j$a0t$1@xxxxxxxxxxx
Steve Gerrard wrote:
"Karl E. Peterson" <karl@xxxxxxxx> wrote in message news:erLwZ2IyHHA.5888@xxxxxxxxxxxxxxxxxxxxxxx
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.
...snip example code...
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... :)

--

--

.



Relevant Pages

  • Re: How do you keep track of what all the numbers mean?
    ... that if you develop a floating point representation of a system, ... but I would suspect that scaling constants is a main part of it. ... There will be an assumed scaling between the floating point ... will depend upon the input signal power. ...
    (comp.dsp)
  • Re: Rounding of the double
    ... John von Neumann suggested that only fixed-point integers should be used because floating ... If you choose your representation as double, then you have to live with the consequences. ... you can never get precision in any computation on a computer than involves ... MVP Tips:http://www.flounder.com/mvp_tips.htm- Hide quoted text - ...
    (microsoft.public.vc.mfc)
  • Re: This calculation is just wrong / computer cant count!
    ... we have is the binary representation of the computer. ... your delusional system of mathematics, one based on a decimal arithmetic model, is ... "ignore" any aspect of floating point precision. ... "I do not wish to deal with the inherent inaccuracy of double precision floating point. ...
    (microsoft.public.vc.mfc)
  • Re: Gentler Decimal Floating-Point
    ... effectively change the radix of a decimal floating point ... under the heading "Logarithms all the time", ... logarithmic representation of numbers to be made workable for all the ... The middle digits are shifted only when the exponent, ...
    (comp.arch.arithmetic)
  • Re: How do you keep track of what all the numbers mean?
    ... that if you develop a floating point representation of a system, ... but I would suspect that scaling constants is a main part of it. ... There will be an assumed scaling between the floating point ... So, in my LMS equalizer example, if my floating point equalizer input ...
    (comp.dsp)

Loading