Results 1 to 2 of 2

Thread: Smallest number VB can understand

  1. #1

    Thread Starter
    Lively Member oswaler's Avatar
    Join Date
    Jul 2006
    Location
    U.S. of A.
    Posts
    87

    Smallest number VB can understand

    What is the smallest number that VB 6 can understand? I am writing a program that needs to find the numeric derivative of a function using the definition of a derivative (Limit as h approaches 0 of (f(x+h)-f(x))/h. It seems like using the inverse of a double number would be the smallest. Is there anything smaller?

    Thanks -Eric

  2. #2
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Smallest number VB can understand

    There is the Decimal data type:
    Quote Originally Posted by Help File
    Decimal variables are stored as 96-bit (12-byte) unsigned integers scaled by a variable power of 10. The power of 10 scaling factor specifies the number of digits to the right of the decimal point, and ranges from 0 to 28. With a scale of 0 (no decimal places), the largest possible value is +/-79,228,162,514,264,337,593,543,950,335. With a 28 decimal places, the largest value is +/-7.9228162514264337593543950335 and the smallest, non-zero value is +/-0.0000000000000000000000000001.

    Note At this time the Decimal data type can only be used within aVariant, that is, you cannot declare a variable to be of type Decimal. You can, however, create a Variant whose subtype is Decimal using the CDec function.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width