Significant figures in the decimal module

前端 未结 6 1713
花落未央
花落未央 2020-12-20 22:40

So I\'ve decided to try to solve my physics homework by writing some python scripts to solve problems for me. One problem that I\'m running into is that significant figures

6条回答
  •  猫巷女王i
    2020-12-20 23:09

    If I undertand Decimal correctly, the "precision" is the number of digits after the decimal point in decimal notation.

    You seem to want something else: the number of significant digits. That is one more than the number of digits after the decimal point in scientific notation.

    I would be interested in learning about a Python module that does significant-digits-aware floating point point computations.

提交回复
热议问题