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

feat(Functions/Math): add decimal functions for decimal places #64

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kdxcxs
Copy link

@kdxcxs kdxcxs commented Feb 11, 2021

Add decimal functions to calculate decimal places.

e.g.

std::cout << 7 / 2 << "." << decimal(7, 2); /* 3.5 */

@faheel faheel marked this pull request as draft March 29, 2021 13:10
@faheel faheel marked this pull request as ready for review March 29, 2021 13:10
Copy link
Owner

@faheel faheel left a comment

Choose a reason for hiding this comment

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

A more descriptive name for this method could be fractional_quotient. If you have a better suggestion then do let me know.

/*
decimal(BigInt, BigInt, Integer)
-------------------
*/
Copy link
Owner

Choose a reason for hiding this comment

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

Please also mention here what this method does.

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.

2 participants