Share via

XMScalarACos documentation for ULP errors

John 76 Reputation points
2022-04-22T16:26:22.403+00:00

Hi all,

I saw this page: https://learn.microsoft.com/en-us/windows/win32/api/directxmath/nf-directxmath-xmscalaracos

but I cannot find the documentation for ULP error. Does it never be documented?

Thanks.

Windows development | Windows API - Win32

1 answer

Sort by: Most helpful
  1. Junjie Zhu - MSFT 21,746 Reputation points
    2022-04-25T07:51:42.82+00:00

    Hello,
    Welcome to Microsoft Q&A!

    XMScalarACos uses a 7-degree minimax approximation.

    According to the documentation Floating-point rules (Direct3D 11)

    IEEE-754 requires floating-point operations to produce a result that is the nearest representable value to an infinitely-precise result, known as round-to-nearest-even. Direct3D 11 defines the same requirement:32-bit floating-point operations produce a result that is within 0.5 unit-last-place (ULP) of the infinitely-precise result.

    Thank you.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.