Blog Stats
  • Posts - 99
  • Articles - 5
  • Comments - 236
  • Trackbacks - 105

 

BigInteger/BigDecimal

MSDN Question:

Specifically, I need something that will let me represent decimals with a
large amount of precision... Similar to this library:

http://www.codeproject.com/csharp/biginteger.asp

... but I need decimal support.

If worse comes to worse I'm thinking I can use this and just multiply out
the numbers as necessary by a fixed large number
(10000000000000000000000000000000000000000000000000000000000000000000000 or
something similar), but that really feels like an incredibly dirty hack...
So, any better ideas would be appreciated!


The J# re-distributables contain very well tested implementations of BigInteger and BigDecimal that you can use directly in your .NET apps simply by referencing the J# assembly vjslib.dll. http://download.microsoft.com/download/2/e/9/2e9bde04-3af1-4814-9f1e-733f732369a3/NETMatters0512.exe discusses this further. It also contins some Zip classes which are quite useful.

 

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Feedback

# re: BigInteger/BigDecimal

Gravatar And if you need exact fraction support, check out this project (I'm not the author, but I made VERY extensive changes, which he posted).

http://www.codeproject.com/csharp/fractiion.asp 5/1/2006 11:31 AM | Marc Brooks

# re: BigInteger/BigDecimal

Gravatar Interesting library I will have to play with it a bit! 5/1/2006 11:35 AM | Greg Young

# re: BigInteger/BigDecimal

Gravatar BigInteger for now, BigDecimal mayb later... 1/21/2007 12:33 AM | Check this out....

# re: BigInteger/BigDecimal

Gravatar NET apps simply by referencing the J# assembly vjslib.dll. 8/1/2009 8:11 AM | tiffany

# re: BigInteger/BigDecimal

Gravatar can someone please tell me what this number would is, i got it from a friend that thinks hes a know it all in math and i dont know the name of a number with this many zeros in it. 10,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 ok, its the number 10 followd by 26 sets of zeros in groups of 3's so there is 78 zero all together succeeding the number 10. if anyone can help me with this please email me the answer at (afuller183@gmail.com) 5/5/2010 9:08 AM | logic

# re: BigInteger/BigDecimal

Gravatar So we can exclude all BigDecimal / BigInteger on range to make it consistent and let the issue arise at developement time (at least unit testing)
or we can allow BigDecimal / BigInteger and raise an exception if we are above the limit cases happends where min or max is unset, such an issue will arise most likely in production only... I'm not a big fan of that.

Regards,
Free Mcx Tips Trial 1/12/2011 5:56 AM | Crude Oil Tips

# re: BigInteger/BigDecimal

Gravatar Thank you for sharing that little wonderful connection with us. Now I love the movie even more!Very nice and helpful information has been given in this article. I like the way you explain the things. Keep posting.
Thank you,
Mcx Silver Trading Tips 3/14/2011 6:02 AM | free mcx gold tips

# re: BigInteger/BigDecimal

Gravatar How would you convert a 'BigDecimal' number to a 'BigInteger' ? I cant seem
to be able to do this. 5/12/2011 3:47 AM | Best Nifty Tips

Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 
 

 

 

Copyright © Greg Young