Re: Singles to Doubles
- From: "Karl E. Peterson" <karl@xxxxxxxx>
- Date: Tue, 17 Jul 2007 09:09:04 -0700
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
.
- 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: Jim Mack
- Re: Singles to Doubles
- From: Karl E. Peterson
- Re: Singles to Doubles
- From: dpb
- Re: Singles to Doubles
- From: Karl E. Peterson
- Re: Singles to Doubles
- From: dpb
- Re: Singles to Doubles
- From: Karl E. Peterson
- Re: Singles to Doubles
- From: dpb
- Singles to Doubles
- Prev by Date: Re: Singles to Doubles
- Next by Date: Re: Singles to Doubles
- Previous by thread: Re: Singles to Doubles
- Next by thread: Re: Singles to Doubles
- Index(es):
Relevant Pages
|