2 * ====================================================
3 * Copyright (C) 1998 by Cygnus Solutions. All rights reserved.
5 * Permission to use, copy, modify, and distribute this
6 * software is freely granted, provided that this notice
8 * ====================================================
12 Fast version of exp using Intel float instructions.
14 float _f_expf (float x);
16 Function computes e ** x. The following special cases exist:
17 1. if x is 0.0 ==> return 1.0
18 2. if x is infinity ==> return infinity
19 3. if x is -infinity ==> return 0.0
20 4. if x is NaN ==> return x
21 There is no error checking or setting of errno.
29 float _f_expf (float x)
34 asm ("fldl2e; fmulp; fld %%st; frndint; fsub %%st,%%st(1); fxch;" \
35 "fchs; f2xm1; fld1; faddp; fxch; fld1; fscale; fstp %%st(1); fmulp" :
36 "=t"(result) : "0"(x));
39 else if (x == -infinityf())