Solved

What is the range of double type on VB6?

Posted on 2008-10-18
3
565 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 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How does CurrentUser work? 10 43
Add a task in Outlook from access 11 43
all the possible sequences for numbers 1,2,3,4,5,6,7,8,9,10 in groups of 5. 5 62
VB6 Enviroment 3 33
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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 Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

734 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