?
Solved

What is the range of double type on VB6?

Posted on 2008-10-18
3
Medium Priority
?
567 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
[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
  • Learn & ask questions
  • 2
3 Comments
 
LVL 3

Assisted Solution

by:siranm
siranm earned 640 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 640 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 360 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

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses
Course of the Month10 days, left to enroll

762 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