About 48,700 results
Open links in new tab
  1. Adding decimal numbers to a decimal number not working …

    Python weird addition bug [duplicate] (4 answers) Closed 11 years ago . I'm trying to add decimal numbers a decimal number and it works correctly but when I do 1.1 + 0.1 I get …

  2. Add zeros to a float after the decimal point in Python

    @Nascent_Notes: Since the input is limited to 6 decimal places, I think it is safe to assume that rounding to 6 decimals is fine. – Martijn Pieters Commented Mar 25, 2013 at 16:03

  3. more decimal places needed in python - Stack Overflow

    To display more decimal points add this to the end of your code: print('%.60f' % value_x) ".60" indicates 60 decimal places to be displayed and "value_x" represents whatever value you …

  4. python - How can I format a decimal to always show 2 decimal …

    the Python String Format Cookbook: shows examples of the new-style .format() string formatting; pyformat.info: compares the old-style % string formatting with the new-style .format() string …

  5. Python - Adding a decimal - Stack Overflow

    Sep 11, 2013 · Python program to add decimal point based on given value Hot Network Questions How many attacks does a hasted, dual wielding, two weapon fighting, action …

  6. python - How do you let a user input a decimal number? - Stack …

    If your dealing with financial data it is best to employ the decimal module. The according to the docs see decimal — Decimal fixed point and floating point arithmetic the module provides …

  7. Use more decimals in Python - Stack Overflow

    For float instances, Python uses machine-level double precision floating point numbers (double in C terms). What exactly this is depends on the platform and compiler that built Python. These …

  8. python - Limiting floats to two decimal points - Stack Overflow

    Jan 19, 2009 · Python 2.7 and 3.1 use the same length of str() although the repr() is fixed. Some old versions of Numpy had also excessive invalid digits, even with fixed Python. The current …

  9. Python Decimals format - Stack Overflow

    Mar 6, 2010 · Python Decimals format [duplicate] Ask Question Asked 15 years, 2 months ago. Modified 2 ... Add a comment |

  10. Python: Decimal addition and subtraction not giving exact result

    Dec 6, 2020 · From Python documentation:. The decimal module incorporates a notion of significant places so that 1.30 + 1.20 is 2.50.

Refresh