Skip to content
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

Extension of pow function to support Infinite exponents. #835

Merged
merged 1 commit into from
Apr 24, 2017

Conversation

harrysarson
Copy link
Collaborator

Goes someway towards addressing #804.

Tests pass with current behaviour of complex.js and will need updating when full support of infinite numbers is added there.

New behaviour of pow function:

  • (-2)^Infinity = ComplexNAN
  • (-1)^Infinity = ComplexNAN
  • (-0.5)^Infinity = 0 (real)
  • (-2)^(-Infinity) = 0 (real)
  • (-0.5)^(-Infinty) = ComplexNaN

If config.predictible = true results are the same but ComplexNaN becomes NaN.

@josdejong
Copy link
Owner

Thanks Harry, looks good!

@josdejong josdejong merged commit a62b1c7 into josdejong:develop Apr 24, 2017
@harrysarson harrysarson deleted the pow-fix branch June 30, 2017 20:33
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.

2 participants