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

spec: add abs(int or float) function to compute absolute value #183

Open
adonovan opened this issue Mar 11, 2021 · 0 comments
Open

spec: add abs(int or float) function to compute absolute value #183

adonovan opened this issue Mar 11, 2021 · 0 comments

Comments

@adonovan
Copy link
Contributor

adonovan commented Mar 11, 2021

We should add abs to the set of "universal" predeclared functions, following Python3. It would return the absolute magnitude of its argument, preserving type (float or int), unlike Python3's math.fabs, which always returns a float.

Context: google/starlark-go#357 (comment)

@adonovan adonovan changed the title spec: add abs() function to compute absolute value spec: add abs(int or float) function to compute absolute value Mar 11, 2021
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

No branches or pull requests

1 participant