9
EXE RANK
Z1rT
Fexe Kullanıcısı
Puanları
0
Çözümler
0
- Katılım
- 26 Kas 2009
- Mesajlar
- 9,190
- Tepkime puanı
- 0
- Puanları
- 0
- Yaş
- 33
- Web sitesi
- www.netbilgini.net
PHP:
#include <stdio.h>
#include <stdlib.h>
double f(double x){
return x*x*x+8*x*x-7*x+11;
}
#define TUREV_K (double)0.0000001
double turev(double x,double(*f)(double),double k){
return (double)((f(x+k)-f(x))/k);
}
int main(int argc, char *argv[]){
printf("%lf\n",turev(5.0f,f,TUREV_K));
system("PAUSE");
return 0;
}
f'(x)=3x²+16x-7
f'(5)=148
f(x) fonksiyonun 5 noktasında türevinin gerçek değeri 148 dir. C bize 148.000003 olarak çok yaklaşık bir değerde hesaplıyor.