Commit Graph

4 Commits

Author SHA1 Message Date
Akos Kiss 9d4f7c917f Fixing Math.pow
The Math.pow implementation relies on libm's pow. However, the ISO C
and ES5.1 standards differ on pow:
  * `x ** NAN` is NAN in ES but `+1 ** y` is 1 in C
  * `+-1 ** +-INF` is NAN in ES but 1 in C

This patch:
  * Modifies the Math.pow implementation to handle the special cases
    instead calling pow.
  * Adds a test case to jerry-test-suite as it did not test
    `Math.pow(1,NaN)`.
  * Fixes jerry-libm's pow, as it was not standard conforming, which
    helped hiding the error in Math.pow.
  * Updates the unit test for libm.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-08-11 22:49:36 +02:00
Ruben Ayrapetyan ba4dca2e98 Fixing some tests from internal test suite. 2014-10-20 14:15:01 +04:00
Ruben Ayrapetyan 5b242d6cc5 Fixing some tests from internal test suite. 2014-10-16 11:23:34 +04:00
e.gavrin 7f8f03ad20 Add test on chapter 15 2014-10-07 17:43:18 +04:00