Re: [RFC][Discussion] Raising zero to the power of negative number
| From: | Marc Bennewitz | Date: | Sun, 25 Feb 2024 12:25:12 +0000 |
| Subject: | Re: [RFC][Discussion] Raising zero to the power of negative number | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-122488@lists.php.net to get a copy of this message | ||
Hi Jorg,
On 13.01.24 00:25, Jorg Sowa wrote:
Thank you for the suggestions. I agree that error message should be more meaningful. I changed it. The main driver of this change is to match the division by zero behavior for both operators which can operate on both integers and floats. Would it make sense to create a functionAs of your note of consistent behavior here, in your RFC I don't see any note about operating on float - It's all about int. It would be good to explicitly describe both int and float behavior in your RFC. Aboutfpowsimilarly tofdivfor the correct IEEE 754 logic?
fpow - I personally never felled the need to use fdiv but as fdiv was explicitly introduced to expose IEEE-754 semantics I think it totally makes sense to add fpow as well.
Greetings,
Marc
Kind regards, Jorg
Attachment: [application/pgp-keys] OpenPGP public key OpenPGP_0x3936ABF753BC88CE.asc
Attachment: [application/pgp-signature] OpenPGP digital signature OpenPGP_signature.asc