Re: Losing Accuracy in reading numbers
- From: "Cor Ligthert[MVP]" <notmyfirstname@xxxxxxxxx>
- Date: Sun, 31 Aug 2008 12:52:45 +0200
AGP,
Simple search on Internet about accuracy and doubles. This is a dead horse.
Cor
"AGP" <sindizzy.pak@xxxxxxxxxxxx> schreef in bericht news:5ptuk.11294$L_.8281@xxxxxxxxxxxxxxxxxxxxxxx
I thought i had this down but i think i am missing something. i read in a
series of strings in CSV format that are actually numbers. i do something
like
Dim gVal as Double
Dim sData as String = "77.05788457660967"
gVal = Double.Parse(gArrCoords(0),
Globalization.NumberFormatInfo.InvariantInfo)
Debug.printline(gVal)
and this is what i get printed
77.057884576609666
This one seems to be small but i thought the double was supposed to hold the
exact number. I think the conversion has to do with the accuarcy built into
the format type but I cant figure out how to convert the exact number.
Suppose this was a scientific app that required extreme accuarcy in reading
the source data. How would i read it or assign it differently?
tia
AGP
.
- Follow-Ups:
- Re: Losing Accuracy in reading numbers
- From: AGP
- Re: Losing Accuracy in reading numbers
- References:
- Losing Accuracy in reading numbers
- From: AGP
- Losing Accuracy in reading numbers
- Prev by Date: Re: Concatenating Chars in an Array
- Next by Date: Re: Newbie Question: Will my old VB6 app run under Vista?
- Previous by thread: Losing Accuracy in reading numbers
- Next by thread: Re: Losing Accuracy in reading numbers
- Index(es):
Relevant Pages
|