18 lines
373 B
C
18 lines
373 B
C
#include <stdio.h>
|
|
#include <math.h>
|
|
#include "lib.h"
|
|
|
|
#define FIBO_NUM 15
|
|
|
|
#define SIN_A 1.6
|
|
#define SIN_B 3.7
|
|
#define ZEROIN_ERR 0.001
|
|
|
|
int main()
|
|
{
|
|
printf("fibonachi number under index %u: %zu\n", FIBO_NUM, fibo(FIBO_NUM));
|
|
printf("zero of sin(x) in interval (%lf %lf) is %lf\n",
|
|
SIN_A, SIN_B, zeroin(sin, ZEROIN_ERR, SIN_A, SIN_B));
|
|
return 0;
|
|
}
|