Pow() and math.h [SOLVED]

I was trying to use pow() in my code yesterday, and it wouldn’t compile unless I included #include <math.h>. Can anyone else independently verify/confirm this? If confirmed, I can submit a pull request to update the docs.

1 Like

Hi @wgbartley

That is right but it is already in the doc:

MATH
Note that in addition to functions outlined below all of the newlib math functions described at sourceware.org are also available for use by simply including the math.h header file thus:#include "math.h"

2 Likes

Ahh… I didn’t see that part. I just jumped straight to the function docs. I think I’ve used map() in the past without including math.h, so I never thought to check the introduction to the section. Thanks for pointing that out!

2 Likes