Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Revert "fix ellippi to return an inf instead of raising an exception" - #875

Merged
skirpichev merged 1 commit into
mpmath:masterfrom
skirpichev:revert-fc474e1
Oct 12, 2024
Merged

skirpichev merged 1 commit into
mpmath:masterfrom
skirpichev:revert-fc474e1

Conversation

@skirpichev

Copy link
Copy Markdown
Collaborator

This reverts commit fc474e1.

We don't have a concept of "complex infinity". But real infinity (of any sign) is clearly a wrong answer here (it has well defined finite phase and infinite absolute value), e.g.:

>>> ellippi(1-1e-15, 1-1e-15j)
mpc(real='915673653288978.88', imag='-530451596311157.62')
>>> ellippi(1-1e-15, 1+1e-15j)
mpc(real='915673653288978.88', imag='530451596311157.62')

Closes #268

…(thanks to John Beyers)"

This reverts commit fc474e1.

We don't have a concept of "complex infinity".  But real infinity (of
any sign) is clearly a wrong answer here (it has well defined finite
phase and infinite absolute value), e.g.:

```pycon
>>> ellippi(1-1e-15, 1-1e-15j)
mpc(real='915673653288978.88', imag='-530451596311157.62')
>>> ellippi(1-1e-15, 1+1e-15j)
mpc(real='915673653288978.88', imag='530451596311157.62')
```

Closes mpmath#268
@skirpichev
skirpichev merged commit 094feb2 into mpmath:master Oct 12, 2024
@skirpichev
skirpichev deleted the revert-fc474e1 branch October 12, 2024 04:34
@skirpichev skirpichev added this to the 1.4 milestone May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Divide by Zero Error in ellippi

1 participant