Natural Log function not working in Web IDE

Hey guys, running into a strange issue using the log() function. The compiler says that “‘log’ is not declared in this scope.”

I’ve included a screenshot. Any ideas? Thanks!

Hi @Breau

Did you remember to add this?

#include "math.h"
2 Likes

I think including math.h should fix the problem.

#include "math.h"

Perfect, that worked. That was my initial reaction, but I was thrown off because log() turned blue as if it was recognized.

Thanks for the quick reply!