Largest data type size in c# is the decimal. If we need to calculate a numerical with 40 floating digits what do you suggest? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Largest data type size in c# is the decimal. If we need to calculate a numerical with 40 floating digits what do you suggest?

23rd Aug 2018, 7:29 PM
Dr. Armin Kardan
Dr. Armin Kardan - avatar
6 Answers
+ 1
Please only tag C# as the title had mentioned the language, multiple tags is misleading and may confuse those who looked at tags for specific subjects.
23rd Aug 2018, 8:15 PM
Ipang
+ 1
you know, it is not only about c#, this is a general problem in most programming languages if you have some similar algorithm in other langs it will be useful however i edited the tags to only C# 😊
24th Aug 2018, 1:43 AM
Dr. Armin Kardan
Dr. Armin Kardan - avatar
23rd Aug 2018, 7:55 PM
voidneo
0
if you want c# it's a tie between long and double
23rd Aug 2018, 8:21 PM
voidneo
0
decimal size in C# is 16Bytes
24th Aug 2018, 1:45 AM
Dr. Armin Kardan
Dr. Armin Kardan - avatar
0
https://stackoverflow.com/questions/4523741/arbitrary-precision-decimals-in-c-sharp there's an implementation listed here using the BigInteger class
24th Aug 2018, 6:38 AM
hinanawi
hinanawi - avatar