Docs Menu

$asinh(集計)

項目一覧

$asinh

Returns the inverse hyperbolic sine (hyperbolic arc sine) of a value.

$asinhの構文は次のとおりです。

{ $asinh: <expression> }

$asinh takes any valid that resolves to a number.

$asinhはラジアン単位で値を返します。 $radiansToDegrees演算子を使用して出力値をラジアンから度に変換します。

デフォルトでは、 $asinhは値をdoubleとして返します。 $asinhは、 <expression>が128ビットの 10 進数値に解決される限り、 128ビットの 10 進数として値を返すこともできます。

式の詳細については、「式 」を参照してください。

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.

結果

{ $asinh: NaN }

NaN

{ $asinh: null }

null

{ $asinh : Infinity}

Infinity

{ $asinh : -Infinity }

-Infinity

trigonometryコレクションには、 2 -D グラフのx軸に沿って値を保存するドキュメントが含まれています。

{
"_id" : ObjectId("5c50782193f833234ba90d85"),
"x-coordinate" : NumberDecimal("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" }
}
}
}
])

$radiansToDegrees式は、 $asinhによって返されたラジアン値を度単位の同等の値に変換します。

このコマンドは、次の出力を返します。

{
"_id" : ObjectId("5c50782193f833234ba90d85"),
"x-coordinate" : NumberDecimal("1"),
"y-coordinate" : NumberDecimal("50.49898671052621144221476300417157")
}

x-coordinate128ビットの 10 進数として保存されているため、 $asinhの出力は128ビットの 10 進数になります。

trigonometryコレクションには、 2 -D グラフのx軸に沿って値を保存するドキュメントが含まれています。

{
"_id" : ObjectId("5c50782193f833234ba90d85"),
"x-coordinate" : NumberDecimal("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" : NumberDecimal("1"),
"y-coordinate" : NumberDecimal("1.818446459232066823483698963560709")
}

x-coordinate128ビットの 10 進数として保存されているため、 $asinhの出力は128ビットの 10 進数になります。

項目一覧