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

fix #151 adding Basics.logBase and Basics.e to morphir-sdk #152

Merged
merged 7 commits into from
Oct 26, 2023

Conversation

Abdul-Hameed-Turntabl
Copy link
Contributor

No description provided.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 5, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@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)
Copy link
Member

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

Copy link
Member

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

Copy link
Contributor Author

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.

Copy link
Contributor Author

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

Copy link
Contributor Author

@Abdul-Hameed-Turntabl Abdul-Hameed-Turntabl left a 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

@Abdul-Hameed-Turntabl
Copy link
Contributor Author

Abdul-Hameed-Turntabl commented Oct 26, 2023

@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

@AttilaMihaly AttilaMihaly merged commit b330739 into finos:main Oct 26, 2023
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