Solved

Member of An Array of Numbers Has # Following Number

Posted on 2011-09-22
2
285 Views
Last Modified: 2012-05-12
I have an array of numbers that are the results of the powers of two. All is well until the 31st entry and then the number gets a "#" appended to the number. The actual number is 2^31 or 2,147,483,648. Is there a limit to the size of a number that can be placed in an array? What is the significance of the "#" sign?

val1 = Array(1, 2, 4, 8, 16, _
             32, 64, 128, 256, 512, _
             1024, 2048, 4096, 8192, 16384, _
             32768, 65536, 131072, 262144, 524288, _
             1048576, 2097152, 4194304, 8388608, 16777216, _
             33554432, 67108864, 134217728, 268435456, 536870912, _
             1073741824, 2147483648#, 4294967296#, 8589934592#)
0
Comment
Question by:wmckinney
  • 2
2 Comments
 
LVL 92

Accepted Solution

by:
Patrick Matthews earned 50 total points
Comment Utility
The # indicates that the value is treated as data type Double.  The Long data type tops out at (2 ^ 31) - 1.
0
 
LVL 92

Expert Comment

by:Patrick Matthews
Comment Utility
BTW, Double tops out at ~1.79 x 10 ^ 308.  However, it is only precise to the first 15 significant digits.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create 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

5 Experts available now in Live!

Get 1:1 Help Now