Re: Re: GMP and empty()
On Mon, Dec 30, 2013 at 11:36 AM, Yasuo Ohgaki <[email protected]> wrote:
> I would like to have float support rather than this dirty patch.
> We may implement GMP float support. It would be easier with object.
>
> Regards,
>
Current GMP ext exposes mpz functionality. It can be used for discrete
mathematics, e.g. modular arithmetic in the context of asymmetric crypto.
The mpq and mpf functionality also provided by gmp/mpir are something
completely separate. If you like, you can expose them to PHP as GmpRational
and GmpFloat, but you must keep them separate, otherwise you'll render the
gmp ext useless for the purposes it is currently used for. Before doing
that I would recommend to think about whether you really want bignum
rationals and floats or whether you are looking for decimals (something
traditionally provided by bcmath, but could also be implemented on top of
mpz).
Nikita
Thread (13 messages)