Solved

What is the range of double type on VB6?

Posted on 2008-10-18
3
564 Views
Last Modified: 2012-05-05
Experts,
I would like to know the range of double data type on VB6?
I already seem at http://msdn.microsoft.com/en-us/library/aa263420(VS.60).aspx.
But I don't understand, please help
Thanks
Francis
0
Comment
Question by:fsze88
  • 2
3 Comments
 
LVL 3

Assisted Solution

by:siranm
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

by:siranm
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


here's another answer for your question, with no minus sign error:

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

by:
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question