This code runs on the host and should not use libm.h, which is meant for the target. This reverts commit 2768b71798.
2768b71798