$asinh값의 역쌍곡선 사인(쌍곡선 아크 사인)을 반환합니다.
$asinh의 구문은 다음과 같습니다:{ $asinh: <expression> } $asinhtakes any valid expression that resolves to a number.$asinhreturns values in radians. Use$radiansToDegreesoperator to convert the output value from radians to degrees.$asinh기본값double$asinh128으로<expression>는 값을 로 반환합니다. 는 128가 비트 십진수 값으로 해석되는 한 값을 비트 십진수로 반환할 수도 있습니다.표현식에 대한 자세한 내용은 표현식을 참조하세요 .
행동
null, NaN 및 +/- Infinity
If the argument resolves to a value of null or refers to a field that is missing, $asinh returns null. If the argument resolves to NaN, $asinh returns NaN. If the argument resolves to negative or positive infinity, $asinh returns negative or positive infinity respectively.
예시 | 결과 |
|---|---|
|
|
|
|
|
|
|
|
예시
trigonometry 컬렉션에는 2-D 그래프의 x 축을 따라 값을 저장하는 문서가 포함되어 있습니다.
{ "_id" : ObjectId("5c50782193f833234ba90d85"), "x-coordinate" : Decimal128("1") }
The following aggregation operation uses the $asinh expression to calculate inverse hyperbolic sine of x-coordinate and add it to the input document using the $addFields pipeline stage.
db.trigonometry.aggregate([ { $addFields : { "y-coordinate" : { $radiansToDegrees : { $asinh : "$x-coordinate" } } } } ])
The $radiansToDegrees expression converts the radian value returned by $asinh to the equivalent value in degrees.
이 명령은 다음 출력을 반환합니다.
{ "_id" : ObjectId("5c50782193f833234ba90d85"), "x-coordinate" : Decimal128("1"), "y-coordinate" : Decimal128("50.49898671052621144221476300417157") }
trigonometry 컬렉션에는 2-D 그래프의 x 축을 따라 값을 저장하는 문서가 포함되어 있습니다.
{ "_id" : ObjectId("5c50782193f833234ba90d85"), "x-coordinate" : Decimal128("1") }
The following aggregation operation uses the $asinh expression to calculate inverse hyperbolic sine of x-coordinate and add it to the input document using the $addFields pipeline stage.
db.trigonometry.aggregate([ { $addFields : { "y-coordinate" : { $asinh : "$x-coordinate" } } } ])
이 명령은 다음 출력을 반환합니다.
{ "_id" : ObjectId("5c50782193f833234ba90d85"), "x-coordinate" : Decimal128("1"), "y-coordinate" : Decimal128("1.818446459232066823483698963560709") }
Since x-coordinate is stored as a 128-bit decimal, the output of $asinh is a 128-bit decimal.