acos
Float*
例
使用例
Query
Response
acosh
0 ≤ acosh(x) < +∞。Float64
例
使用例
Query
Response
asin
[-1, 1] の範囲にある場合は、[-pi() / 2, pi() / 2] の範囲の値を返します。
構文
x の逆正弦の値を返します。Float64
例
inverse
Query
Response
Query
Response
Query
Response
asinh
-∞ < asinh(x) < +∞。Float64
例
基本的な使い方
Query
Response
atan
x のアークタンジェントを返します。Float*
例
使用例
Query
Response
atan2
(x, y) ≠ (0, 0) への半直線までのユークリッド平面上の角度を、ラジアンで表した atan2 を返します。
構文
y— レイが通過する点の y 座標。(U)Int*またはFloat*またはDecimal*x— レイが通過する点の x 座標。(U)Int*またはFloat*またはDecimal*
-π < θ ≤ π を満たす角度 θ をラジアン単位で返します。Float64
例
使用例
Query
Response
atanh
Float64
例
使用例
Query
Response
cbrt
x の立方根を返します。Float*
例
使用例
Query
Response
cos
x のコサインを返します。Float*
例
使用例
Query
Response
cosh
1 ≤ cosh(x) < +∞ の範囲の値を返します。Float64
例
基本的な使い方
Query
Response
degrees
x を度単位に変換した値を返します。Float64
例
基本的な使い方
Query
Response
e
- なし。
Float64 を返します。
例
使用例
Query
Response
erf
x が非負の場合、erf(x/(σ√2)) は、標準偏差 σ の正規分布に従う確率変数が、期待値から x を超えて離れた値を取る確率です。
構文
Float*
例
3シグマルール
Query
Response
erfc
x の値が大きい場合でも、精度を損なうことなく 1-erf(x) に近い数値を返します。
構文
Float* を返します
例
使用例
Query
Response
exp
e の x 乗を返します。ここで、x は関数に指定する引数です。
構文
e^x を返します。Float*
例
基本的な使い方
Query
Response
exp10
Float* 型の 10^x を返します
例
使用例
Query
Response
exp2
Float* 型で返します
例
使用例
Query
Response
factorial
factorial() 関数は任意の負の値に対しても 1 を返します。
入力引数に指定できる正の最大値は 20 です。21 以上の値を指定すると例外が発生します。
構文
n— 階乗を計算する対象の整数値。最大値は 20 です。(U)Int8/16/32/64
UInt64 として返します。入力が 0 または負の値の場合は 1 を返します。UInt64
例
使用例
Query
Response
hypot
hypot は、非常に大きい数や非常に小さい数を二乗する際に生じる問題を回避します。
構文
Float64
例
基本的な使い方
Query
Response
intExp10
UInt64 型の数値を返します。
構文
UInt64
例
使用例
Query
Response
intExp2
UInt64 型の値を返します。
構文
UInt64
例
使用例
Query
Response
isPrime
1、そうでなければ 0 を返します。
小さい値には正確なルックアップ用ビットマップを使用し、より大きい値には決定論的な Miller-Rabin テスト
を使用します。結果は、サポートされているすべての入力型に対して正確です。
より広いビット幅の符号なし整数型 (UInt128、UInt256) については、代わりに isProbablePrime を使用してください。
構文
n が素数の場合は 1、それ以外の場合は 0 を返します。UInt8
例
素数
Query
Response
Query
Response
UInt64 型の素数
Query
Response
UInt64 の最大値
Query
Response
isProbablePrime
1、確実に合成数であれば 0 を返します。
UInt8、UInt16、UInt32、UInt64 では、結果は厳密で、
isPrime と一致します。rounds 引数は無視されます。
UInt128 と UInt256 では、戻り値 1 は確率的なものです。省略可能な rounds 引数で、
何回 Miller-Rabin のラウンドを実行するかを指定します。
ラウンド数を増やすほど偽陽性の確率は下がりますが、その分実行時間は長くなります。一様ランダムな
witness を用いる場合、固定された合成数に対する偽陽性率は 4^(-rounds) 以下に抑えられます。デフォルトの 25
ではこの上限は 10^-15 未満、最大値の 256 では 10^-154 未満になります。
この関数は決定論的です。witness は n を seed にして生成されるため、同じ (n, rounds) の組み合わせでは常に
同じ結果になります。4^(-rounds) という上限は、一様ランダムな witness を使う場合の入力ごとの確率を表します。
一方、この関数の決定論的な seed 方式では、これは入力全体に対する割合を表します。つまり、その
witness の数列にだまされる合成数は、常に 1 を返します。
構文
n— 素数かどうかを判定する符号なし整数。UInt8またはUInt16またはUInt32またはUInt64またはUInt128またはUInt256rounds—[1, 256]の範囲の省略可能な正の整数定数。UInt128/UInt256に対する Miller-Rabin のラウンド数です (より小さい型では無視されます) 。デフォルトは25です。UInt8またはUInt16またはUInt32またはUInt64
n がおそらく素数なら 1、確実に合成数なら 0 を返します。UInt8
例
小さい素数
Query
Response
Query
Response
UInt64 の素数 (正確な結果)
Query
Response
M_127 (UInt128)
Query
Response
2^255 - 19 (UInt256)
Query
Response
Query
Response
lgamma
x のガンマ関数の対数を返します。Float*
例
使用例
Query
Response
log
ln
引数
戻り値
x の自然対数を返します。Float*
例
使用例
Query
Response
log10
x の常用対数を返します。Float*
例
使用例
Query
Response
log1p
x の値が小さい場合、log1p(x) の計算は log(1+x) より高精度です。
構文
Float64
例
使用例
Query
Response
log2
x の 2 を底とする対数を返します。Float*
例
使用例
Query
Response
pi
- ありません。
Float64 を返します
例
使用例
Query
Response
pow
power
引数
x— 底数。(U)Int8/16/32/64またはFloat*またはDecimal*y— 指数。(U)Int8/16/32/64またはFloat*またはDecimal*
Float64
例
使用例
Query
Response
proportionsZTest
successes_x— 母集団 x における成功数。UInt64successes_y— 母集団 y における成功数。UInt64trials_x— 母集団 x における試行回数。UInt64trials_y— 母集団 y における試行回数。UInt64conf_level— 検定の信頼水準。Float64pool_type— 標準誤差の推定に使用するプーリング方式の選択。‘unpooled’ または ‘pooled’ のいずれかです。String
z_stat (Z統計量) 、p_val (P値) 、ci_low (信頼区間の下限) 、ci_high (信頼区間の上限) を含むタプルを返します。Tuple(Float64, Float64, Float64, Float64)
例
使用例
Query
Response
radians
Float64 を返します
例
使用例
Query
Response
sigmoid
1 / (1 + exp(-x)) を計算します。シグモイド関数は任意の実数を (0, 1) の範囲に写し、機械学習で広く使用されます。
構文
Float64
例
基本的な使い方
Query
Response
sign
x < 0 の場合は -1、x = 0 の場合は 0、x > 0 の場合は 1 を返します。Int8
例
0 の符号
Query
Response
Query
Response
Query
Response
sin
Query
Response
sinh
Float64
例
使用例
Query
Response
sqrt
Float*
例
使用例
Query
Response
tan
x の正接を返します。Float*
例
使用例
Query
Response
tanh
Float*
例
使用例
Query
Response
tgamma
Float*
使用例
使用例
Query
Response
widthBucket
low から high を count 個の等幅のバケットに分割したヒストグラムにおいて、パラメーター operand が属するバケット番号を返します。operand が low より小さい場合は 0 を返し、operand が high 以上の場合は count+1 を返します。
また、他のデータベースとの互換性のために、WIDTH_BUCKET という大文字と小文字を区別しない alias も用意されています。
構文
width_bucket
引数
operand— バケットを判定する対象の値です。(U)Int8/16/32/64low— ヒストグラム範囲の下限です。(U)Int8/16/32/64high— ヒストグラム範囲の上限です。(U)Int8/16/32/64count— 等幅バケットの数です。0 は指定できません。UInt8/16/32/64
operand < low の場合は 0 を返し、operand >= high の場合は count+1 を返します。UInt8/16/32/64
例
使用例
Query
Response