1 
2 /*
3  * Copyright (c) 2017, NVIDIA CORPORATION.  All rights reserved.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 #define LOG_C1       -0.5
20 #define LOG_C2        0.333332955837249755859375
21 #define LOG_C3       -0.2500000298023223876953125
22 #define LOG_C4        0.20003028213977813720703125
23 #define LOG_C5       -0.1666888296604156494140625
24 #define LOG_C6        0.1420460045337677001953125
25 #define LOG_C7       -0.12383414804935455322265625
26 #define LOG_C8        0.11964692175388336181640625
27 #define LOG_C9       -0.11824800074100494384765625
28 #define LOG_CA        6.7655406892299652099609375e-2
29 
30 #define CANONICAL_NAN   0x7FC00000
31 #define MINUS_INF       0xFF800000
32 #define NAN_INF_MASK    0x7F800000
33 
34 #define PARTITION_CONST   0.707106781186547524f
35 #define TWO_TO_M126_F     0x1p-126f
36 #define TWO_TO_24_F       16777216.0f
37 #define U24               24
38 #define BIT_MASK2         0x807FFFFF
39 #define OFFSET            0x3f000000
40 #define EXP_OFFSET        126
41