Definitions of sqrt, sin, cos, pow etc. in cmath

后端 未结 8 1236
野趣味
野趣味 2020-12-13 00:13

Are there any definitions of functions like sqrt(), sin(), cos(), tan(), log(), exp() (these fr

8条回答
  •  粉色の甜心
    2020-12-13 01:16

    Definitely take a look at the fdlibm sources. They're nice because the fdlibm library is self-contained, each function is well-documented with detailed explanations of the mathematics involved, and the code is immensely clear to read.

提交回复
热议问题