[NFC][Py Reformat] Added more commits to .git-blame-ignore-revs
[llvm-project.git] / libc / src / math / generic / exp_utils.h
blobedbd60a2d568196a79668fbb16ab2e3833d8a4e4
1 //===-- Collection of utils for exp and friends -----------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_LIBC_SRC_MATH_EXP_UTILS_H
10 #define LLVM_LIBC_SRC_MATH_EXP_UTILS_H
12 #include <stdint.h>
14 #define EXP2F_TABLE_BITS 5
15 #define EXP2F_POLY_ORDER 3
16 #define N (1 << EXP2F_TABLE_BITS)
18 namespace __llvm_libc {
20 struct Exp2fDataTable {
21 uint64_t tab[1 << EXP2F_TABLE_BITS];
22 double shift_scaled;
23 double poly[EXP2F_POLY_ORDER];
24 double shift;
25 double invln2_scaled;
26 double poly_scaled[EXP2F_POLY_ORDER];
29 extern const Exp2fDataTable exp2f_data;
31 } // namespace __llvm_libc
33 #endif // LLVM_LIBC_SRC_MATH_EXP_UTILS_H