Solved

# What is the range of double type on VB6?

Posted on 2008-10-18
565 Views
Experts,
I would like to know the range of double data type on VB6?
Thanks
Francis
0
Question by:fsze88
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 2

LVL 3

Assisted Solution

siranm earned 160 total points
ID: 22748261
-1.79769313486231570 x 10^308 through -4.94065645841246544E-324 for negative values
explanation: -2 x 10^2 = -0.02, so -1.7x10^308 = 0.000000...(a lot of zeros)...0000000017

4.94065645841246544E-324 through 1.79769313486231570E+308 for positive values.
4.94 x 10^(-2) = 0.0494, 4.94x10^324 = (positive) 0.0000000...(a lot of zeros)...000000494

that is, E5 means multiplying by 10 to the power of 5

0

LVL 3

Assisted Solution

siranm earned 160 total points
ID: 22748386
i had a typo there, i missed a minus sign. also there is a tiny error in the Microsoft page: a minus sign (-) is mising

is it the scientific notation you dont understand ?

when they write E-308 means "multiply by ten to the power of -308."

E-308 =  "10 to the power of -308" = 0....(307 zeros)...1 = 0.000000000...0000001

Double Variable

The Visual Basic Double variable is used to store either very large numbers, or small numbers requiring more than 28 decimal places. To be precise Visual basic Double varaibles can store positive numbers in the range 4.94065645841246544E-324 to 1.79769313486231570E+308 and negative numbers from -1.79769313486231570E+30 to -4.94065645841246544E-324.
Double variables are typically used when developing scientific applications using Visual Basic and, as such, are generally not used by the average developer.
0

LVL 44

Accepted Solution

Arthur_Wood earned 90 total points
ID: 22752473
-1.79769313486231570 x 10^308  is a VERY large negative number

the ^ means 'raised to the power of' so ^2 means squared, ^3 means cubed...

10^308 is 1 followed by 308 zeros (a positive value after the ^ also means move the decimal point that many places to the right, adding a 0 for each move tot eh right)

10^1 = 10  (1 followed by 1 zero)
10^2 = 100 (1 followed by 2 zeros)
10^3 = 1000

10^6 = 1,000,000 (1 million, or 1 followed by 6 zeros)

10^9 = 1,000,000,000 (1 billion, or 1 followed by 9 zeros)

10^-1 = 1/10 = .1 (a -sign here means DIVIDED BY 1 followed by 1 0 zeros  0r 10)
10^-2 = 1/100 = .01
10^-3 = 1/1000

10^-6 = 1/1000000 = .000001
10^-9 = 1/1000000000 = .000000001
10^-308 = 1/(1 followed by 308 zeros)

a -sign after the ^ can also be seen to mean move the decimal point that many places to the LEFT.

AW
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

### Suggested Solutions

How does CurrentUser work? 10 43