[英]any way of getting more than 13 decimal points in a double? C# or JS?
is there any way i can get a double to contain more than default 13 (17 in JS) decimal points in C# or JS? 有什么办法可以使Double在C#或JS中包含超过默认的13个小数点(在JS中为17个)? Like a double with first 25 PI digits? 像是前25位PI数字的双精度?
Both the double in C# and he normal number data type in JavaScript is stored as 64 bit number, see https://www.w3schools.com/js/js_numbers.asp and https://www.tutorialspoint.com/csharp/csharp_data_types.htm C#中的double和JavaScript中的常规数字数据类型都存储为64位数字,请参阅https://www.w3schools.com/js/js_numbers.asp和https://www.tutorialspoint.com/csharp/csharp_data_types热媒
This limits the number of decimal points that can be represented. 这限制了可以表示的小数点数量。 However, there are appropriate Libraries to handle this issue 但是,有适当的图书馆来处理此问题
There are numerous libraries that handle large numbers and high precision floating point numbers. 有许多处理大量和高精度浮点数的库。
JavaScript see the answer here: What is the standard solution in JavaScript for handling big numbers (BigNum)? JavaScript在这里看到答案: JavaScript中用于处理大数(BigNum)的标准解决方案是什么? . 。
C# See the answers here: Is there a BigFloat class in C#? C#在这里查看答案:C#中是否有BigFloat类?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.