Files
jerryscript/tests/jerry
Yanhui Shen a9d6978e4b Fixing ecma_builtin_number_prototype_helper_round. (#1362)
"ecma_builtin_number_prototype_helper_round" is used by following
functions:
* ecma_builtin_number_prototype_object_to_fixed
* ecma_builtin_number_prototype_object_to_exponential
* ecma_builtin_number_prototype_object_to_precision

The current implementation does not support currying numbers and will
produce illegal digit for some test cases. For example, the result of
"0.95.toFixed(1)" is "0.:".

This patch fixs the issue, however the implementation of "toFixed" is
still problematic, at least not meet section 15.7.4.5 8.a of the
specification. The related test case is:

* assert((0.995).toFixed(2) === "0.99");
* assert((9.995).toFixed(2) === "9.99");

Reference:
* http://www.ecma-international.org/ecma-262/5.1/#sec-15.7.4.5

JerryScript-DCO-1.0-Signed-off-by: Yanhui Shen shen.elf@gmail.com
2016-09-20 13:13:50 +02:00
..
2015-08-12 11:49:05 +02:00
2014-08-11 19:08:54 +04:00
2015-07-07 08:25:29 +02:00
2015-07-15 12:34:51 +03:00
2015-10-30 16:41:16 +03:00
2015-06-26 20:21:59 +03:00
2015-07-01 14:44:12 +03:00
2015-07-06 11:01:02 +02:00
2016-02-09 13:20:22 +01:00
2014-10-13 17:45:20 +04:00
2016-09-08 14:05:14 +02:00
2015-12-23 14:21:10 +03:00
2014-10-15 18:02:10 +04:00