This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2008年07月15日 16:13 by TanaT, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Messages (2) | |||
|---|---|---|---|
| msg69693 - (view) | Author: TanaT (TanaT) | Date: 2008年07月15日 16:13 | |
Hello, This is my first Issue creation (I looked for "PI" in issue tracker and found nothing): Please forgive any mistake. Here is the point : I typed the following commands : >>> import math >>> print '%1.26f' % math.pi 3.14159265358979311599796347 In fact, PI value is 3,14159265358979323846264338327950288... ^ I don't know if PI value is computed in Python : If it is, this issue is probably already dead ! But if PI is just saved in math library, there could be an improvement. |
|||
| msg69694 - (view) | Author: Mark Dickinson (mark.dickinson) * (Python committer) | Date: 2008年07月15日 16:19 | |
This is not a bug (though it's commonly reported as such :-) ). Given that not all real numbers can be represented as floats, math.pi is necessarily an approximation to true Pi, and you're printing that approximation out to high precision. No, pi isn't computed in Python; it's a constant, stored as an IEEE 754 double. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:36 | admin | set | github: 47615 |
| 2008年07月15日 16:19:20 | mark.dickinson | set | status: open -> closed resolution: not a bug messages: + msg69694 nosy: + mark.dickinson |
| 2008年07月15日 16:13:44 | TanaT | create | |