arbitrary big numbers
How do calculators store numbers up to one googol (1e100)? How can I replicate this in c#?
6 Replies
BigInteger
assuming integers. If you need arbitrarily large floating point numbers, I think the go-to would be BigDecimal
note that there is no
BigDecimal
implementation in the BCL, so for that u would need to find a suitable nuget packageI could also just use double 🤦🏼🤦🏼🤦🏼
depends on the precision u need ;p
the farther away the value is from 0 the less precise is a floating point number no matter if we are talking about half, single or double
I know, but afaik, doubles are always precise on 15-17 digits after the first one? So 1e100+1e84≠1e100
yeah something like that