Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37417 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1976 invoked from network); 3 May 2008 00:14:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 May 2008 00:14:58 -0000 Authentication-Results: pb1.pair.com smtp.mail=rquadling@googlemail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rquadling@googlemail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 209.85.146.181 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: rquadling@googlemail.com X-Host-Fingerprint: 209.85.146.181 wa-out-1112.google.com Received: from [209.85.146.181] ([209.85.146.181:31733] helo=wa-out-1112.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8C/B8-55202-18EAB184 for ; Fri, 02 May 2008 20:14:57 -0400 Received: by wa-out-1112.google.com with SMTP id v27so924253wah.17 for ; Fri, 02 May 2008 17:14:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=x54mmGbUo6+92hVtfwXNWC5nby0oc9AK2ewRF+YZ19k=; b=rMJlTuWBZOTUlrkAstkN2bFSe/eKwkp7Kz0KdvZCt7Bey1+fzNHUrYPwMyar/e5m5veHOZiYLszLsCkwHXQs018DSworKDIWSrYLxR0n2RPovyD60zxUTndnwSiaIx6UTe0nCHLLNqnH2PKZPSnqo2tDJZZPlFu24a/Hq8ouKos= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ZUUhsOg16amnR0gMDIi/5MVRdoDHvbdzOcNhmfnOBf4nktQZljrQHsPlOb0uGBnNItWuMti6EXmTXTxs3kGwzk8hqsBjZgcblkoYuhWUDcNsmdMnM9A3SZyNmIhAfbuYDQZrFMXLzZdVCaON+MMAccB1hHeB7sS4R2BE2vKyJqA= Received: by 10.115.32.8 with SMTP id k8mr3558289waj.89.1209773693301; Fri, 02 May 2008 17:14:53 -0700 (PDT) Received: by 10.114.209.15 with HTTP; Fri, 2 May 2008 17:14:53 -0700 (PDT) Message-ID: <10845a340805021714h45c316a7qc99c05e9e52ae5e4@mail.gmail.com> Date: Sat, 3 May 2008 01:14:53 +0100 Reply-To: RQuadling@GoogleMail.com To: "Stanislav Malyshev" Cc: "Alain Williams" , internals@lists.php.net In-Reply-To: <481BAC65.9030407@zend.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <001401c8ac74$dda6d060$98f47120$@com> <1209749793.1075.54.camel@inspiron.local> <481B5F45.4030106@gmail.com> <481B6068.9060402@lerdorf.com> <1209758625.1075.87.camel@inspiron.local> <20080502232537.GB6064@mint.phcomp.co.uk> <10845a340805021659p34b5b403r9c2f00b96eb83803@mail.gmail.com> <481BAC65.9030407@zend.com> Subject: Re: [PHP-DEV] Float comparison From: rquadling@googlemail.com ("Richard Quadling") 2008/5/3 Stanislav Malyshev : > Hi! > > > > > What about introducing a "money" or "currency" numeric type which > > guarantees say accuracy to 8DP? > > > > Funny thing - I blogged about it about a year ago: > http://php100.wordpress.com/2007/03/31/making-with-php/ > There's some interesting discussion in comments about how people solve it. > -- > Stanislav Malyshev, Zend Software Architect > stas@zend.com http://www.zend.com/ > (408)253-8829 MSN: stas@zend.com > Solvable in userland easily enough, but having a native money type, especially when dealing with inter-currency conversions, then accuracy is paramount. Ha! We often get replies to new features with limited appeal which are common in other languages of "why don't you use Java instead". Well, Cobol has VERY good money types. It would strike me as VERY funny to go back to cobol to do accurate financial calculations. -- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!"