summaryrefslogtreecommitdiff
path: root/lib/libm/arch/sh/s_fabsf.c
blob: 77456a54ad29931a046b9de37d07bbecf5882782 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/*	$OpenBSD: s_fabsf.c,v 1.2 2014/04/18 15:09:52 guenther 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);
}