Implement missing Math.cbrt function from ES6 (#3680)

C implementation ported from fdlibm

Part of Issue #3568

JerryScript-DCO-1.0-Signed-off-by: Rafal Walczyna r.walczyna@samsung.com
This commit is contained in:
Rafal Walczyna
2020-04-20 15:40:03 +02:00
committed by GitHub
parent 1b01171a60
commit 453da11398
7 changed files with 186 additions and 4 deletions
@@ -552,11 +552,7 @@ ecma_builtin_math_dispatch_routine (uint16_t builtin_routine_id, /**< built-in w
}
case ECMA_MATH_OBJECT_CBRT:
{
#ifdef JERRY_LIBM_MATH_H
return ecma_raise_type_error (ECMA_ERR_MSG ("UNIMPLEMENTED: Math.cbrt"));
#else /* !JERRY_LIBM_MATH_H */
x = DOUBLE_TO_ECMA_NUMBER_T (cbrt (x));
#endif /* JERRY_LIBM_MATH_H */
break;
}
case ECMA_MATH_OBJECT_COSH: