getopt: fix null pointer arithmetic ub
[musl] / src / math / powf_data.h
1 /*
2  * Copyright (c) 2017-2018, Arm Limited.
3  * SPDX-License-Identifier: MIT
4  */
5 #ifndef _POWF_DATA_H
6 #define _POWF_DATA_H
7
8 #include "libm.h"
9 #include "exp2f_data.h"
10
11 #define POWF_LOG2_TABLE_BITS 4
12 #define POWF_LOG2_POLY_ORDER 5
13 #if TOINT_INTRINSICS
14 #define POWF_SCALE_BITS EXP2F_TABLE_BITS
15 #else
16 #define POWF_SCALE_BITS 0
17 #endif
18 #define POWF_SCALE ((double)(1 << POWF_SCALE_BITS))
19 extern hidden const struct powf_log2_data {
20         struct {
21                 double invc, logc;
22         } tab[1 << POWF_LOG2_TABLE_BITS];
23         double poly[POWF_LOG2_POLY_ORDER];
24 } __powf_log2_data;
25
26 #endif