0

I add some numbers in google calc and it gave me 8.5070592e+37

decimal uhoh = 8.5070592e+37M;

Floating-point constant is outside the range of type 'decimal'

How can I parse this? I tried using IntXLib, but I cannot see how to pass this format, I also hear about BigInteger, please advice how to fix the problem.

EDIT:

9,223,372,036,854,775,807 * 9,223,372,036,854,775,807 =8.5070592e+37

How do I get the full number, for example, the number

328574893257893425893783934534253285748932578934258937839345342532857489325789342589378393453425328574893257893425893783934534253285748932578934258937839345342532857489325789342589378393453425328574893257893425893783934534253285748932578934258937839345342532857489325789342589378393453425328574893257893425893783934534253285748932578934258937839345342532857489325789342589378393453425328574893257893425893783934534253285748932578934258937839345342532857489325789342589378393453425328574893257893425893783934534253285748932578934258937839345342532857489325789342589378393453425328574893257893425893783934534253285748932578934258937839345342532857489325789342589378393453425328574893257893425893783934534253285748932578934258937839345342532857489325789342589378393453425328574893257893425893783934534253285748932578934258937839345342532857489325789342589378393453425328574893257893425893783934534253285748932578934258937839345342532857489325789342589378393453425328574893257893425893783934534253285748932578934258937839345342532857489325789342589378393453425328574893257893425893783934534253285748932578934258937839345342532857489325789342589378393453425328574893257893425893783934534253285748932578934258937839345342532857489325789342589378393453425

or whatever that actually equals?

Dr. belisarius
  • 60,527
  • 15
  • 115
  • 190
Chris
  • 2,340
  • 6
  • 40
  • 63
  • What do you mean exactly by "pass" and where is your float error coming from? On the definition itself? – Paul Sasik Mar 12 '13 at 14:20
  • Are you coding in mathematica as well or just using the output from it? – jim mcnamara Mar 12 '13 at 14:21
  • 1
    For a value of that size, do you really want `decimal`? The compiler is telling you pretty clearly: it's outside the range of `decimal`. You haven't really given us enough information about what you're trying to do - maybe `BigInteger` is appropriate, or maybe `double` is. It depends on your situation. – Jon Skeet Mar 12 '13 at 14:21
  • cannot convert from 'double' to 'int' – Chris Mar 12 '13 at 14:22
  • `decimal.MaxValue` is `79228162514264337593543950335m`. So, your `uhoh` value is tooooo big for a decimal. – Soner Gönül Mar 12 '13 at 14:24
  • I don't know what you are asking. "How can I parse this?" and "but I cannot see how to pass this format" doesn't mean anything to me. – Stefan Steinegger Mar 12 '13 at 14:36
  • use this to solve your problem: http://stackoverflow.com/questions/10359372/is-there-a-bigfloat-class-in-c – Nahum Mar 12 '13 at 14:38

0 Answers0