GNU Multiple Precision (GMP) ライブラリ
|
説明
|
|
•
|
GNU Multiple Precision (GMP) ライブラリは、整数、有理数、浮動小数点数に関する任意精度の演算を行うための、C で書かれた高移植性ライブラリです。Maple は、オペランドが 10^kernelopts(gmpthreshold) 以上の場合、整数演算に対し GMP ライブラリを使用します。
|
•
|
GMP ライブラリは、任意精度演算を高速に行うのに役立ちます。GMP が高速であるのは、基礎となる演算のタイプとして fullwords を利用したり、洗練されたアルゴリズムを使用し、様々なCPUに対して最も一般的な内部ループに対する、最適化されたアセンブリコードを含むためです。 Maple では、GMP ライブラリを使用するため、長整数演算 が大幅に高速化します。
|
•
|
Maple のコマンドのうち、GMP ライブラリの直接の恩恵を受けるものは、つぎのコマンドです。
|
+ (addition) - (subtraction)
* (multiplication) / (division)
^ (exponentiation) iquo (quotient)
irem (remainder) isqrt (square root)
igcd (greatest common divisor) ilcm (least common multiple)
! (factorial) isprime (primality test)
•
|
Maple の次のコマンドは、GMP の恩恵を直接ではありませんが受けます。なぜなら、これらは、上記のコマンドを内部的に使用するためです。
|
add mult
mod nextprime
prevprime ithprime
trunc round
frac floor
ceil ifactor
|
|
参照
|
|
add, Arithmetic Operations, ceil, examples/GMP, factorial, frac, igcd, ilcm, iquo, irem, isprime, isqrt, kernelopts, mod, prevprime, trunc
|
|
Download Help Document
Was this information helpful?