Solved

What is the range of double type on VB6?

Posted on 2008-10-18
3
557 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
Comment Utility
-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
Comment Utility
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
Comment Utility
-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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now