implementation - Arithmetic Operations on Very, Very Long Decimals -
I'm always curious: how can I execute arithmetic actions on a very long decimal point - for example, pi's Calculate the decimal place of 3000 (especially in a compulsory language)?
Use a language or library which supports arbitrary precise numbers ...?
In Python, ints will automatically promote longer, which are arbitrary shapes. You can use the second value to track how many decades to achieve arbitrarily accurate floating point. In Java, you can use the square, which is "irreversible, arbitrary-precise signed decimal numbers".
I am sure other examples exist in other languages.
Comments
Post a Comment