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

Inconsistency in operator for division of floats #2716

Closed
ghost opened this issue Nov 16, 2023 · 1 comment
Closed

Inconsistency in operator for division of floats #2716

ghost opened this issue Nov 16, 2023 · 1 comment

Comments

@ghost
Copy link

ghost commented Nov 16, 2023

To whom it may concern,

I have encountered an issue with the operand "/div (÷)" where the result (shown in picture) is rounded down automatically; however when I use the operand " (/) " it retrieves the exact float.

Is it possible to enable some similar functionality so that the /div operand also produces the same result as the standard divide operand?

working

not working

@Pangoraw
Copy link
Collaborator

This is the expected behavior: div (÷) refers to the integer division https://docs.julialang.org/en/v1/base/math/#Base.div
You can use const ÷ = / if you want ÷ to behave like /

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