Click here to Skip to main content
12,247,901 members (57,605 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: VB VB.NET
I want to perform a scientific calculation in my vb.net project..
I don't want code for calculator.
I have to perform operation of
x^y
where x & y both are very large integers
but it's showing me overflow in code so I want scientific calculation.
Posted 16-Feb-13 19:56pm
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

You can use the type System.Numerics.BigInteger instead:
http://msdn.microsoft.com/en-us/library/system.numerics.biginteger.aspx[^].

Only you should understand that such a simple operation as power function can easily create a result depleting your system memory or fail just because you don't have enough memory. Smile | :)

—SA
  Permalink  
Comments
Mehdi Gholam 17-Feb-13 1:08am
   
:)
sachinjadhav1994 18-Feb-13 7:31am
   
I am doing project in vb.net 2008 framework 3.5
BigInteger is supported in version 4.5
How can I use that in 3.5??
   
Well, you can take the source code from System.Numerics from Mono:
http://www.mono-project.com/
—SA
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

  Permalink  
Comments
   
I already answered :-) Have my 5.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160426.1 | Last Updated 17 Feb 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100