diff options
Diffstat (limited to 'winsup/mingw/mingwex/math/logbf.c')
-rw-r--r-- | winsup/mingw/mingwex/math/logbf.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/winsup/mingw/mingwex/math/logbf.c b/winsup/mingw/mingwex/math/logbf.c new file mode 100644 index 000000000..b5f57d2e1 --- /dev/null +++ b/winsup/mingw/mingwex/math/logbf.c @@ -0,0 +1,16 @@ +/* + * Written by J.T. Conklin <jtc@netbsd.org>. + * Changes for long double by Ulrich Drepper <drepper@cygnus.com> + * Public domain. + */ + +#include <math.h> + +float +logbf (float x) +{ + float res; + asm ("fxtract\n\t" + "fstp %%st" : "=t" (res) : "0" (x)); + return res; +} |