mirror of
git://git.musl-libc.org/musl
synced 2025-04-28 13:58:36 +00:00
math: use sqrtl if FLT_EVAL_METHOD==2 in acosh and acoshf
this makes acosh slightly more precise around 1.0 on i386
This commit is contained in:
parent
551da2c191
commit
4b539a826b
@ -1,5 +1,10 @@
|
|||||||
#include "libm.h"
|
#include "libm.h"
|
||||||
|
|
||||||
|
#if FLT_EVAL_METHOD==2
|
||||||
|
#undef sqrt
|
||||||
|
#define sqrt sqrtl
|
||||||
|
#endif
|
||||||
|
|
||||||
/* acosh(x) = log(x + sqrt(x*x-1)) */
|
/* acosh(x) = log(x + sqrt(x*x-1)) */
|
||||||
double acosh(double x)
|
double acosh(double x)
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,13 @@
|
|||||||
#include "libm.h"
|
#include "libm.h"
|
||||||
|
|
||||||
|
#if FLT_EVAL_METHOD==2
|
||||||
|
#undef sqrtf
|
||||||
|
#define sqrtf sqrtl
|
||||||
|
#elif FLT_EVAL_METHOD==1
|
||||||
|
#undef sqrtf
|
||||||
|
#define sqrtf sqrt
|
||||||
|
#endif
|
||||||
|
|
||||||
/* acosh(x) = log(x + sqrt(x*x-1)) */
|
/* acosh(x) = log(x + sqrt(x*x-1)) */
|
||||||
float acoshf(float x)
|
float acoshf(float x)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user