rust-lang / libm

A port of MUSL's libm to Rust.
Other
548 stars 97 forks source link

Add some more basic docstrings #352

Closed JSorngard closed 3 weeks ago

JSorngard commented 3 weeks ago

Adds docstrings to tgamma, tgammaf, lgamma, lgammaf, trunc, truncf, exp10, and exp10f. Related to #336.

JSorngard commented 3 weeks ago

Should I specify that trunc rounds to the nearest integer towards 0? I currently just tried to stay as faithful as I could to the documentation of musl's trunc function.

tgross35 commented 3 weeks ago

Should I specify that trunc rounds to the nearest integer towards 0? I currently just tried to stay as faithful as I could to the documentation of musl's trunc function.

Whatever you think would be helpful reading it :) there is no need to keep the wording from specifically musl, sources like e.g. cppreference likely have more thorough docs.

JSorngard commented 3 weeks ago

Alright! I wrote it as clearly as I could and added a linebreak to the lgamma docstrings.