summaryrefslogtreecommitdiff
path: root/lib/libm/arch/sh/s_fabsf.c
blob: 7b1402325da8dd259fe588bce60a909b816c53c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/*	$OpenBSD: s_fabsf.c,v 1.1 2009/04/05 19:26:27 martynas Exp $	*/

/*
 * Written by Martynas Venckus.  Public domain
 */

#include <math.h>

float
fabsf(float f)
{
	/* Same operation is performed regardless of precision. */
	__asm__ __volatile__ ("fabs %0" : "+f" (f));

	return (f);
}