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

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

Open
johnstiles-google opened this issue May 20, 2024 · 0 comments

Comments

@johnstiles-google
Copy link

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).

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