math: fix expf(-NAN) and exp2f(-NAN) to return -NAN instead of 0
authorSzabolcs Nagy <nsz@port70.net>
Fri, 4 Mar 2016 21:23:33 +0000 (21:23 +0000)
committerRich Felker <dalias@aerifal.cx>
Fri, 4 Mar 2016 22:58:49 +0000 (17:58 -0500)
commitb023c03b574acdfd73418314a5dcaa83e5cea5a0
tree87a59e15a8cb6f344deb87a0f3cc88d31fefefea
parentdb66ef1f7db7c5b672591a97a97bc789c9efe2f3
math: fix expf(-NAN) and exp2f(-NAN) to return -NAN instead of 0

expf(-NAN) was treated as expf(-large) which unconditionally
returns +0, so special case +-NAN.
reported by Petr Hosek.
src/math/exp2f.c
src/math/expf.c