Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:add math function #485

Merged
merged 3 commits into from
Feb 23, 2023
Merged

feat:add math function #485

merged 3 commits into from
Feb 23, 2023

Conversation

noobHuKai
Copy link
Contributor

add some math function

  • Math.acosh
  • Math.asinh
  • Math.atanh
  • Math.cbrt
  • Math.cosh
  • Math.expm1
  • Math.log10
  • Math.log1p
  • Math.log2
  • Math.sinh
  • Math.tanh
  • Math.trunc

@Asday
Copy link

Asday commented Jan 11, 2023

Am I being particularly blind or are none of these in the spec?

@noobHuKai
Copy link
Contributor Author

Don't from Edition 5.1, but from Edition 6.0
These math function are common

@Asday
Copy link

Asday commented Jan 13, 2023

Common as you want:

  • Otto targets ES5. ES6 features (eg: Typed Arrays) are not supported.

-- https://github.com/robertkrimen/otto#caveat-emptor

@stevenh
Copy link
Collaborator

stevenh commented Jan 13, 2023

Lets try an move that forward :)

@stevenh
Copy link
Collaborator

stevenh commented Jan 13, 2023

@noobHuKai as you can see from failure inline.go is auto generated by tools/gen-jscore so you will need update to its configuration to ensure that's compatible.

@stevenh
Copy link
Collaborator

stevenh commented Jan 13, 2023

FYI I just merged a change which added a notification header to generated files, so it's harder for people to make this mistake in the future.

@noobHuKai
Copy link
Contributor Author

I'm sorry,I'm not familiar with configuration,Thank you for the tip ! ! !

@stevenh
Copy link
Collaborator

stevenh commented Jan 16, 2023

I'm sorry, I'm not familiar with configuration, Thank you for the tip ! ! !

It's new so no need to be sorry :)

Copy link
Collaborator

@stevenh stevenh left a comment

Choose a reason for hiding this comment

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

Looks good just some formatting issues with the test file, see: https://github.com/robertkrimen/otto/actions/runs/3916742117/jobs/6723701631

@stevenh stevenh merged commit 2b00d85 into robertkrimen:master Feb 23, 2023
sg3des pushed a commit to sg3des/otto that referenced this pull request Jul 17, 2023
Add some ES6 math functions.
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