Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Clarify behavior of float division/remainder by 0 #2798

@teoxoy

Description

@teoxoy

Currently the spec mentions that division/modulo by 0 on integers results in 0 (i.e. x / 0 = 0 and x % 0 = 0).

image

I think it's important to clarify this for floats as well since at least SPIR-V's OpFRem (haven't looked at the behavior of other backends yet) seems to have undefined behavior if the 2nd operand is 0.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    wgslWebGPU Shading Language Issueswgsl resolvedResolved - waiting for a change to the WGSL specification

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions