Skip to content

Comments

Fix ROUNDF macro to properly round instead of truncate#15

Open
shriya-deshmukh wants to merge 1 commit intodevelopfrom
BugFix/ROUNDF-function
Open

Fix ROUNDF macro to properly round instead of truncate#15
shriya-deshmukh wants to merge 1 commit intodevelopfrom
BugFix/ROUNDF-function

Conversation

@shriya-deshmukh
Copy link
Contributor

  • Added 0.5 before integer casting to implement round-half-up behavior
  • Changed final division to use float divisor instead of integer division

Example: ROUNDF(3.14298, 100) now correctly returns 3.14 instead of 3.0

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.

1 participant