Math exponent in C language.

Thread Starter

Lilian23

Joined Oct 7, 2008
12
Hi!

How would you write this in C?

y = -8E-11x^5

I am aware of the pow() function but that takes things like 4^5, 2^3, etc. What about a very small number like that to the fifth power? Is there something for "E"? my compiler does not like it if I put -.00000000008

thanks
 

mnwcsult

Joined Oct 29, 2008
1
Hi!

How would you write this in C?

y = -8E-11x^5

I am aware of the pow() function but that takes things like 4^5, 2^3, etc. What about a very small number like that to the fifth power? Is there something for "E"? my compiler does not like it if I put -.00000000008

thanks
You are correct about pow(),

y = pow(-8.0E-11, 5.0);

FYI, you really should have just looked this up.
 

chuka_709

Joined Nov 2, 2008
1
Hi all,
a0=a1=1; ai=a(i-2)+a(i-1)/pow(2,i-1); i=2,3,... so
a0*a1*...*a14=?
how would you write this in C?

Plz help me and Thx
 
Top