Skip to content

Non-determinism with division by zeroΒ #92

Open
@axic

Description

@axic

Source: https://webassembly.github.io/spec/core/_download/WebAssembly.pdf

pp48:
idiv_u𝑁 (𝑖1, 𝑖2)
β€’ If 𝑖2 is 0, then the result is undefined.

idiv_s𝑁 (𝑖1, 𝑖2)
β€’ If 𝑗2 is 0, then the result is undefined.
β€’ Else if 𝑗1 divided by 𝑗2 is 2π‘βˆ’1, then the result is undefined.

irem_u𝑁 (𝑖1, 𝑖2)
β€’ If 𝑗2 is 0, then the result is undefined.

irem_s𝑁 (𝑖1, 𝑖2)
β€’ If 𝑖2 is 0, then the result is undefined.

pp61:
trunc_u𝑀,𝑁 (𝑧)
(Not a problem since this is floating point only.)

pp62:
trunc_s𝑀,𝑁 (𝑧)
(Not a problem since this is floating point only.)

(raised by @holiman)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions