diff options
Diffstat (limited to 'libc/src/math/generic/expxf16.h')
| -rw-r--r-- | libc/src/math/generic/expxf16.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/libc/src/math/generic/expxf16.h b/libc/src/math/generic/expxf16.h new file mode 100644 index 000000000000..c33aca337b98 --- /dev/null +++ b/libc/src/math/generic/expxf16.h @@ -0,0 +1,28 @@ +//===-- Common utilities for half-precision exponential functions ---------===// +// +// 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_MATH_GENERIC_EXPXF16_H +#define LLVM_LIBC_SRC_MATH_GENERIC_EXPXF16_H + +#include "src/__support/CPP/array.h" +#include "src/__support/macros/config.h" +#include <stdint.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)); +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, +}; + +} // namespace LIBC_NAMESPACE_DECL + +#endif // LLVM_LIBC_SRC_MATH_GENERIC_EXPXF16_H |
