Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71005 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 63294 invoked from network); 5 Jan 2014 07:45:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jan 2014 07:45:40 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 67.192.241.139 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.139 smtp139.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.139] ([67.192.241.139:49195] helo=smtp139.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AF/E1-47746-3AD09C25 for ; Sun, 05 Jan 2014 02:45:39 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp30.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id CA82C348CE0; Sun, 5 Jan 2014 02:45:36 -0500 (EST) X-Virus-Scanned: OK Received: by smtp30.relay.dfw1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 74922348C4A; Sun, 5 Jan 2014 02:45:36 -0500 (EST) Message-ID: <52C90D9F.6080802@sugarcrm.com> Date: Sat, 04 Jan 2014 23:45:35 -0800 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Sara Golemon , PHP internals References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Floating Point support in GMP extension From: smalyshev@sugarcrm.com (Stas Malyshev) 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