| //===-- Constants for exp10f16 function -------------------------*- C++ -*-===// |
| // |
| // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| // See https://llvm.org/LICENSE.txt for license information. |
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| // |
| //===----------------------------------------------------------------------===// |
| |
| #ifndef LLVM_LIBC_SRC___SUPPORT_MATH_EXP10_FLOAT16_CONSTANTS_H |
| #define LLVM_LIBC_SRC___SUPPORT_MATH_EXP10_FLOAT16_CONSTANTS_H |
| |
| #include "hdr/stdint_proxy.h" |
| #include "include/llvm-libc-macros/float16-macros.h" |
| |
| #ifdef LIBC_TYPES_HAS_FLOAT16 |
| |
| #include "src/__support/CPP/array.h" |
| |
| namespace LIBC_NAMESPACE_DECL { |
| |
| // Generated by Sollya with the following commands: |
| // > display = hexadecimal; |
| // > for i from 0 to 7 do printsingle(round(2^(i * 2^-3), SG, RN)); |
| LIBC_INLINE_VAR constexpr cpp::array<uint32_t, 8> EXP2_MID_BITS = { |
| 0x3f80'0000U, 0x3f8b'95c2U, 0x3f98'37f0U, 0x3fa5'fed7U, |
| 0x3fb5'04f3U, 0x3fc5'672aU, 0x3fd7'44fdU, 0x3fea'c0c7U, |
| }; |
| |
| // Generated by Sollya with the following commands: |
| // > display = hexadecimal; |
| // > round(log2(10), SG, RN); |
| LIBC_INLINE_VAR constexpr float LOG2F_10 = 0x1.a934fp+1f; |
| |
| // Generated by Sollya with the following commands: |
| // > display = hexadecimal; |
| // > round(log10(2), SG, RN); |
| LIBC_INLINE_VAR constexpr float LOG10F_2 = 0x1.344136p-2f; |
| |
| } // namespace LIBC_NAMESPACE_DECL |
| |
| #endif // LIBC_TYPES_HAS_FLOAT16 |
| |
| #endif // LLVM_LIBC_SRC___SUPPORT_MATH_EXP10F16_H |