Exemplo n.º 1
0
long double complex
cacoshl(long double complex z)
{
	long double complex w;

	w = clogl(z + csqrtl(z + 1) * csqrtl(z - 1));
	return (w);
}
Exemplo n.º 2
0
// FIXME
long double complex casinl(long double complex z) {
  long double complex w;
  long double x, y;

  x = creall(z);
  y = cimagl(z);
  w = CMPLXL(1.0 - (x - y) * (x + y), -2.0 * x * y);
  return clogl(CMPLXL(-y, x) + csqrtl(w));
}
Exemplo n.º 3
0
long double complex casinl (long double complex Z)
{
  long double complex Res;
  long double x, y;

  x = __real__ Z;
  y = __imag__ Z;

  if (y == 0.0L)
    {
      __real__ Res = asinl (x);
      __imag__ Res = 0.0L;
    }
  else  /* -I * clog(I * Z + csqrt(1.0 - Z * Z))) */
    {
      long double complex ZZ;
                                 
      /* Z * Z = ((x - y) * (x + y)) + (2.0 * x * y) * I */
      /* calculate 1 - Z * Z */
      __real__ ZZ = 1.0L - (x - y) * (x + y);
      __imag__ ZZ = -2.0L * x * y;
      ZZ = csqrtl (ZZ);


      /* add  I * Z  to ZZ */

      __real__ ZZ -= y;
      __imag__ ZZ += x;

      ZZ = clogl (ZZ);

      /* mult by -I */
      __real__ Res = __imag__ ZZ;
      __imag__ Res = - __real__ ZZ;  
    }
  return (Res);
}
Exemplo n.º 4
0
 TEST_TRACE(C99 7.3.7.2)
 d = clog(d);
 f = clogf(f);
 ld = clogl(ld);
 TEST_TRACE(C99 7.3.8.1)
 d = cabs(d);
 f = cabsf(f);
 ld = cabsl(ld);
 TEST_TRACE(C99 7.3.8.2)
 d = cpow(d, d);
 f = cpowf(f, f);
 ld = cpowl(ld, ld);
 TEST_TRACE(C99 7.3.8.3)
 d = csqrt(d);
 f = csqrtf(f);
 ld = csqrtl(ld);
 TEST_TRACE(C99 7.3.9.1)
 d = carg(d);
 f = cargf(f);
 ld = cargl(ld);
 TEST_TRACE(C99 7.3.9.2)
 d = cimag(d);
 f = cimagf(f);
 ld = cimagl(ld);
 TEST_TRACE(C99 7.3.9.3)
 d = conj(d);
 f = conjf(f);
 ld = conjl(ld);
 TEST_TRACE(C99 7.3.9.4)
 d = cproj(d);
 f = cprojf(f);
Exemplo n.º 5
0
TEST(complex, csqrtl) {
  ASSERT_EQ(0.0, csqrtl(0));
}
Exemplo n.º 6
0
complex long double
cacoshl (complex long double z)
{
  return clogl (z + csqrtl (z-1.0L) * csqrtl (z+1.0L));
}
Exemplo n.º 7
0
complex long double
casinhl (complex long double z)
{
  return clogl (z + csqrtl (z*z+1.0L));
}
Exemplo n.º 8
0
complex long double
cacosl (complex long double z)
{
  return -I*clogl (z + I*csqrtl (1.0L-z*z));
}
Exemplo n.º 9
0
complex long double
casinl (complex long double z)
{
  return -I*clogl (I*z + csqrtl (1.0L-z*z));
}