Skip to content

[libc][math][c++23] Add {ceil,floor,round,roundeven,trunc}bf16 math functions - #152352

Merged
lntue merged 19 commits into
llvm:mainfrom
krishna2803:rounding-functions-bf16
Aug 8, 2025
Merged

lntue merged 19 commits into
llvm:mainfrom
krishna2803:rounding-functions-bf16

Conversation

@krishna2803

@krishna2803 krishna2803 commented Aug 6, 2025 •

Copy link
Copy Markdown
Contributor

This PR implements the following basic math functions for BFloat16 type along with the tests:

  • ceilbf16
  • floorbf16
  • roundbf16
  • roundevenbf16
  • truncbf16

Signed-off-by: Krishna Pandey <kpandey81930@gmail.com>
Signed-off-by: Krishna Pandey <kpandey81930@gmail.com>
Signed-off-by: Krishna Pandey <kpandey81930@gmail.com>
Signed-off-by: Krishna Pandey <kpandey81930@gmail.com>
Signed-off-by: Krishna Pandey <kpandey81930@gmail.com>
Signed-off-by: Krishna Pandey <kpandey81930@gmail.com>
Signed-off-by: Krishna Pandey <kpandey81930@gmail.com>
…ctions

Signed-off-by: Krishna Pandey <kpandey81930@gmail.com>
Signed-off-by: Krishna Pandey <kpandey81930@gmail.com>
Signed-off-by: Krishna Pandey <kpandey81930@gmail.com>
Signed-off-by: Krishna Pandey <kpandey81930@gmail.com>
Signed-off-by: Krishna Pandey <kpandey81930@gmail.com>
Signed-off-by: Krishna Pandey <kpandey81930@gmail.com>
Signed-off-by: Krishna Pandey <kpandey81930@gmail.com>
Signed-off-by: Krishna Pandey <kpandey81930@gmail.com>
Signed-off-by: Krishna Pandey <kpandey81930@gmail.com>
@github-actions

github-actions Bot commented Aug 6, 2025 •

Copy link
Copy Markdown

✅ With the latest revision this PR passed the C/C++ code formatter.

@lntue
lntue requested review from lntue and overmighty August 7, 2025 15:32
Comment thread libc/src/math/generic/CMakeLists.txt
Comment thread libc/test/src/math/smoke/CMakeLists.txt Outdated
Signed-off-by: Krishna Pandey <kpandey81930@gmail.com>

@overmighty overmighty left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM with one more nit.

Comment thread libc/test/src/math/smoke/CMakeLists.txt Outdated
Signed-off-by: Krishna Pandey <kpandey81930@gmail.com>
@lntue
lntue merged commit 15a705d into llvm:main Aug 8, 2025
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