Skip to content

Math.sign and Math.trunc#2943

Merged
dbatyai merged 1 commit intojerryscript-project:masterfrom
orkvi:sign_trunc
Jul 11, 2019
Merged

Math.sign and Math.trunc#2943
dbatyai merged 1 commit intojerryscript-project:masterfrom
orkvi:sign_trunc

Conversation

@orkvi
Copy link
Copy Markdown
Contributor

@orkvi orkvi commented Jul 4, 2019

JerryScript-DCO-1.0-Signed-off-by: Virag Orkenyi orkvi@inf.u-szeged.hu

Comment thread jerry-core/ecma/builtin-objects/ecma-builtin-math.c
Comment thread jerry-core/ecma/builtin-objects/ecma-builtin-math.c Outdated
@orkvi orkvi force-pushed the sign_trunc branch 2 times, most recently from 1f26f2b to 98e2fd4 Compare July 4, 2019 09:04

if (ecma_number_is_negative (arg))
{
if (ecma_number_is_zero (arg))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to merge the positive and negative is_zero checks and return with arg? Or even merge it into the is_nan check.

Comment thread jerry-core/ecma/builtin-objects/ecma-builtin-math.c Outdated
Comment thread tests/jerry/es2015/math-sign.js Outdated
Comment thread tests/jerry/es2015/math-trunc.js Outdated
@orkvi orkvi force-pushed the sign_trunc branch 5 times, most recently from 973bc36 to d5efae9 Compare July 5, 2019 09:34
Comment thread jerry-core/ecma/builtin-objects/ecma-builtin-math.c Outdated
Comment thread jerry-core/ecma/builtin-objects/ecma-builtin-math.c Outdated
Comment thread jerry-core/ecma/builtin-objects/ecma-builtin-math.c Outdated
Comment thread jerry-core/ecma/builtin-objects/ecma-builtin-math.c Outdated
Comment thread jerry-core/ecma/builtin-objects/ecma-builtin-math.c Outdated
Comment thread jerry-core/ecma/builtin-objects/ecma-builtin-math.c
Comment thread tests/jerry/es2015/math-trunc.js Outdated
Comment thread jerry-core/ecma/builtin-objects/ecma-builtin-math.c Outdated
Copy link
Copy Markdown
Member

@rerobika rerobika left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

JerryScript-DCO-1.0-Signed-off-by: Örkényi Virág orkvi@inf.u-szeged.hu
Copy link
Copy Markdown
Member

@dbatyai dbatyai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dbatyai dbatyai merged commit 3c2088c into jerryscript-project:master Jul 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants