1 /* $OpenBSD: s_fabsf.c,v 1.3 2024/03/04 17:09:23 miod 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 DEF_STD(fabsf); 18