Hi there?

I would like to use some of math related function calls like pow, sin, sqrt...

But it seems math function doesn't work with SDK.

Either #include<math.h> on user_main or -lm on the Linker doesn't work too.

Do you have any idea to work them out?

Thanks

## How to use Math related function calls?

### Re: How to use Math related function calls?

Postby **steve2077** » Thu Mar 26, 2015 9:16 am

I have solved some part of it by simulating the math function though, still I would like to know how to link standard math.h or math library in sdk(if available)..

Thanks..

Thanks..

Code: Select all

`double pow(double x,double y)`

{

double z , p=1;

//y<0 ? z=-y : z=y ;

if(y<0)

z = fabs(y);

else

z = y;

for(int i=0; i<z ; ++i)

{

p *= x;

}

if(y<0)

return 1/p;

else

return p;

}

double fabs(double x)

{

return( x<0 ? -x : x );

}

- neilwalker
**Posts:**6**Joined:**Wed Dec 20, 2017 7:17 pm

### Re: How to use Math related function calls?

Postby **neilwalker** » Fri Sep 11, 2020 4:26 pm

Hello guys,

How do you use a functional math library? I've been just reading

https://writemyessaytoday.net

Erasmus student CV, Rethymno, Greece

How do you use a functional math library? I've been just reading

*Programming Interviews Exposed: Secrets to Landing Your Next Job*by John Mongan and Noah Kindler. I'm a programming intern from Rethymno studying online now in one of the American colleges.https://writemyessaytoday.net

Erasmus student CV, Rethymno, Greece

### Who is online

Users browsing this forum: No registered users and 12 guests

### Login

### Newbies Start Here

Are you new to ESP8266?

Unsure what to do?

Dunno where to start?

Start right here!

### Latest SDK

### Documentation

Complete listing of the official ESP8266 related documentation release by ESPRESSIF!

Must read here!

- All times are UTC+08:00
- Top
- Delete all board cookies

### About Us

Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.