Free42 possible accuracy flaw
|
03-23-2022, 09:11 PM
Post: #16
|
|||
|
|||
RE: Free42 possible accuracy flaw
Continued on from previous post, lets add mul, and ipow
Code: def mul(z1, z2): Lets do (1+1/1e8) ^ 1e8 To represent decimal base more accurately: exact(1+1/1e8) - float(1+1/1e8) ≈ 6.07747097092215e-017 >>> from gmpy2 import * >>> ipow((1+1/1e8) + 6.07747097092215e-017j, 1e8) (2.7182818148676362+1.4094245018370637e-17j) Add parts together, convert to decimal base, we matched true result 24 digits. Or, considering 2 doubles have about 30 digits precision, we lost 6. 2.718281814867636217652976740666852 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)