diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /modules/fdlibm/patches/10_remove_unused_function_from_k_exp_cpp.patch | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'modules/fdlibm/patches/10_remove_unused_function_from_k_exp_cpp.patch')
-rw-r--r-- | modules/fdlibm/patches/10_remove_unused_function_from_k_exp_cpp.patch | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/modules/fdlibm/patches/10_remove_unused_function_from_k_exp_cpp.patch b/modules/fdlibm/patches/10_remove_unused_function_from_k_exp_cpp.patch new file mode 100644 index 000000000..712110dc8 --- /dev/null +++ b/modules/fdlibm/patches/10_remove_unused_function_from_k_exp_cpp.patch @@ -0,0 +1,55 @@ +diff --git a/modules/fdlibm/src/k_exp.cpp b/modules/fdlibm/src/k_exp.cpp +--- a/modules/fdlibm/src/k_exp.cpp ++++ b/modules/fdlibm/src/k_exp.cpp +@@ -22,18 +22,16 @@ + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + + //#include <sys/cdefs.h> + //__FBSDID("$FreeBSD$"); + +-#include <complex.h> +- + #include "math_private.h" + + static const uint32_t k = 1799; /* constant for reduction */ + static const double kln2 = 1246.97177782734161156; /* k * ln2 */ + + /* + * Compute exp(x), scaled to avoid spurious overflow. An exponent is + * returned separately in 'expt'. +@@ -76,32 +74,8 @@ double + double exp_x, scale; + int ex_expt; + + exp_x = __frexp_exp(x, &ex_expt); + expt += ex_expt; + INSERT_WORDS(scale, (0x3ff + expt) << 20, 0); + return (exp_x * scale); + } +- +-double complex +-__ldexp_cexp(double complex z, int expt) +-{ +- double x, y, exp_x, scale1, scale2; +- int ex_expt, half_expt; +- +- x = creal(z); +- y = cimag(z); +- exp_x = __frexp_exp(x, &ex_expt); +- expt += ex_expt; +- +- /* +- * Arrange so that scale1 * scale2 == 2**expt. We use this to +- * compensate for scalbn being horrendously slow. +- */ +- half_expt = expt / 2; +- INSERT_WORDS(scale1, (0x3ff + half_expt) << 20, 0); +- half_expt = expt - half_expt; +- INSERT_WORDS(scale2, (0x3ff + half_expt) << 20, 0); +- +- return (CMPLX(cos(y) * exp_x * scale1 * scale2, +- sin(y) * exp_x * scale1 * scale2)); +-} |