#include <stdio.h>
#include <stdlib.h>
#include <math.h>

#define USE_GMP
#define USE_MPFR
#include "bnc.h"

#define DIM 10

int main()
{
	long int i;
	mpf_t ip;
	MPFVector x, b;

	set_bnc_default_prec_decimal(50);

	mpf_init(ip);
	x = init_mpfvector(DIM);
	b = init_mpfvector(DIM);

	for(i = 0; i < DIM; i++)
	{
		set_mpfvector_i_d(x, i, (double)(i + 1));
		set_mpfvector_i_d(b, i, (double)(DIM - i));
	}

	ip_mpfvector(ip, x, b);

	printf("Inner Produce: ");
	mpf_out_str(stdout, 10, 0, ip);
	printf("\n");

	mpf_clear(ip);
	free_mpfvector(x);
	free_mpfvector(b);

	return EXIT_SUCCESS;
}

