About 50 results
Open links in new tab
  1. How is Python's decimal (and other precise decimal libraries ...

    Aug 12, 2022 · 7 I've been reading the floating point guide to try to clarify some points about floating point numbers and I assume Python's decimal library is an implementation of "Limited-Precision …

  2. Is there a faster alternative to python's Decimal?

    Does anyone know of a faster decimal implementation in python? As the example below demonstrates, the standard library's decimal module is ~100 times slower than float. from timeit import Timer ...

  3. The precision of Decimal library in python - Stack Overflow

    Oct 27, 2022 · The precision of Decimal library in python Ask Question Asked 3 years, 4 months ago Modified 3 years, 4 months ago

  4. Decimal Module in Python - Stack Overflow

    Oct 6, 2021 · The decimal module is intended for calculations which are higher precision than a 64-bit float. For some reason you are using it for lower-precision calculations.

  5. Confused about python decimal library - Stack Overflow

    Dec 28, 2023 · I am doing quantitative analysis on Python, comparing results with another colleague we found these typical float discrepancies on the 17th decimal place or so due to different operation …

  6. Python "decimal" module for numerical computation: how do I use it?

    Apr 25, 2024 · Before you use Decimal for this check first that float (which in Python is actually 64bit double) isn't already adequate for your problem. I doubt if RK4 will need much more than that unless …

  7. python - Decimal library and round () function - Stack Overflow

    Nov 13, 2022 · Difference between rounding using Decimal library and rounding using round () function in Python 3. I don't know whether to use the round () function or use the Decimal library to round …

  8. What class to use for money representation? - Stack Overflow

    Jul 30, 2013 · If you decide to write your own class, I recommend basing it on the decimal data type. I don't think python-money is a good option, because it wasn't maintained for quite some time and its …

  9. Default rounding mode in python, and how to specify it to another one?

    Dec 1, 2015 · And in fact, there is a Python standard library module which gives you all the rounding modes you might find useful, and given the above paragraphs, it is the logical place to look: of …

  10. Sin, cos etc for Python 2 Decimal? - Stack Overflow

    Dec 3, 2014 · Decimal('0.99500416527802570954008842818439006805419921875') If you are looking for multi precision math library in Python that supports trig functions, Decimal isn't it.