Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71002 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35860 invoked from network); 4 Jan 2014 20:39:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jan 2014 20:39:33 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.49 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.215.49 mail-la0-f49.google.com Received: from [209.85.215.49] ([209.85.215.49:42080] helo=mail-la0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 37/C1-20390-48178C25 for ; Sat, 04 Jan 2014 15:39:33 -0500 Received: by mail-la0-f49.google.com with SMTP id er20so8868691lab.36 for ; Sat, 04 Jan 2014 12:39:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=KNTUmLUCcHbDi14z71BoIU5UflMRaFXwo51Rueyz548=; b=cDggT+Hw1UAliR5+GwvkTx+k7uUYycQE2WmVyv7SqgseltKJ2jKWOS/2RPIACl+Vrp 5PK7ZUxdQY8KQc8NHX7zesvfYUZNVClSgfa2NOTTJyY/sR1qdPPmUD9spjnNkSnfqqbZ jAoOh/BUVL7jZZ0IeHMSiQr99ELGJJ4FfSEJlLHwIXL3YMTZMp3DyguDXZNYdpRsKw2N FXwDs1MnKMPNflDH1R4WWaxwNgMZRzD/spXoGgRCPjQ8UCw0JZ8axq+djLonqpIDTXLC rFrrzOYno1AN2/j3hiE2ruY7tu7XZ2JL3ggzWh6H0GsvgGqMwLIA76qsAR3HLidnDUYK OFJw== X-Received: by 10.112.11.170 with SMTP id r10mr37540164lbb.23.1388867969857; Sat, 04 Jan 2014 12:39:29 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.6.68 with HTTP; Sat, 4 Jan 2014 12:38:49 -0800 (PST) In-Reply-To: References: Date: Sun, 5 Jan 2014 05:38:49 +0900 X-Google-Sender-Auth: KWy5C1dXjODb3ZVxL4jEAY4DIHo Message-ID: To: Sara Golemon Cc: PHP internals Content-Type: multipart/alternative; boundary=001a11c3be5efbbd4204ef2b051f Subject: Re: [PHP-DEV] [RFC] Floating Point support in GMP extension From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a11c3be5efbbd4204ef2b051f Content-Type: text/plain; charset=UTF-8 Hi Sara, On Sat, Jan 4, 2014 at 4:09 PM, Sara Golemon wrote: > https://wiki.php.net/rfc/gmp-floating-point > > 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 ) > > No implementation yet as I'd really like input on what the API should look > like. My only concern is GMP float and int conversion. I prefer to have result 10 / 3 = 3 and 10.0 / 3 = 3.33333333333333333333333(to GMP precision) I prefer to have INT result for "INT op INT" and float result for "FLOAT op INT". Huge integer arithmetic has it's own usage and converting int to float automatically is not nice, since it breaks goodies of GMP int. I hope everyone prefer this behavior. GMP float and int may be separated completely. i.e. raise error for mixed usage and require explicit cast. I don't mind this implementation, too. It's less convenient, but it should work. In short, I prefer to have automatic conversion by operands, not by operator. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a11c3be5efbbd4204ef2b051f--