summaryrefslogtreecommitdiffstats
path: root/lib/libm/arch/hppa/e_sqrt.c
blob: bd9e61e9ffa0c70051d9fbe3e05e8e5b04c48813 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
 * Written by Michael Shalayeff. Public Domain
 */

/* LINTLIBRARY */

#include <sys/cdefs.h>
#include <float.h>
#include <math.h>

double
sqrt(double x)
{
	__asm__ __volatile__ ("fsqrt,dbl %0, %0" : "+f" (x));
	return (x);
}

#ifdef	lint
/* PROTOLIB1 */
long double sqrtl(long double);
#else	/* lint */
__weak_alias(sqrtl, sqrt);
#endif	/* lint */