mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
Further optimize the math library
The sincosf() function is now twice as fast, thanks to ARM Limited. The same might also be true of logf() and expm1f() which have been updated.
This commit is contained in:
parent
e8b43903b2
commit
420f889ac3
22 changed files with 854 additions and 118 deletions
24
libc/tinymath/hornerf.internal.h
Normal file
24
libc/tinymath/hornerf.internal.h
Normal file
|
@ -0,0 +1,24 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_TINYMATH_HORNERF_INTERNAL_H_
|
||||
#define COSMOPOLITAN_LIBC_TINYMATH_HORNERF_INTERNAL_H_
|
||||
#include "third_party/libcxx/math.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
/*
|
||||
* Helper macros for double-precision Horner polynomial evaluation.
|
||||
*
|
||||
* Copyright (c) 2022-2023, Arm Limited.
|
||||
* SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception
|
||||
*/
|
||||
|
||||
#if WANT_VMATH
|
||||
#define FMA(x, y, z) vfmaq_f32(z, x, y)
|
||||
#else
|
||||
#define FMA fmaf
|
||||
#endif
|
||||
|
||||
#include "libc/tinymath/horner_wrap.internal.h"
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_TINYMATH_HORNERF_INTERNAL_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue