]> git.proxmox.com Git - wasi-libc.git/blob - libc-top-half/musl/src/math/i386/sqrtf.c
Update to musl 1.2.1. (#222)
[wasi-libc.git] / libc-top-half / musl / src / math / i386 / sqrtf.c
1 #include <math.h>
2
3 float sqrtf(float x)
4 {
5 long double t;
6 /* The long double result has sufficient precision so that
7 * second rounding to float still keeps the returned value
8 * correctly rounded, see Pierre Roux, "Innocuous Double
9 * Rounding of Basic Arithmetic Operations". */
10 __asm__ ("fsqrt" : "=t"(t) : "0"(x));
11 return (float)t;
12 }