Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58693 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 83393 invoked from network); 6 Mar 2012 22:03:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Mar 2012 22:03:55 -0000 Authentication-Results: pb1.pair.com header.from=admacedo@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=admacedo@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.170 as permitted sender) X-PHP-List-Original-Sender: admacedo@gmail.com X-Host-Fingerprint: 209.85.161.170 mail-gx0-f170.google.com Received: from [209.85.161.170] ([209.85.161.170:60769] helo=mail-gx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1B/90-15021-9C9865F4 for ; Tue, 06 Mar 2012 17:03:54 -0500 Received: by ggmb2 with SMTP id b2so2221912ggm.29 for ; Tue, 06 Mar 2012 14:03:51 -0800 (PST) Received-SPF: pass (google.com: domain of admacedo@gmail.com designates 10.236.181.193 as permitted sender) client-ip=10.236.181.193; Authentication-Results: mr.google.com; spf=pass (google.com: domain of admacedo@gmail.com designates 10.236.181.193 as permitted sender) smtp.mail=admacedo@gmail.com; dkim=pass header.i=admacedo@gmail.com Received: from mr.google.com ([10.236.181.193]) by 10.236.181.193 with SMTP id l41mr36901731yhm.38.1331071431350 (num_hops = 1); Tue, 06 Mar 2012 14:03:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=iThV0o7Qh7ciQGbHKDDyAjLC/Aoz5WQJ5/atLCWNa9Y=; b=pfZz3H2mWF94jE9P+TAI+bMqEgWMbza179yMhBr5AoQoLp9ZDmYHOwOU3H4QFEZ0NX a4i2utHzOnJhQ4wcyH3FwxBIBXeMUeGWJFD6a5e7DWVvZx+olYYtrfwWuPxufS3Mw09m uaaIUOld2DNWljq9a13xI7Bdy6/Nw+SxaJQFfz+18TLt0NBqOt0x/LE07hjP8Bwaab8k QMhZ1tx7/urAt9WVwhGqoJ1sMk0yLBXJrYYFqY4HTU1uag5ZeCljWBK3Vh7aB7lNtCm2 xuYKq6XYYAFcJk1IIQMTzYk4CYNsSsWVwzK3L4gOMdrTg8pT91OycYazkfEycSMFvWuS uxAw== Received: by 10.236.181.193 with SMTP id l41mr29296044yhm.38.1331071431274; Tue, 06 Mar 2012 14:03:51 -0800 (PST) MIME-Version: 1.0 Received: by 10.236.180.70 with HTTP; Tue, 6 Mar 2012 14:03:11 -0800 (PST) In-Reply-To: References: Date: Tue, 6 Mar 2012 22:03:11 +0000 Message-ID: To: Michael Morris Cc: PHP Internals List Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] [RFC] Config setting to force all math operations to pass through BCMath library. From: admacedo@gmail.com (Daniel Macedo) Michael, I'm with Anthony, in that you shouldn't change behaviour of this nature with an ini setting. I would bring more pain than what it takes away. This is one of those gotchas that everyone comes across, like you noted. The main issue is that floating point arithmetic != real number arithmetic; and bc functions do solve the issue, but make for some ugly code in complex operations... Since Anthony mentioned Python, maybe the discussion should be if PHP should/could support decimal like Python does http://docs.python.org/library/decimal Now that would be something interesting to see discussed!!