From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on starla X-Spam-Level: X-Spam-Status: No, score=0.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_BL_SPAMCOP_NET,SPF_HELO_PASS, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 Received: from nue.mailmanlists.eu (nue.mailmanlists.eu [94.130.110.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 274181F5CB for ; Thu, 3 Oct 2024 08:59:46 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; unprotected) header.d=ml.ruby-lang.org header.i=@ml.ruby-lang.org header.a=rsa-sha256 header.s=mail header.b=yImMPG4y; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=Dw0aEKMI; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1727945953; bh=/R9ZJFsf8a8ZmVFvwSrscbejALH8zf9hhLx2Q5WLL78=; h=Date:References:To:Reply-To:Subject:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From:Cc:From; b=yImMPG4yGcyH4L2szRMI0JAoQ7DTSZgTnWOB9CVWFpc/xFcAjJAjG9h6lph1csuos DLOwXu24rUsuBfT3V6RDlizJ1ZKxEoKUHYp5gO5TwHy399bpiN0ln8FR3fgPrPX2IE r8oyMZvx/8SwPHgQYuG6bTwn+c1qYKM5aK9YbRrk= Received: from nue.mailmanlists.eu (localhost [IPv6:::1]) by nue.mailmanlists.eu (Postfix) with ESMTP id B041143F75 for ; Thu, 3 Oct 2024 08:59:13 +0000 (UTC) Authentication-Results: nue.mailmanlists.eu; dkim=pass (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=Dw0aEKMI; dkim-atps=neutral Received: from s.wrqvwxzv.outbound-mail.sendgrid.net (s.wrqvwxzv.outbound-mail.sendgrid.net [149.72.154.232]) by nue.mailmanlists.eu (Postfix) with ESMTPS id D893143EC3 for ; Thu, 3 Oct 2024 08:59:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ruby-lang.org; h=from:references:subject:mime-version:content-type: content-transfer-encoding:list-id:to:cc:content-type:from:subject:to; s=s1; bh=L7HaoCfHrgOUV9KJ9tOsvwt8ic7OtuT0EMyi2Ga3FGY=; b=Dw0aEKMIFawUU8cAyGtr6P6jLVMlXIzQSpuBvoe2obXtYjhdwQ5tnqIClTTKxxXMJ5KT uTVBXAsQwjOtWgh8lum2hXH9SpFbOCQhlqJxndpgmxuzVfNQivXK1MeBXUHkaxNgQ0tC4A pPBNuqd7/jw/TwdYmFvHhhiK49eHn7DmYB0Oc6EeAhmF34H5shfTfmryZq0qT9MYImoZyg 52F6Ftv5to01XCmvpm8d4GHHhHVxUiCfrNb29hfMGT6y2W8SDh3puhv4x+NUtgvQcTZ7iF 60+w46r18cwDlpv3xKKhy9YwdDSF1O1XZQftcmB7TJMbYtk2/F95K9TM5ClZpqlw== Received: by recvd-d66cff667-wg6qj with SMTP id recvd-d66cff667-wg6qj-1-66FE5CD3-8 2024-10-03 08:58:59.409176146 +0000 UTC m=+1782150.188961191 Received: from herokuapp.com (unknown) by geopod-ismtpd-1 (SG) with ESMTP id 5mU_ZRmvRcWMqlvUbKgN0g for ; Thu, 03 Oct 2024 08:58:59.307 +0000 (UTC) Date: Thu, 03 Oct 2024 08:58:59 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Feature X-Redmine-Issue-Id: 20705 X-Redmine-Issue-Author: kou X-Redmine-Issue-Priority: Normal X-Redmine-Sender: matz X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-Redmine-MailingListIntegration-Message-Ids: 96062 X-SG-EID: =?us-ascii?Q?u001=2Eqca74XLbbBG2T0HhbEZgBN9E1Qhb0c7bGBe1waNAWdTreSqyWPDekZUgq?= =?us-ascii?Q?NYk4+nm=2F0VIqwc8ZBTQxqk7G=2FctsRLtYG2yTl=2FP?= =?us-ascii?Q?2CaGNETxG2TzC4bzaDr26YXDUfewAu=2F=2FO1XTbnH?= =?us-ascii?Q?y7JEUmncs7EIOMi9wHvt7s7QAzqNNNnEb=2Fm2iHd?= =?us-ascii?Q?DXCQrLHRjZYwVPMfIvVzYan5BaEF=2Fm2G6vKxrwC?= =?us-ascii?Q?O7=2F5JCtYqrJ27qhT99YKbBCWDjLBwJXdq96HMYC?= =?us-ascii?Q?w6rD0cypZWSkmbelq2BX0snB5Q=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: ABYG6ZJUKKQ2VPMZ2N4SIL7WMOSJC654 X-Message-ID-Hash: ABYG6ZJUKKQ2VPMZ2N4SIL7WMOSJC654 X-MailFrom: bounces+313651-b711-ruby-core=ml.ruby-lang.org@em5188.ruby-lang.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list Reply-To: Ruby developers Subject: [ruby-core:119426] [Ruby master Feature#20705] Should "0.E-9" be a valid float value? List-Id: Ruby developers Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: "matz (Yukihiro Matsumoto) via ruby-core" Cc: "matz (Yukihiro Matsumoto)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #20705 has been updated by matz (Yukihiro Matsumoto). I'd like to enhance string to float conversion in general. I might introduce small incompatibility, but impact will be small. Matz. ---------------------------------------- Feature #20705: Should "0.E-9" be a valid float value? https://bugs.ruby-lang.org/issues/20705#change-110041 * Author: kou (Kouhei Sutou) * Status: Open ---------------------------------------- Ruby doesn't accept "0.E-9" as a valid float value: ```console $ ruby -e 'Float("0.E-9")' :218:in 'Kernel#Float': invalid value for Float(): "0.E-9" (ArgumentError) from -e:1:in '
' ``` But other systems accept "0.E-9" as a valid float value: PostgreSQL: ```text => select 0.E-9; ?column? ------------- 0.000000000 (1 row) ``` MySQL: ```text > select 0.E-9; +-------+ | 0.E-9 | +-------+ | 0 | +-------+ 1 row in set (0.00 sec) ``` Python: ```console $ python3 -c 'print(0.E-9)' 0.0 ``` Node.js: ```console $ nodejs -e 'console.log(0.E-9)' 0 ``` Should Ruby accept "0.E-9" as a valid float value? FYI: I don't have an opinion of this. I just realized this by an issue from an user of a maintained library by me: https://github.com/apache/arrow/issues/43877 -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/