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

BUG: Fix integer / float scalar promotion #23148

Merged
merged 3 commits into from Feb 2, 2023

Commits on Feb 2, 2023

  1. BUG: Fix integer / float scalar promotion

    Integer true division converted the other type directly to the output.
    This is correct if both operands are integers, but since the output
    of integer division is double precision, it is incorrect when the
    other operand is a float32 or float16.
    
    The solution is that we must convert to the same type (as always)
    and only the output type is adjusted, but not the inputs.
    This means that `integer / float` will correctly defer to the float
    which leads to correct promotion.
    seberg authored and charris committed Feb 2, 2023
    Configuration menu
    Copy the full SHA
    3caf995 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    42bfe1a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c115e12 View commit details
    Browse the repository at this point in the history