Guard exp2f_ to never return a negative value

Certain inputs could end up returning -NaN. That would then be used as
input to eval later, and the sign-stripping wouldn't work correctly, so
we'd pass -NaN to powf_, triggering the assert.

Mathematically, exp2f_ should never return a negative value, so clamp
any underflow result to 0.

Bug: chromium:996795
Change-Id: I39072265eb2e3239590c9928df3b68cd0bfa83a3
Commit-Queue: Brian Osman <>
Reviewed-by: Mike Klein <>
6 files changed