1 /* 2 * Copyright (c) 2016, 2019 ARM Limited. 3 * 4 * SPDX-License-Identifier: MIT 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to 8 * deal in the Software without restriction, including without limitation the 9 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 * sell copies of the Software, and to permit persons to whom the Software is 11 * furnished to do so, subject to the following conditions: 12 * 13 * The above copyright notice and this permission notice shall be included in all 14 * copies or substantial portions of the Software. 15 * 16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 * SOFTWARE. 23 */ 24 #include "arm_math.h" 25 #include "NEMath.h" 26 27 #if defined(ARM_MATH_NEON) 28 29 /** Exponent polynomial coefficients */ 30 const float32_t exp_tab[4*8] = 31 { 32 1.f,1.f,1.f,1.f, 33 0.0416598916054f,0.0416598916054f,0.0416598916054f,0.0416598916054f, 34 0.500000596046f,0.500000596046f,0.500000596046f,0.500000596046f, 35 0.0014122662833f,0.0014122662833f,0.0014122662833f,0.0014122662833f, 36 1.00000011921f,1.00000011921f,1.00000011921f,1.00000011921f, 37 0.00833693705499f,0.00833693705499f,0.00833693705499f,0.00833693705499f, 38 0.166665703058f,0.166665703058f,0.166665703058f,0.166665703058f, 39 0.000195780929062f,0.000195780929062f,0.000195780929062f,0.000195780929062f 40 }; 41 42 43 44 /** Logarithm polynomial coefficients */ 45 46 /* 47 p0 48 p4 49 p2 50 p6 51 p1 52 p5 53 p3 54 p7 55 where Poly(x) is the Minimax approximation of log(x) over the 56 range [1, 2] 57 */ 58 59 const float32_t log_tab[4*8] = 60 { 61 -2.29561495781f,-2.29561495781f,-2.29561495781f,-2.29561495781f, 62 -2.47071170807f,-2.47071170807f,-2.47071170807f,-2.47071170807f, 63 -5.68692588806f,-5.68692588806f,-5.68692588806f,-5.68692588806f, 64 -0.165253549814f,-0.165253549814f,-0.165253549814f,-0.165253549814f, 65 5.17591238022f,5.17591238022f,5.17591238022f,5.17591238022f, 66 0.844007015228f,0.844007015228f,0.844007015228f,0.844007015228f, 67 4.58445882797f,4.58445882797f,4.58445882797f,4.58445882797f, 68 0.0141278216615f,0.0141278216615f,0.0141278216615f,0.0141278216615f 69 }; 70 71 72 73 74 75 76 #endif 77