Re: [RFC] Floating Point support in GMP extension
| From: | Stas Malyshev | Date: | Sun, 05 Jan 2014 07:45:35 +0000 |
| Subject: | Re: [RFC] Floating Point support in GMP extension | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-71005@lists.php.net to get a copy of this message | ||
Hi!
> This extracts just the gmp floating point sub-proposal from @yohgaki's
> "GMP number as PHP number" RFC (
> https://wiki.php.net/rfc/gmp_number )
I have a question here: why we must keep gmp integers and gmp floats
within the same object? They have different types in GMP library, PHP
has different types for ints and floats, internally in PHP they would be
using different code and different structures, API would be different -
why have the same object at all?
Also, I'm not sure how exactly "all other gmp_*() functions" are
supposed to work on floats - for many of them it just make no sense
(such as factorial or q/r division or modulo), for others like bit
functions it technically could make sense but would probably be not
useful since nobody does bit ops on floats... Maybe it would make more
sense to look into what GMP library does with floats and write different
function set from there?
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227