-
Notifications
You must be signed in to change notification settings - Fork 23
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
fix #151 adding Basics.logBase and Basics.e to morphir-sdk #152
fix #151 adding Basics.logBase and Basics.e to morphir-sdk #152
Conversation
@inline def logBase(base: Float, number: Float): Float = | ||
divide(scala.math.log(number))(scala.math.log(base)) | ||
@inline def e(a: Float): Float = | ||
scala.math.exp(a) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't look right. e
just returns a number in Elm: https://package.elm-lang.org/packages/elm/core/latest/Basics#e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Math.E
looks like the right thing to use here: https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#E
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay @AttilaMihaly, I will make the necessary changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AttilaMihaly Just I mistook e() for exp() math function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basics.e has successfully been added
@AttilaMihaly, the checks seen to fail at Basics.power() for float type. I intend to change it. I am thinking of using java's Math.pow |
No description provided.