#include <stdio.h>
#include <stdlib.h>

#include "newton.h"

#define EPSILON  0.000001
#define MAX_ITER 100000

int main()
{
    int choix = 1;
    float x0[1] = {0.5};

    printf("\nValeur initiale x : %f",x0[0]);
    /*
     * saisir le vecteur en donnant chaque composante séparée par une virgule.
     * e.g : 5.0,3.0,4.0
     */
//    scanf("%f,%f,%f",&x0[0],&x0[1],&x0[2]);
//    printVector3(x0);
    printf("\nFunction value for x : %f",g(x0[0]));

    printf("\nChoix de la méthode :");
    printf("\n1 - Methode de Newton dans R");
    printf("\n2 - Methode de Newton dans R^N");
    printf("\n3 - Benchmark\n");

//    scanf("%d",&choix);
    printf("%d\n",choix);

    switch(choix)
    {
    case 1 :
        resolveByNewton(x0[0],EPSILON,MAX_ITER);
        break;
    case 2 :
        //Nothing
        break;
    case 3 :
        //Nothing
        break;
    }

    return EXIT_SUCCESS;
}
