Skip to content

[libc][math][c++23] Add log_bf16 math function - #157811

Merged
krishna2803 merged 17 commits into
llvm:mainfrom
krishna2803:log_bf16
Sep 24, 2025
Merged

krishna2803 merged 17 commits into
llvm:mainfrom
krishna2803:log_bf16

Conversation

@krishna2803

Copy link
Copy Markdown
Contributor

This PR adds log_bf16 higher math function for BFloat16 type along with the tests.

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>
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>
#include "test/UnitTest/FPMatcher.h"
#include "test/UnitTest/Test.h"

using LlvmLibcLogBf16Test = LIBC_NAMESPACE::testing::FPTest<bfloat16>;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Use FEnvSafeTest instead and remove libc_errno = 0 below.

Signed-off-by: Krishna Pandey <kpandey81930@gmail.com>
@krishna2803
krishna2803 merged commit 1fda257 into llvm:main Sep 24, 2025
20 checks passed
@krishna2803
krishna2803 deleted the log_bf16 branch September 24, 2025 15:17
mahesh-attarde pushed a commit to mahesh-attarde/llvm-project that referenced this pull request Oct 3, 2025
This PR adds log_bf16 higher math function for BFloat16 type along with
the tests.

---------

Signed-off-by: Krishna Pandey <kpandey81930@gmail.com>
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