sinh , sinhf , sinhl , sinhd32, sinhd64和 sinhd128 子例程
用途
计算双曲正弦。
语法
#include <math.h>
double sinh ( x)
double x;
double x;
float sinhf (x)
float x;
long double sinhl (x)
long double x;
_Decimal32 sinhd32 (x)
_Decimal32 x;
_Decimal64 sinhd64 (x)
_Decimal64 x;
_Decimal128 sinhd128 (x)
_Decimal128 x; 描述
sinh, sinhf, sinhl, sinhd32, sinhd64和 sinhd128 子例程计算 x 参数的双曲正弦。
希望检查错误情况的应用程序应将 errno 全局变量设置为零,并在调用这些子例程之前调用 feclearexcept(FE_ALL_EXCEPT)。 返回时,如果 errno 为非零或 fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) 为非零,那么发生了错误。
参数
| 项 | 描述 |
|---|---|
| X | 指定双精度浮点值。 |
返回值
成功完成后, sinh, sinhf, sinhl, sinhd32, sinhd64和 sinhd128 子例程返回 x的双曲正弦。
如果结果将导致溢出,那么将发生范围错误,并且 ±HUGE_VAL, ±HUGE_VALF, ±HUGE_VALL, ±HUGE_VAL_D32, 对于函数类型,将根据需要返回 ±HUGE_VAL_D64和 ±HUGE_VAL_D128 (具有与 x相同的符号)。
如果x为NaN,返回NaN。
如果 x 是 ± 0 或无限,那么将返回 x 。
如果 x 不正常,那么可能会发生范围错误,并且应该返回 x 。
错误代码
如果正确的值溢出,那么 sinh, sinhf, sinhl, sinhd32, sinhd64和 sinhd128 子例程返回正确签名的 HUGE_VAL。 并且 errno 全局变量设置为 ERANGE。
当使用 libmsaa.a (-lmsaa) 库时,应该使用 matherr 子例程来更改这些错误处理过程。