text
stringlengths 1
254
| output
stringlengths 2
255
|
---|---|
The result is always positive even if either of, or both, input operands are negative.
|
a と b の最大公約数 を計算します。引数のどちらかまたは両方が負の場合でも結果は常に正 となります。
|
(PHP 4 = 4.0.4)
|
(PHP 4 = 4.0.4)
|
Both operands should be non-negative.
|
a と b の間のハミン グ距離を返します。オペランドは共に非負とする必要があります。
|
Creates a GMP number from an integer or string.
|
(PHP 4 = 4.0.4)
|
In the latter case, the string should start with 0x.
|
整数または文字列からGMP数を生成します。文字列表現には、10進数また は16進数を使用可能です。後者の場合、文字列は 0x で始まる必要があります。
|
?php $a = gmp_init (123456); $b = gmp_init ("0xFFFFDEBACDFEDF7200");?
|
例 1GMP 数を生成する
|
Function arguments are automatically converted to GMP numbers, if such conversion is possible and needed, using the same rules as gmp_init().
|
注意 gmp_add() のようなGMP関数においてGMP数を指定 するところに整数または文字列を使用したい場合には、この関数をコー ルする必要はありません。この場合、変換が必要な場合には、 gmp_init() と同様の方法で関数の引数は自動的に GMP数に変換されます。
|
Prev
|
(PHP 4 = 4.0.4)
|
This function allows to convert GMP number to integer.
|
この関数により、GMP数を整数に変換することが可能になります。
|
If you want just to print the GMP number, use gmp_strval().
|
この関数は、数値が実際にPHP整数に適合する場合(すなわち、符号付 きlong型)にのみ有用な結果を返します。単にGMP数を出力したい場合 には、 gmp_strval() を使用して下さい。
|
(PHP 4 = 4.0.4)
|
(PHP 4 = 4.0.4)
|
Returns FALSE if an inverse does not exist.
|
b を法として a の逆 を計算します。逆が存在しない場合に FALSE を返します。
|
Prev
|
(PHP 4 = 4.0.4)
|
Computes Jacobi symbol of a and p. p should be odd and must be positive.
|
a および p の ヤコビ記号 を計算します。 p は奇数で正である必要があり ます。
|
Prev
|
(PHP 4 = 4.0.4)
|
Compute the Legendre symbol of a and p. p should be odd and must be positive.
|
a と p の ルジェンドル記号 を計算します。 p は、奇数でかつ正である必要 があります。
|
(PHP 4 = 4.0.4)
|
(PHP 4 = 4.0.4)
|
The result is always non-negative, the sign of d is ignored.
|
d を法として n を計算します。結果は常に非負であり、 d の符号は無視されます。
|
Prev
|
(PHP 4 = 4.0.4)
|
Multiplies a by b and returns the result.
|
a と b をかけ、結果 を返します。
|
(PHP 4 = 4.0.4)
|
(PHP 4 = 4.0.4)
|
Prev
|
- a を返します。
|
(PHP 4 = 4.0.4)
|
(PHP 4 = 4.0.4)
|
Prev
|
2つのGMP数の論理和を計算します。
|
Prev
|
(PHP 4 = 4.0.4)
|
Returns TRUE if a is a perfect square, FALSE otherwise.
|
a が平方数の場合に TRUE 、その他の場合に FALSE を返します。
|
Prev
|
gmp_sqrt(), gmp_sqrtrm() も 参照下さい。
|
Prev
|
(PHP 4 = 4.0.4)
|
Return the population count of a.
|
a を一つ増やした数を返します。
|
(PHP 4 = 4.0.4)
|
(PHP 4 = 4.0.4)
|
The case of 0^0 yields 1. exp cannot be negative.
|
base の exp 乗を計 算します。0^0 の場合は、1となります。 exp を 負とすることはできません。
|
(PHP 4 = 4.0.4)
|
(PHP 4 = 4.0.4)
|
If exp is negative, result is undefined.
|
mod を法として( base の exp 乗)を計算します。 exp が負の場合、結果は未定義(undefined)と なります。
|
If it returns 1, then a is "probably" prime.
|
(PHP 4 = 4.0.4)
|
Reasonable values of reps vary from 5 to 10 (default being 10); a higher value lowers the probability for a non-prime to pass as a "probable "prime.
|
この関数が0を返す場合、 a は確実に素数では ありません。1を返す場合、 a は恐らく素数で す。2を返す場合、 a は確実に素数です。 reps の値(デフォルトは10)の適当な値は、5か ら10までです。より大きい値を指定すると、素数でない数を"ほぼ"素数 である誤認識する可能性が小さくなります。
|
Prev
|
この関数は、Miller-Rabin の予測テストを使用します。
|
Generate a random number.
|
(PHP 4 = 4.0.4)
|
If limiter is negative, negative numbers are generated.
|
乱数を生成します。数の長さは、最大 limiter ワードとなります。 limiter が負の場合、負の 数が生成されます。
|
(PHP 4 = 4.0.4)
|
(PHP 4 = 4.0.4)
|
Returns the index of the found bit.
|
ビット start から最上位ビットの方に最初の クリアビットが見付かるまで a をスキャンし ます。見付かったビットの番号を返します。
|
(PHP 4 = 4.0.4)
|
(PHP 4 = 4.0.4)
|
Returns the index of the found bit.
|
ビット start から、最上位ビットの方に最初の ビット組が見付かるまで、 a を探します。見付 かったビットのインデックスを返します。
|
(PHP 4 = 4.0.4)
|
(PHP 4 = 4.0.4)
|
By default the bit is set to 1.
|
a のビット index を 設定します。 set_clear はそのビットを0また は1のどちらにするかを定義します。デフォルトで、ビットは1に設定さ れます。
|
Prev
|
(PHP 4 = 4.0.4)
|
Return sign of a - 1 if a is positive and -1 if it 's negative.
|
a の符号、つまり、 a が正の場合に1、負の場合に -1 を返します。
|
(PHP 4 = 4.0.4)
|
(PHP 4 = 4.0.4)
|
Prev
|
a の平方根を計算します。
|
(no version information, might be only in CVS)
|
(no version information, might be only in CVS)
|
Prev
|
最初の引数が a の整数平方根 (gmp_sqrt() も参照下さい)、2番目の引数が 余り(すなわち、 a と最初の引数の2乗の差) であるような配列を返します。
|
Convert GMP number to string representation in base base.
|
(PHP 4 = 4.0.4)
|
?php $a = gmp_init( "0x41682179fbf5"); printf ("Decimal: %s, 36-based: %s", gmp_strval($a), gmp_strval($a,36));?
|
GMP数を base を基底とする文字列表現に変換し ます。デフォルトの基底は10です。基底(base)として使用可能な値は、2 から36までです。
|
gmp_sqrtrm
|
例 1GMP 数を文字列に変換する
|
Prev
|
(PHP 4 = 4.0.4)
|
Subtracts b from a and returns the result.
|
a から b を引いて結 果を返します。
|
Prev
|
(PHP 4 = 4.0.4)
|
Calculates logical exclusive OR (XOR) of two GMP numbers.
|
2つのGMP数の排他的論理和(XOR)を計算します。
|
(PHP 3 = 3.0.12, PHP 4)
|
(PHP 3 = 3.0.12, PHP 4)
|
For example, when run in Eastern Standard Time (GMT -0500), the first line below prints "Dec 31 1998 20:00:00", while the second prints "Jan 01 1999 01:00:00 ".
|
グリニッジ標準時を返すこと以外は、 strftime() と同じ動作をします。例えば、東部標準時 (GMT -0500)で実行した場合、以下の最初の行は"Dec 31 1998 20:00:00"を 出力し、二行目は"Jan 01 1999 01:00:00"を」出力します。
|
setlocale (LC_TIME, 'en_US'); echo strftime ("%b %d %Y %H:%M:%S", mktime (20,0,0,12,31,98)) ."\n"; echo gmstrftime ("%b %d %Y %H:%M:%S", mktime (20,0,0,12,31,98)) ."\n";
|
例 1 gmstrftime() の例
|
Prev
|
strftime() も参照ください。
|
Valid Range for Gregorian Calendar 4714 B.C. to 9999 A.D.
|
(PHP 3, PHP 4)
|
The Gregorian calendar was not instituted until October 15, 1582 (or October 5, 1582 in the Julian calendar).
|
有効なグレゴリウス暦の範囲は紀元前4714年から紀元後9999年です。
|
Most European countries used the Julian calendar prior to the Gregorian.
|
このソフトウェアは日付けを全て紀元前4714年に逆昇ることが 出来ますが、この様な使い方は特に意味があるわけではありません。 グレゴリウス暦は1582年10月15日(ユリウス暦では 1582年10月5日)まで制定されていませんでした。 この暦は、いくつかの国でもっと後まで受け入れられませんでした。 例えば、イギリスは1752 年、ロシア(USSR)は1918 年、ギリシャは1923年に 移行しました。 ほとんどのヨーロッパの国々では、グレゴリウス暦の前は ユリウス暦を使用していました。
|
?php $jd = GregorianToJD (10,11,1970); echo "$jd\n"; $gregorian = JDToGregorian ($jd); echo "$gregorian\n";?
|
例 1カレンダー関数
|
Prev
|
(PHP 3, PHP 4)
|
(PHP 3, PHP 4)
|
ポインタzpが指すgzファイルを閉じます。
|
Returns TRUE on success or FALSE on failure.
|
成功した場合に TRUE 、失敗した場合に FALSE を返します。
|
Prev
|
gzファイルポインタは、有効なファイルポインタであり、かつ、 gzopen() によりオープンできたファイルを指している必要があります。
|
(PHP 4 = 4.0.1)
|
(PHP 4 = 4.0.1)
|
The optional parameter level can be given as 0 for no compression up to 9 for maximum compression.
|
この関数は、入力 data をZLIBデータフォーマッ トを持いてcompress圧縮されたものを返し、エラーの場合に FALSE を返し ます。オプションのパラメータ level には、0で 圧縮無し、9で最大限の圧縮を指定できます。
|
Note:
|
注意 これは、いくつかのヘッダデータを有する gzip 圧縮と同じではありま せん。gzip圧縮については、 gzencode() を参照下 さい。
|
See gzencode() for gzip compression.
|
gzuncompress() も参照下さい。
|
(PHP 4 = 4.0.4)
|
(PHP 4 = 4.0.4)
|
The optional parameter level can be given as 0 for no compression up to 9 for maximum compression.
|
この関数は、入力 data をDEFLATEデータフォー マットを用いて圧縮したものを返します。エラーの場合には FALSE を返し ます。オプションのパラメータ level には、圧 縮しない場合に0、最大限の圧縮をする場合に9を指定可能です。
|
See also gzinflate(), gzcompress(), gzuncompress(), gzencode().
|
DEFLATE圧縮アルゴリズムの詳細については、ドキュメント "DEFLATE Compressed Data Format Specification version 1.3" (RFC 1951)を参照下さい。
|
Home
|
gzinflate(), gzcompress(), gzuncompress(), gzencode() も参照下さい。
|
(PHP 4 = 4.0.4)
|
(PHP 4 = 4.0.4)
|
The optional parameter level can be given as 0 for no compression up to 9 for maximum compression, if not given the default compression level will be the default compression level of the zlib library.
|
この関数は、入力 data を gzip プログラムの出力と互換性のある形式で圧縮 して返します。エラーが発生した場合は、 FALSE を返します。オプション のパラメータ level には、圧縮をしない場合に 0、最大限の圧縮を行う場合に9を指定可能です。指定されない場合のデ フォルト圧縮レベルは1になります。
|
If you use FORCE_DEFLATE, you get a standard zlib deflated string (inclusive zlib headers) after the gzip file header but without the trailing crc32 checksum.
|
返されるデータには、標準的な.gzファイルとするために適当なヘッダと データ構造が含まれます。例を以下に示します。
|
Example 1.
|
例 1gzipファイルを作成する
|
For more information on the GZIP file format, see the document:
|
GZIPファイルフォーマットに関する詳細な情報については、次のドキュ メントを参照下さい。 GZIP file format specification version 4.3 (RFC 1952)
|
See also gzcompress(). gzuncompress(), gzdeflate(), gzinflate().
|
gzcompress(). gzuncompress(), gzdeflate(), gzinflate() も参照下さい。
|
Prev
|
(PHP 3, PHP 4)
|
Returns TRUE if the gz-file pointer is at EOF or an error occurs; otherwise returns FALSE.
|
gzファイルポインタがEOFを指す時またはエラーが生じた場合に TRUE 、 その他の場合に FALSE を返します。
|
Prev
|
gzファイルポインタは、有効なファイルポインタであり、かつ、 gzopen() によりオープンできたファイルを指している 必要があります。
|
Prev
|
(PHP 3, PHP 4)
|
Identical to readgzfile(), except that gzfile() returns the file in an array.
|
gzfile() は、ファイルを配列にして返すこと以外は readgzfile() と同じです。
|
See also readgzfile(), and gzopen().
|
オプションの2番目のパラメータを"1"にすることにより、 include_path にあるファイルも 検索することができます。
|
Home
|
readgzfile() および gzopen() も参照下さい。
|
Prev
|
(PHP 3, PHP 4)
|
Returns a string containing a single (uncompressed) character read from the file pointed to by zp.
|
zpが指すファイルの中から (非圧縮の)1文字を読み込み、これを含む 文字列を返します。 (gzeof() と同様に)EOFの場合に FALSE を返します。
|
The gz-file pointer must be valid, and must point to a file successfully opened by gzopen().
|
gzファイルポインタは、有効なファイルポインタであり、かつ、 gzopen() によりオープンできたファイルを指している必要があります。
|
Prev
|
gzopen() および gzgets() も参照下さい。
|
(PHP 3, PHP 4)
|
(PHP 3, PHP 4)
|
Reading ends when length - 1 bytes have been read, on a newline, or on EOF (whichever comes first).
|
fpが指すファイルから最大length-1バイトの文字を読み込み、 これを含む (非圧縮の)文字列を返します。 length-1バイトを読み込むか、改行または EOF になった場合、 (どれかが最初にきた時点で) 読み込みを終了します。
|
If an error occurs, returns FALSE.
|
エラーが発生した場合、 FALSE を返します。
|
See also gzopen(), gzgetc(), and fgets().
|
ファイルポインタは、有効なファイルポインタであり、かつ、 gzopen() によりオープンできたファイルを指している必要があります。
|
Home
|
gzopen(), gzgetc(), fgets() も参照下さい。
|
Prev
|
(PHP 3, PHP 4)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.