Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Using pow for a small integer power is a no-no: less efficient and less accurate.

Using pow for a small integer power compiles into the exact same code: https://godbolt.org/g/CjoHdJ



Only for 1 or 2, unless you turn on --fast-math.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: