Closed
Description
Needs to cover the float and half case for all three: https://godbolt.org/z/64fzEq3nd
This is a perfect candidate for instruction expansion:
log2
- This is the simplest case just call unary dxilop 23
log
- Call
log2
DXIL op (ie 23) - Create a ln2 const value
M_LN2_F
0.693147180559945309417232121458176568f
M_LN2_H
0.693147180559945309417232121458176568h
- Floating point multiply the value of M_LN2 with the return value of
log2
- Reference implementation
- Call
log10
- Define M_LN10
M_LN10_F
2.30258509299404568401799145468436421f
M_LN10_H
2.30258509299404568401799145468436421h
- Call
log2
DXIL op (ie 23) - Create a
log2_10Const
=M_LN2
/M_LN10
const value
- Define M_LN10
- Floating point multiply the value of
log2_10Const
with the return value oflog2
- Reference implementation
Metadata
Metadata
Assignees
Type
Projects
Status
No status