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

added log() and log10 functions #224

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wopperer
Copy link

No description provided.

Copy link
Collaborator

@Yaffle Yaffle left a comment

Choose a reason for hiding this comment

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

Do not use Number constructor

@wopperer
Copy link
Author

ok do you want me to just return the number? return s.length + Math.log10("0."+s.substring(0,15));

@wopperer wopperer requested a review from Yaffle December 17, 2021 19:31
@peterolson
Copy link
Owner

Logarithms are not integer operations, I'm not sure they fit the scope of this library.

@wopperer
Copy link
Author

wopperer commented Dec 17, 2021

That's sad if they don't fit here, because there are numerous use cases (like astronomical calculations) where you need logarithms of big integers, and they are not supported by ECMA yet.

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