Skip to content

Conversation

@larionvn
Copy link
Contributor

  • This PR includes the implementation of 3 functions:
    • MantissaExponent
    • FractionalPart
    • CubeRoot

Copy link
Member

@sn6uv sn6uv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests are failing?

attributes = {'Listable', 'NumericFunction', 'ReadProtected'}

rules = {
'CubeRoot[n_]': 'If[NumericQ[n] == True, If[n > 0, Power[n, Divide[1, 3]], Times[-1, Power[Times[-1, n], Divide[1, 3]]], Power[n, Divide[1, 3]]], Power[n, Divide[1, 3]]]',
Copy link
Member

@sn6uv sn6uv Apr 4, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about Complex numbers (which are NumericQ)? It looks like CubeRoot only acts on reals. I think this can be cleaned up a bit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your feedback @sn6uv . The tests were failed due to some problems on the Travis_ci side. I've passed all the testcases (on Travis_ci) with the same source code before. For the Complex numbers case, I've checked on the Mathematica and see that the CubeRoot still work with Complex number except they throw a warning message. Anyway, I will push the new source code for handling that warning message soon.

@wolfv
Copy link
Member

wolfv commented Jul 28, 2019

rebased and will be merged once tests pass.

@wolfv wolfv merged commit b861f95 into mathics:master Jul 28, 2019
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.

3 participants