Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

I Can't Calculate Large Numbers; What Can Be Done?

$
0
0
So I've been working on a program to do calculations and I've been using other libraries for string expressions to be calculated such as NCalc.

When you start typing in large numbers using NCalc like 99999*99999 you get incorrect weird answers. I've found out why for example of you use in C#

double answer = 99999*99999;



You will get the error of "The operation overflows at compile time in checked mode"

IF you use
double a = 99999;
double b = 99999;
double answer = a*b;



This works just fine!! The problem is getting libraries like Flee or NCalc to work because for whatever reason they aren't.

What can I do about this? Thanks guys

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>