Re: Singles to Doubles



dpb <none@xxxxxxx> wrote:
Karl E. Peterson wrote:
dpb <none@xxxxxxx> wrote:
Karl E. Peterson wrote:
dpb <none@xxxxxxx> wrote:
...
OK, I'm lost again (sorry!). Is what you're saying this is the result
of the original code difference between direct promotion as opposed to
the indirect (in either way)? At least that's what I'm guessing it is.
It is, of course, precisely what one would expect from promoting a
single to a double.

Value1 is what it really "should" be, and is how it's imported into my program
after being exported to a text file. (Which is what led me to the CDbl(CStr())
mess.)
If so, my question is where did the Single come from and why wasn't it
Double? (You see, I'm not quite yet up to speed here). For example of
what I'm thinking (that obviously may be all wet) if you read this above
text into a Single and then promote that, if you had read it into a
Double you would have gotten full precision to start with...

I'm slinging the bytes directly. Create an array in VB, pass a pointer to its
first element to the routine I wrote that reads the entire thing, and it copies
them straight across. Too many cells to read one by one.

OK, I think I'm beginning to get the picture...I was "underneath the
impression" :) that the text export with some specified number of digits
was the only starting point. Let me see if I can restate the problem.

You have successfully read the existing single precision data directly
in binary format but want instead of continuing to save these data in
single precision, promote them to double.

But, in doing that, you want the promotion to reflect "zero rounding" in
the sense of display rather than binary.

That make sense? If so, I'm thinking I've got an idea or two but need
to verify if I'm all wet or not... :)

That's essentially it, yeah. And, honestly, one of the main reasons for seeking
this "purity" of transformation is to calibrate the new model results against the
old. It's easier to find where new coding errors lie, when you can compare the
numbers precisely. Long term, I'm coming around to agreement that this just isn't
that significant a difference.
--
..NET: It's About Trust!
http://vfred.mvps.org


.



Relevant Pages

  • Re: BLAS: dgemm
    ... to a procedure requiring double precision data, ... be 'single precision correct' instead of 'double precision correct'. ... Where is the compiler supposed to get ...
    (comp.lang.fortran)
  • Re: increasing width
    ... which I get every time I want to declare real. ... used to declare single or double precision variables. ... easily support more than one "kind" of single precision variable. ... have at least 13 digits of precision, ...
    (comp.lang.fortran)
  • Re: increasing width
    ... Some fellow over in sci.math.num-analysis tells me I can get at least 6 more sig figs, if instead of declaring as type real, I declare as real. ... used to declare single or double precision variables. ... easily support more than one "kind" of single precision variable. ... have at least 13 digits of precision, ...
    (comp.lang.fortran)
  • Re: "typedef" in F95/2003?
    ... assignment operator for this combination. ... a double or a quad, you'll have just lost precision. ... If I put a single precision value (the literal ...
    (comp.lang.fortran)
  • Re: Using a GPU for supercomputing?
    ... GPU, because the floating point is single-precision only, and HPC ... Exploiting Single Precision Math in HPC ...
    (comp.sys.ibm.pc.hardware.chips)