/* test2.c */
#include <stdio.h>
#include "mpa.h"
#include "mpa_v.h"
/*#define SIN /* m_sin() check */
#define COS /* m_cos() check */
/*#define TAN /* m_tan() check */
/*#define ASIN /* m_asin() check */
/*#define ACOS /* m_acos() check */
/*#define ATAN /* m_atan() check */
int main(void)
{
MPA x;
x = _PI_4;
#ifdef SIN
m_print("sin(pi/4) = ", m_sin(x), 0);
#endif
#ifdef COS
m_print("cos(pi/4) = ", m_cos(x), 0);
#endif
x = m_set_a("0.9999");
#ifdef ASIN
m_print("asin(0.9999) = ", m_asin(x), 0);
#endif
#ifdef ACOS
m_print("acos(0.9999) = ", m_acos(x), 0);
#endif
x = m_set_a("0.0111");
#ifdef ASIN
m_print("asin(0.0111) = ", m_asin(x), 0);
#endif
#ifdef ACOS
m_print("acos(0.0111) = ", m_acos(x), 0);
#endif
x = m_div_s(_PI, 3);
#ifdef TAN
m_print("tan(pi/3) =", m_tan(x), 0);
#endif
#ifdef ATAN
m_print("atan(_SQRT3)=", m_atan(_SQRT3), 0);
#endif
return 1;
}
|