xref: /third_party/musl/src/math/log2_data.h (revision 570af302)
1/*
2 * Copyright (c) 2018, Arm Limited.
3 * SPDX-License-Identifier: MIT
4 */
5#ifndef _LOG2_DATA_H
6#define _LOG2_DATA_H
7
8#include <features.h>
9
10#define LOG2_TABLE_BITS 6
11#define LOG2_POLY_ORDER 7
12#define LOG2_POLY1_ORDER 11
13extern hidden const struct log2_data {
14	double invln2hi;
15	double invln2lo;
16	double poly[LOG2_POLY_ORDER - 1];
17	double poly1[LOG2_POLY1_ORDER - 1];
18	struct {
19		double invc, logc;
20	} tab[1 << LOG2_TABLE_BITS];
21#if !__FP_FAST_FMA
22	struct {
23		double chi, clo;
24	} tab2[1 << LOG2_TABLE_BITS];
25#endif
26} __log2_data;
27
28#endif
29