[PATCH] D156178: [HLSL] add pow library function

Justin Bogner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 8 10:50:10 PDT 2023


bogner added a comment.

In D156178#4530161 <https://reviews.llvm.org/D156178#4530161>, @bogner wrote:

> Looking at https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-pow, it seems a bit underspecified, but do we need to worry about differences between that spec and IEEE behaviour here? For example, it says there that `x<0, y=any -> NaN`, but we'll only generate `NaN` for non-integer `y` in these cases as per https://en.cppreference.com/w/c/numeric/math/pow

FWIW it looks like the behaviour here matches what DXC does in practice today, so discussing the discrepancy here probably doesn't need to block getting this in


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156178/new/

https://reviews.llvm.org/D156178



More information about the cfe-commits mailing list