Aracılığıyla paylaş


Tan, tanf, tanh, tanhf

Tanjantı hesaplamak (tan veya tanf) ya da hiperbolik tanjantı (tanh veya tanhf).

double tan(
   double x 
);
float tan(
   float x 
);  // C++ only
long double tan(
   long double x
);  // C++ only
float tanf(
   float x 
);
double tanh(
   double x 
);
float tanh(
   float x 
);  // C++ only
long double tanh(
   long double x
);  // C++ only
float tanhf(
   float x 
);

Parametreler

  • x
    Radyan cinsinden açıdır.

Dönüş Değeri

tantanjantını verir x. x 'Den büyük veya 263 eşit veya daha az veya eşit –263, sonuç anlam kaybı oluşur.

Girdi

seh özel durumu

MatherrÖzel durum

± QNAN, IND

Hiçbiri

_DOMAIN

± ∞ (tan, tanf)

INVALID

_DOMAIN

tanhhiperbolik tanjantını verir x. Döndürülen hata var.

Notlar

C++ verir aşırı, böylece kullanıcılar, aşırı çağırabilirsiniz tan ve tanh float veya double uzun türleri alabilir. c programında, tan ve tanh işlevler her zaman alabilir ve çift geri dönün.

Gereksinimler

Yordamı

Gerekli başlık

tan, tanf, tanh, tanhf

<math.h>

Ek uyumluluk bilgileri için bkz: Uyumluluk giriş.

Örnek

// crt_tan.c
// This program displays the tangent of pi / 4
// and the hyperbolic tangent of the result.
//

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

int main( void )
{
   double pi = 3.1415926535;
   double x, y;

   x = tan( pi / 4 );
   y = tanh( x );
   printf( "tan( %f ) = %f\n", pi/4, x );
   printf( "tanh( %f ) = %f\n", x, y );
}
  

.NET Framework Eşdeğeri

Ayrıca bkz.

Başvuru

Kayan nokta türü desteği

Uzun çift

ACOS, acosf

ASİN, asinf

atan, atanf, atan2, atan2f

cos, cosf, cosh, coshf

sin, sinf, sinh, sinhf

_CItan