-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JAX exp accuracy and correctness #44
Comments
Merged
Merged
Note that numpy real
that affects the accuracy of complex
```
| ULP-difference | z | algorithms:exp(z) | mpmath:exp(z) | numpy:exp(z) |
| -------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
| 3 | (7.969992e-06-2.5074376e+17j) | (0.32435435+0.94594425j) | (0.32435432+0.9459441j) | (0.32435432+0.94594413j) |
| 3 | (-37.61348-5.674385e+31j) | (3.7676234e-17+2.6744145e-17j) | (3.7676237e-17+2.674415e-17j) | (3.7676237e-17+2.6744149e-17j) |
| 3 | (-0.19920714-5.3938703e+22j) | (0.6580332-0.48823792j) | (0.65803313-0.48823783j) | (0.6580332-0.48823786j) |
| 3 | (0.037109375-1057564900000000j) | (-0.32847652+0.98445207j) | (-0.3284765+0.9844519j) | (-0.32847646+0.98445195j) |
| 3 | (-0.19920714-1315799200j) | (-0.23648244+0.7845126j) | (-0.2364824+0.7845125j) | (-0.23648241+0.7845125j) |
| 3 | (-37.61348-562.31213j) | (-4.6178254e-17-1.5221798e-18j) | (-4.6178258e-17-1.5221801e-18j) | (-4.6178258e-17-1.5221801e-18j) |
| 3 | (28.809525-1609.9884j) | (252659190000-3239669700000j) | (252659240000-3239670000000j) | (252659240000-3239670000000j) |
| 3 | (5.5767243e-05-6.13671e-18j) | (1.0000559-6.137053e-18j) | (1.0000558-6.137052e-18j) | (1.0000558-6.1370523e-18j) |
| 3 | (5.5767243e-05-1.0889019e-35j) | (1.0000559-1.0889628e-35j) | (1.0000558-1.0889626e-35j) | (1.0000558-1.08896264e-35j) |
| | ... | ... | ... | ... |
| 3 | (116.7619+4.464897e-15j) | (inf+2.2848684e+36j) | (inf+2.284868e+36j) | (inf+2.2848681e+36j) |
| 3 | (-0.19920714+57691.92j) | (0.7861858-0.23085883j) | (0.78618574-0.23085879j) | (0.78618574-0.23085879j) |
| 3 | (-0.19920714+2.973419e+16j) | (0.81100607-0.11684648j) | (0.811006-0.11684646j) | (0.811006-0.11684647j) |
| 3 | (-0.033325076+3.8906686e+27j) | (0.4860293+0.83624053j) | (0.4860292+0.8362404j) | (0.48602924+0.8362404j) |
| 2 | (-0.033325076-4.0181524e-36j) | (0.9672242-3.886454e-36j) | (0.96722406-3.8864538e-36j) | (0.96722406-3.8864538e-36j) |
| 2 | (0.005487351-2.7744386e-36j) | (1.0055023-2.7897044e-36j) | (1.0055025-2.7897048e-36j) | (1.0055025-2.7897048e-36j) |
| 2 | (7.237707e-08+4.9878124e+34j) | (0.42298967+0.9061345j) | (0.4229897+0.9061346j) | (0.42298973+0.9061346j) |
| 2 | (-0.033325076-3.580226e-33j) | (0.9672242-3.462881e-33j) | (0.96722406-3.4628807e-33j) | (0.96722406-3.4628807e-33j) |
| 2 | (0.00011226109-4.0181524e-36j) | (1.0001122-4.018603e-36j) | (1.0001123-4.0186036e-36j) | (1.0001123-4.0186036e-36j) |
| 2 | (7.237707e-08+1.0841676e+36j) | (0.22182454-0.97508657j) | (0.22182456-0.9750867j) | (0.22182457-0.9750867j) |
|
With https://github.com/pearu/stablehlo/tree/pearu/exponential, JAX complex exp has the following accuracy patterns:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: