1 /* $OpenBSD: s_fabsf.c,v 1.1 2009/04/05 19:26:27 martynas Exp $ */ 2 3 /* 4 * Written by Martynas Venckus. Public domain 5 */ 6 7 #include <math.h> 8 9 float 10 fabsf(float f) 11 { 12 /* Same operation is performed regardless of precision. */ 13 __asm__ __volatile__ ("fabs %0" : "+f" (f)); 14 15 return (f); 16 } 17 18