Question

How to add two decimal numbers, having more than 18 digits, (ex: "0.12345678901234567345342343" and "-0.540811569342790340234") to all the decimal places accurately in vb.net. I tried using double datatype but it did round-off for 18 digits after decimal point. So how i can achieve this?

Was it helpful?

Solution

You could use Decimal data type instead. It gives you precision of 28-29 significant digits - should be enough for most needs.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top