xref: /openbsd/lib/libm/arch/hppa/e_sqrt.c (revision 891d7ab6)
1 /*
2  * Written by Michael Shalayeff. Public Domain
3  */
4 
5 /* LINTLIBRARY */
6 
7 #include <sys/cdefs.h>
8 #include <float.h>
9 #include <math.h>
10 
11 double
12 sqrt(double x)
13 {
14 	__asm__ __volatile__ ("fsqrt,dbl %0, %0" : "+f" (x));
15 	return (x);
16 }
17 
18 #ifdef	lint
19 /* PROTOLIB1 */
20 long double sqrtl(long double);
21 #else	/* lint */
22 __weak_alias(sqrtl, sqrt);
23 #endif	/* lint */
24