1 //===-- Collection of utils for exp and friends -----------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_LIBC_SRC_MATH_EXP_UTILS_H
10 #define LLVM_LIBC_SRC_MATH_EXP_UTILS_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
];
23 double poly
[EXP2F_POLY_ORDER
];
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