Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100522 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 22102 invoked from network); 11 Sep 2017 17:13:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Sep 2017 17:13:26 -0000 Authentication-Results: pb1.pair.com header.from=php@golemon.com; sender-id=softfail Authentication-Results: pb1.pair.com smtp.mail=php@golemon.com; spf=softfail; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain golemon.com does not designate 209.85.220.169 as permitted sender) X-PHP-List-Original-Sender: php@golemon.com X-Host-Fingerprint: 209.85.220.169 mail-qk0-f169.google.com Received: from [209.85.220.169] ([209.85.220.169:37919] helo=mail-qk0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 28/69-10715-434C6B95 for ; Mon, 11 Sep 2017 13:13:25 -0400 Received: by mail-qk0-f169.google.com with SMTP id a128so19932620qkc.5 for ; Mon, 11 Sep 2017 10:13:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=golemon-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=fGuWegYJO8vLSO0xBnhX8im8mbjEOQbP7gmzhzutkL8=; b=cc7LxEvLjCGHDdAOa3y+eBqwgarCWt6oUvqcvqtxYrCSO19h7AQLKQF+Igstu+BTxA GTc2Kd7kNuGROBRgOFiPowgxUEyr/MgV54xpPA2XNT7a9tq2CNdDz06FAGxzbTdKgHFu mRMau+8CeUuhy/c9ETMPmNSAu0+Hw4R1GV9IVx9sS/o1A6ow5/BR/wrx9KC3wSFZWdh1 LzkhIqQkJ4r2wHxvddAMZJ+7xSCaOnT+RRnahIAm7J3iL9u0PHOP/+SRMB+IaC7OMpn0 HSH5HeND/fDLdSb8J/2Tnz75vrrJWketturHJRYNfETrrQ8cQx1dZLZTAVdhkj7Jb+au OCDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=fGuWegYJO8vLSO0xBnhX8im8mbjEOQbP7gmzhzutkL8=; b=M0cVEDl5kdP86HUeKLNHm9b2Z/wYKpXYWeBcGxrNrH7hJlw+j2SktgsMxtLDfagIqo OQfTgzyBM2dtzr8EwlK66g77UgGb5x59+HZLii7CsX6KpuQcvT/HBsYpennmJdmrpPlh 08+sYllDQ0LN7VVhclgP7IQZFkaOFZmgvO9eEL4uA+8Yff6Ol/ZuLN5dhhEeRugY8wm5 N7CB5W9wLgbTqDCtmSCjS1a8K8v1z+OHkjPE44RCmwYDtrzCabxG+ps0X9OOoHoGFj4e jAT5fObE5v8Q6TUNSuV2mJAVNXHnS93+381O2OZTkcXGptma3YCWV9dtfqtYxIREComG KgGg== X-Gm-Message-State: AHPjjUhmYESaZzhkInv/coLuXQdV80JOp7E2BS9JCBnDmHYyFD8yGJ8x bXH9TYvKR5x0uPtRjL6vuy41p5xAn/Ds X-Google-Smtp-Source: AOwi7QAPP3Y0PpSs/tzw+EBeU4DZb3oymKHVQmZhIVbeBGafukKE1ZSB8bJn0L5NTkl/z3CYt1aG2UK7ZrQeNldeZgI= X-Received: by 10.55.18.137 with SMTP id 9mr16772837qks.208.1505150001916; Mon, 11 Sep 2017 10:13:21 -0700 (PDT) MIME-Version: 1.0 Sender: php@golemon.com Received: by 10.12.132.3 with HTTP; Mon, 11 Sep 2017 10:13:21 -0700 (PDT) X-Originating-IP: [206.252.215.26] In-Reply-To: References: Date: Mon, 11 Sep 2017 10:13:21 -0700 X-Google-Sender-Auth: kkCeo99uJVET01OcdU8emUTV8zA Message-ID: To: "Christoph M. Becker" Cc: "internals@lists.php.net" Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] BCMath and floats From: pollita@php.net (Sara Golemon) On Mon, Sep 11, 2017 at 8:36 AM, Christoph M. Becker wrote: > I already have proposed to introduce bcinit() which would take a string, > int or float, and return a properly formatted string with the given or > default scale, see . Nikita > suggested to accept the arguments allowed by `bcinit()` for all > functions in the first place. This would, however, raise the question > which scale should be applied to floats. > I agree with Nikita. Given that current behavior for floats passed to bc*() obey EG(precision), I'd say we should retain that behavior in these explicit conversions. That way existing (functional) uses aren't impacted, we just quietly start working on other cases (where scientific notation and/or non-period delimiters would have been used). > Before proceeding to an RFC (if necessary at all), I'm looking forward > to hear your thoughts regarding this topic. > IMO, this falls under fixing an existing bug (bc*() functions don't accept certain types of floats), so it wouldn't need an RFC to be accepted. I would wait a little bit to get feedback on the scale question before merging though. I would even offer that we could apply this to 7.[012] safely. -Sara