VB.NET throws up on 999999999999999999999

SoftwareEng

Senior member
Apr 24, 2005
553
4
81
'Double' data type is hacking up my numbers.
(aka I'm in ur code, hacking up ur doublez)

Dim dbl As Double = 999999999999999999999.99

As soon as enter this statement, VB.NET (2005) replaces it with:

Dim dbl As Double = 1.0E+21.

Not cool, I need exactly the number I entered! Manual says, "A Double value has 15 decimal digits of precision". How can I store larger floating-point numbers?

thanks =)
 

Tencntraze

Senior member
Aug 7, 2006
570
0
0
I think that the Decimal datatype is more precise, but you're still going to have issues when you get to a very large precision.
 

SoftwareEng

Senior member
Apr 24, 2005
553
4
81
Originally posted by: Tencntraze
I think that the Decimal datatype is more precise, but you're still going to have issues when you get to a very large precision.

nice! I thought Decimal only supported integer numbers, but it looks like it takes floating points as well.