arm_cl_tables.c 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. #if defined(ARM_MATH_NEON)
  27. /** Exponent polynomial coefficients */
  28. const float32_t exp_tab[4*8] =
  29. {
  30. 1.f,1.f,1.f,1.f,
  31. 0.0416598916054f,0.0416598916054f,0.0416598916054f,0.0416598916054f,
  32. 0.500000596046f,0.500000596046f,0.500000596046f,0.500000596046f,
  33. 0.0014122662833f,0.0014122662833f,0.0014122662833f,0.0014122662833f,
  34. 1.00000011921f,1.00000011921f,1.00000011921f,1.00000011921f,
  35. 0.00833693705499f,0.00833693705499f,0.00833693705499f,0.00833693705499f,
  36. 0.166665703058f,0.166665703058f,0.166665703058f,0.166665703058f,
  37. 0.000195780929062f,0.000195780929062f,0.000195780929062f,0.000195780929062f
  38. };
  39. /** Logarithm polynomial coefficients */
  40. /*
  41. p0
  42. p4
  43. p2
  44. p6
  45. p1
  46. p5
  47. p3
  48. p7
  49. where Poly(x) is the Minimax approximation of log(x) over the
  50. range [1, 2]
  51. */
  52. const float32_t log_tab[4*8] =
  53. {
  54. -2.29561495781f,-2.29561495781f,-2.29561495781f,-2.29561495781f,
  55. -2.47071170807f,-2.47071170807f,-2.47071170807f,-2.47071170807f,
  56. -5.68692588806f,-5.68692588806f,-5.68692588806f,-5.68692588806f,
  57. -0.165253549814f,-0.165253549814f,-0.165253549814f,-0.165253549814f,
  58. 5.17591238022f,5.17591238022f,5.17591238022f,5.17591238022f,
  59. 0.844007015228f,0.844007015228f,0.844007015228f,0.844007015228f,
  60. 4.58445882797f,4.58445882797f,4.58445882797f,4.58445882797f,
  61. 0.0141278216615f,0.0141278216615f,0.0141278216615f,0.0141278216615f
  62. };
  63. #endif