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

Incorrect definition for m.ln1p #10

Closed
jthompson6 opened this issue Jun 9, 2016 · 3 comments
Closed

Incorrect definition for m.ln1p #10

jthompson6 opened this issue Jun 9, 2016 · 3 comments

Comments

@jthompson6
Copy link

The spec for the function
m.ln1p defines it as ln(1+ x^2). This is surprising because the normal definition, is ln(1+ x). This aligns with the classic Taylor series (the Mercator series) and java.lang.Math.log1p.

Looking at the code for hadrian, I see that the implementation is actually java.lang.Math.log1p.

I can verify this by running the PFA script

input: double
output: {type: array, items: double}
action:
  - new: [{m.ln1p: [input]}, {m.ln: [{+: [1, input]}]}, {m.ln: [{+: [1, {"**": [input, 2]}]}]}]
    type: {type: array, items: double}

and seeing the that the output for the first value matches the second, not the third.

So I think we should change the spec to say ln(1+ x).

@jthompson6
Copy link
Author

Should I move this to https://github.com/datamininggroup/pfa?

@collinbennett
Copy link
Contributor

Yes, please address any questions about the PFA specification to the DMG. You can use the github repo or the slack channel.

Thanks.

@jthompson6
Copy link
Author

Okay, I've moved it, thanks.

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

No branches or pull requests

2 participants