From a48582cd365ed5719f52ce72872453e962f2fc69 Mon Sep 17 00:00:00 2001 From: IWASE Shigeaki Date: Sun, 15 Dec 2024 21:42:10 +0900 Subject: [PATCH 1/3] =?UTF-8?q?PHP-8.4:=20Document=20fpow()=20=E3=81=AE?= =?UTF-8?q?=E7=BF=BB=E8=A8=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reference/math/functions/fdiv.xml | 7 +- reference/math/functions/fpow.xml | 112 ++++++++++++++++++++++++++++++ reference/math/functions/pow.xml | 7 +- 3 files changed, 122 insertions(+), 4 deletions(-) create mode 100644 reference/math/functions/fpow.xml diff --git a/reference/math/functions/fdiv.xml b/reference/math/functions/fdiv.xml index 39bcc433b3..9a6639da58 100644 --- a/reference/math/functions/fdiv.xml +++ b/reference/math/functions/fdiv.xml @@ -1,6 +1,6 @@ - + @@ -81,9 +81,10 @@ var_dump(fdiv(0.0, 0.0)); // float(NAN) &reftitle.seealso; - / - 浮動小数点数の除算 + 除算演算子 / intdiv - 整数値の除算 - fmod - 剰余 + fmod + fpow diff --git a/reference/math/functions/fpow.xml b/reference/math/functions/fpow.xml new file mode 100644 index 0000000000..b42c4b6da4 --- /dev/null +++ b/reference/math/functions/fpow.xml @@ -0,0 +1,112 @@ + + + + + + fpow + IEEE 754 に従い、数値をべき乗する + + + + &reftitle.description; + + floatfpow + floatnum + floatexponent + + + num の + exponent 乗の結果を浮動小数点数として返します。 + num が 0 で exponent が負数の場合は、 + INF を返します。 + + + + + &reftitle.parameters; + + + num + + + 使用する基数。 + + + + + exponent + + + 指数。 + + + + + + + + &reftitle.returnvalues; + + $num$exponent を + float で返します。 + + + + + &reftitle.examples; + + <function>fpow</function> の例 + + +]]> + + &example.outputs; + + + + + + + + &reftitle.seealso; + + + べき乗演算子 + ** + + pow + fdiv + fmod + + + + + diff --git a/reference/math/functions/pow.xml b/reference/math/functions/pow.xml index aca9862fbd..e28b578f3c 100644 --- a/reference/math/functions/pow.xml +++ b/reference/math/functions/pow.xml @@ -1,6 +1,6 @@ - + @@ -96,6 +96,11 @@ echo pow(-1, 5.5); // NAN &reftitle.seealso; + + べき乗演算子 + ** + + fpow exp sqrt bcpow From 05e1df7722fa12636d9d39ea45a2334c8de34909 Mon Sep 17 00:00:00 2001 From: IWASE Shigeaki Date: Mon, 16 Dec 2024 12:40:08 +0900 Subject: [PATCH 2/3] =?UTF-8?q?PHP=208.4:=20Raising=200=20to=20a=20negativ?= =?UTF-8?q?e=20exponent=20is=20deprecated=20=E3=81=AE=E7=BF=BB=E8=A8=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reference/math/functions/pow.xml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/reference/math/functions/pow.xml b/reference/math/functions/pow.xml index e28b578f3c..fc0cca5609 100644 --- a/reference/math/functions/pow.xml +++ b/reference/math/functions/pow.xml @@ -1,6 +1,6 @@ - + @@ -58,6 +58,30 @@ PHP の拡張モジュールは、この演算の振る舞いを上書きし、オブジェクトを返させても構いません。 + + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.4.0 + + 基数が 0 の場合に、 + exponent を負数とするのは非推奨となりました。 + + + + + + + &reftitle.examples; From ae7496573715c15244398b0f9870a9f7be842995 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AD=A6=E7=94=B0=20=E6=86=B2=E5=A4=AA=E9=83=8E?= Date: Mon, 16 Dec 2024 22:35:06 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=83=87=E3=83=B3?= =?UTF-8?q?=E3=83=88=E3=82=84=E6=94=B9=E8=A1=8C=E3=82=92=E5=8E=9F=E6=96=87?= =?UTF-8?q?=E3=81=A8=E6=8F=83=E3=81=88=E3=82=8B=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reference/math/functions/fdiv.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/reference/math/functions/fdiv.xml b/reference/math/functions/fdiv.xml index 9a6639da58..2652e648e9 100644 --- a/reference/math/functions/fdiv.xml +++ b/reference/math/functions/fdiv.xml @@ -81,7 +81,10 @@ var_dump(fdiv(0.0, 0.0)); // float(NAN) &reftitle.seealso; - 除算演算子 / + + 除算演算子 + / + intdiv - 整数値の除算 fmod fpow