Пример #1
0
//## Complex Complex.ctanl();
static KMETHOD Complex_ctanl(KonohaContext *kctx, KonohaStack *sfp)
{
	kComplex *kc = (kComplex *) sfp[0].asObject;
	long double _Complex zl = (long double _Complex)kc->z;
	long double ret = ctanl(zl);
	KReturnFloatValue(ret);
}
Пример #2
0
//## Complex Complex.ctanl();
static KMETHOD Complex_ctanl(KonohaContext *kctx, KonohaStack *sfp)
{
	kComplex *kc = (kComplex *) sfp[0].asObject;
	long double _Complex zl = (long double _Complex)kc->z;
#if !defined(__CYGWIN__)
	long double ret = ctanl(zl);
#else
	long double ret = ctan(zl);
#endif
	KReturnFloatValue(ret);
}
void test3l(__complex__ long double x, __complex__ long double y, int i)
{
  if (ccosl(x) != ccosl(-x))
    link_error();

  if (ccosl(ctanl(x)) != ccosl(ctanl(-x)))
    link_error();

  if (ctanl(x-y) != -ctanl(y-x))
    link_error();

  if (ccosl(x/y) != ccosl(-x/y))
    link_error();

  if (ccosl(x/y) != ccosl(x/-y))
    link_error();

  if (ccosl(x/ctanl(y)) != ccosl(-x/ctanl(-y)))
    link_error();

  if (ccosl(x*y) != ccosl(-x*y))
    link_error();

  if (ccosl(x*y) != ccosl(x*-y))
    link_error();

  if (ccosl(ctanl(x)*y) != ccosl(ctanl(-x)*-y))
    link_error();

  if (ccosl(ctanl(x/y)) != ccosl(-ctanl(x/-y)))
    link_error();

  if (ccosl(i ? x : y) != ccosl(i ? -x : y))
    link_error();

  if (ccosl(i ? x : y) != ccosl(i ? x : -y))
    link_error();

  if (ccosl(i ? x : ctanl(y/x)) != ccosl(i ? -x : -ctanl(-y/x)))
    link_error();

  if (~x != -~-x)
    link_error();

  if (ccosl(~x) != ccosl(-~-x))
    link_error();

  if (ctanl(~(x-y)) != -ctanl(~(y-x)))
    link_error();

  if (ctanl(~(x/y)) != -ctanl(~(x/-y)))
    link_error();

#ifdef HAVE_C99_RUNTIME
  if (cargl(x) != atan2l(__imag__ x, __real__ x))
    link_error ();
#endif
}
Пример #4
0
 TEST_TRACE(C99 7.3.5.3)
 d = catan(d);
 f = catanf(f);
 ld = catanl(ld);
 TEST_TRACE(C99 7.3.5.4)
 d = ccos(d);
 f = ccosf(f);
 ld = ccosl(ld);
 TEST_TRACE(C99 7.3.5.5)
 d = csin(d);
 f = csinf(f);
 ld = csinl(ld);
 TEST_TRACE(C99 7.3.5.6)
 d = ctan(d);
 f = ctanf(f);
 ld = ctanl(ld);
 TEST_TRACE(C99 7.3.6.1)
 d = cacosh(d);
 f = cacoshf(f);
 ld = cacoshl(ld);
 TEST_TRACE(C99 7.3.6.2)
 d = casinh(d);
 f = casinhf(f);
 ld = casinhl(ld);
 TEST_TRACE(C99 7.3.6.3)
 d = catanh(d);
 f = catanhf(f);
 ld = catanhl(ld);
 TEST_TRACE(C99 7.3.6.4)
 d = ccosh(d);
 f = ccoshf(f);