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

Realmode exponentiation #525

Merged
merged 2 commits into from Feb 13, 2016

Conversation

Projects
None yet
2 participants
@ericman314
Collaborator

ericman314 commented Dec 25, 2015

Here's an experiment with realmode option for exponentiation.

Example:

console.log(math.eval('(-8)^(2/3)').toString());
math.config({realmode:true});
console.log(math.eval('(-8)^(2/3)').toString());

Output:

-1.9999999999999987 + 3.464101615137754i
3.9999999999999996

Let's try this out and see how it feels and make sure everything seems right with this. We can change the name of realmode too, or use an existing option like predictable, or whatever. When we are satisfied with it then I will add some notes to the docs before you merge the PR.

@ericman314 ericman314 changed the title from Realmode exponentiation with unit tests to Realmode exponentiation Dec 25, 2015

@ericman314

This comment has been minimized.

Collaborator

ericman314 commented Feb 12, 2016

Planning to remove the realmode option and use predictable instead. Should get to it in a few days.

@ericman314

This comment has been minimized.

Collaborator

ericman314 commented Feb 13, 2016

I've finished this now. I have NOT updated the docs (which are sparse regarding the behavior of pow anyway) and I have NOT modified nthRoot.

josdejong added a commit that referenced this pull request Feb 13, 2016

@josdejong josdejong merged commit 90c0d7c into josdejong:develop Feb 13, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@josdejong

This comment has been minimized.

Owner

josdejong commented Feb 13, 2016

Thanks Eric. I will update the docs.

We can extend nthRoot in the future, it's no issue or inconsistent behavior right now, just limited behavior.

josdejong added a commit that referenced this pull request Feb 13, 2016

@sonnyk22 sonnyk22 referenced this pull request Apr 4, 2016

Open

(-8)^(2/3) in BigNumber #637

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment