Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75652 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38606 invoked from network); 17 Jul 2014 07:17:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Jul 2014 07:17:59 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 108.166.43.75 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 108.166.43.75 smtp75.ord1c.emailsrvr.com Linux 2.6 Received: from [108.166.43.75] ([108.166.43.75:41050] helo=smtp75.ord1c.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9B/F5-09067-4A877C35 for ; Thu, 17 Jul 2014 03:17:58 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp18.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id 1E6933008EF; Thu, 17 Jul 2014 03:17:53 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp18.relay.ord1c.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 8EBDA300C8A; Thu, 17 Jul 2014 03:17:52 -0400 (EDT) X-Sender-Id: smalyshev@sugarcrm.com Received: from Stass-MacBook-Pro.local (108-66-6-48.lightspeed.sntcca.sbcglobal.net [108.66.6.48]) (using TLSv1 with cipher DHE-RSA-AES128-SHA) by 0.0.0.0:465 (trex/5.2.4); Thu, 17 Jul 2014 07:17:53 GMT Message-ID: <53C7789F.40000@sugarcrm.com> Date: Thu, 17 Jul 2014 00:17:51 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Andrea Faulds , Zeev Suraski CC: "bishop@php.net" , PHP internals References: <7646A8D1-69A2-4255-B048-D3B9F28B422F@ajf.me> <37F89E54-C5B9-4E81-9D1B-660190BDB1FF@ajf.me> <9F08728B-AF74-4098-8D1D-BC21AB821168@ajf.me> In-Reply-To: <9F08728B-AF74-4098-8D1D-BC21AB821168@ajf.me> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC] intdiv() From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > * Time (actually pretty common in web apps, though we have a DateTime > class) Admittedly, we're getting closer to the dreaded year 2038, but what does it actually mean to divide current Unix timestamp by 3 and why one would ever want to do this? We also have classes for real datetime calculations. > * Splitting into rows and columns > * Pagination Here you are onto something, but how often you paginate data sets of MAXINT size and need exact number of pages? > * Currency (you can’t, for example, represent the full number of BTC > in circulation in BTC's base unit without using an integer of beyond > 53-bits, and it’s common practise to use *fixed-point* arithmetic > here) If you're using ints for currency, you're probably doing it wrong. If you're dividing currency using integer division, I don't even know what you are trying to do, except reenacting Office Space :) > * Nearest-neighbour scaling You mean image processing? If 53 bit precision is not enough there, I'm not even sure PHP should be doing that. IMHO this is not enough for a new operator... Especially if this means we have to tolerate something like %/. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/