#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "proto/exec.h"
#include "proto/dos.h"
#include "fastsincos.h"

main()
{
	int	i;
	double	j;
	struct Library *FastsincosBase;

	printf("\nFastsincosBase = OpenLibrary(\"fastsincos.library\",0);\t");
	FastsincosBase = OpenLibrary("fastsincos.library",0);
	if (FastsincosBase == NULL)
	{
		printf("Fail\n");
		return(20);
	};
	printf("Ok\n");

	printf("\nStarting now 40000 calls to sin in Beatles IEEE library\n");
	j = sqrt(PI);
	for (i=0;i<40000;i++)
		j = sin(j);

	printf("\nStarting now 40000 calls to fastsin in fastsincos.library\n");
	j = sqrt(PI);
	for (i=0;i<40000;i++)
		j = fastsin(j);

	printf("\nCloseLibrary (FastsincosBase);\n");
	CloseLibrary (FastsincosBase);
	return (EXIT_SUCCESS);
}

