Skip to content

OpenGL Reference pages conflict with specifications for atan undefined behavior #152

@johnstiles-google

Description

@johnstiles-google

The Reference pages for atan indicate that "the result is undefined if x=0".

https://registry.khronos.org/OpenGL-Refpages/gl4/html/atan.xhtml

However, the GLSL specification does not match, and for atan it states "results are undefined if x and y are both 0."

https://registry.khronos.org/OpenGL/specs/gl/GLSLangSpec.4.60.pdf

(The Reference page phrasing is also somewhat vague because it has a paragraph specifically about "the second overload"—the one containing an x parameter—but the text about undefined results is not contained in this paragraph.)

FWIW, the SPIR-V definition of Atan2 matches the GLSL specification's text (undefined when x and y are both 0), not the Reference pages text (x=0).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions