See this post
TLDR. I usually use a custom intrinsic, not sure if the devs have added a standard way since that post.