Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70920 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25720 invoked from network); 30 Dec 2013 14:19:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Dec 2013 14:19:51 -0000 Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.174 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.214.174 mail-ob0-f174.google.com Received: from [209.85.214.174] ([209.85.214.174:42429] helo=mail-ob0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6E/10-24557-60181C25 for ; Mon, 30 Dec 2013 09:19:50 -0500 Received: by mail-ob0-f174.google.com with SMTP id wn1so11683773obc.33 for ; Mon, 30 Dec 2013 06:19:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=W7gFstXLLIbobSou53TPFskRJSHlq985SNV5RsAX7No=; b=oC7CYQNBrgpOuk4dz62BOUQ2sqKNOTNckaRetpYBPnC27Ou6/YHqB4jxe8TYcf7bOZ NNdwI7kTPEiAaV7vN1rOcgJMAWoBi8vewFLGrU7CqGXoWGCLKP31ZImqgqiHktbgmhqP LxZe9rGmnG3xWsTIb7GqZnnEL4+pKzGY8KpZyJi/oTmPQ2NBI8j+I49cQFaV10qgZLwE La01pB4vfROe2UtQGeBcIaPV1Tm9jBn8Vavd2gkX+h6pofz601GXdYxnljiHN7+wpJa9 nIud/oXdkqCM5cJgf/9Y2WktCYhuSzLGvCZOK+EQhz3xQTCTgCQV7wgOmJGaSvT8OJ5b Qzcw== MIME-Version: 1.0 X-Received: by 10.182.166.40 with SMTP id zd8mr43744306obb.25.1388413188125; Mon, 30 Dec 2013 06:19:48 -0800 (PST) Received: by 10.182.54.112 with HTTP; Mon, 30 Dec 2013 06:19:47 -0800 (PST) In-Reply-To: References: Date: Mon, 30 Dec 2013 15:19:47 +0100 Message-ID: To: Yasuo Ohgaki Cc: Tjerk Meesters , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=e89a8ff1ce02e1394904eec12287 Subject: Re: [PHP-DEV] Re: GMP and empty() From: nikita.ppv@gmail.com (Nikita Popov) --e89a8ff1ce02e1394904eec12287 Content-Type: text/plain; charset=ISO-8859-1 On Mon, Dec 30, 2013 at 11:36 AM, Yasuo Ohgaki 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 --e89a8ff1ce02e1394904eec12287--