C ++ sinh () - C ++ standaardbibliotheek

De functie sinh () in C ++ retourneert de hyperbolische sinus van een hoek in radialen.

De functie is gedefinieerd in het header-bestand.

 (Wiskunde) sinh x = sinh (x) (in C ++ programmeren)

sinh () prototype (vanaf C ++ 11 standaard)

dubbele sinh (dubbele x); float sinh (float x); lange dubbele sinh (lange dubbele x); dubbele sinh (T x); // Voor integraal type.

De functie sinh () accepteert één argument in radialen en retourneert de hyperbolische sinus van die hoek in double, floatof long doubletype.

De hyperbolische sinus van x wordt gegeven door,

sinh () Parameters

De functie sinh () accepteert één verplicht argument dat een hyperbolische hoek in radialen vertegenwoordigt.

sinh () Retourwaarde

De functie sinh () geeft de sinus hyperbolicus van het argument terug.

Als de omvang van het resultaat te groot is om te worden weergegeven door een waarde van het retourtype, retourneert de functie HUGE_VAL met het juiste teken en treedt er een fout in het overloopbereik op.

Voorbeeld 1: Hoe werkt de sinh () -functie?

 #include #include using namespace std; int main() ( double x = 3.55, result; result = sinh(x); cout << "sinh(x) = " << result << endl; // x in Degrees double xDegrees = 90; x = xDegrees * 3.14159/180; result = sinh(x); cout << "sinh(x) = " << result << endl; return 0; )

Wanneer u het programma uitvoert, is de uitvoer:

 sinh (x) = 17,3923 sinh (x) = 2,3013

Voorbeeld 2: sinh () functie met integraal type

 #include #include using namespace std; int main() ( int x = -3; double result; result = sinh(x); cout << "sinh(x) = " << result << endl; return 0; ) 

Wanneer u het programma uitvoert, is de uitvoer:

 sinh (x) = -10.0179 

Interessante artikelen...