• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 154
  • Last Modified:

Extremely large numbers

How can i handle extremely large numbers in Visual Basic? I need to perform calculations suchs as MOD on it and the values are too big to fit in a LONG-datatype or whatever.
0
jeanweiler
Asked:
jeanweiler
  • 2
1 Solution
 
jeanweilerAuthor Commented:
Please send a copy of your answer to deamon@stad.dsl.nl because i am not online so often...
0
 
Bob LearnedCommented:
Long datatype is a 32-bit number, Currency datatype is a 64-bit number
0
 
mcriderCommented:
You can Cdec() to create numbers up to 28 digits.... Use the following:

Dim X as Variant
X=Cdec("100000000000000000000000000")
X=X mod 2

Be sure to read the Help pages on Cdec and the Decimal Data type...


Cheers!
0
 
mcriderCommented:
By the way, you can't use functions like TAN(), or any of the VBA functions that return a double.... Otherwise you will only get 15 digits back.


Cheers!
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now