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,T_SCC_BODY_TEXT_LINE 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) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 2CA601F47A for ; Thu, 29 Aug 2024 14:10:58 +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=miGaTW+G; 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=elnmL6XP; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1724940625; bh=ouzAXyDghf95pGVq2w6bfXPcosv25mZ9JKPU53iTcWo=; 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=miGaTW+GUC2dQUAr4aDivv80IqQd4wdCSgy26dWMXAxpk/4bwMCVehwK+KhnuyQ8I prRWC5iOTaSYy3g48oO7vcjvqwV8H4/NM615LLOqaCu0JCsuxLKnZZesK3p2LhnyuX dgEMEz999frq5nRtszwkKtfttHlRMWWtgDzp40ZM= Received: from nue.mailmanlists.eu (localhost [IPv6:::1]) by nue.mailmanlists.eu (Postfix) with ESMTP id D023743D2A for ; Thu, 29 Aug 2024 14:10:25 +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=elnmL6XP; dkim-atps=neutral Received: from s.wrqvtzvf.outbound-mail.sendgrid.net (s.wrqvtzvf.outbound-mail.sendgrid.net [149.72.126.143]) by nue.mailmanlists.eu (Postfix) with ESMTPS id 1645C43CA6 for ; Thu, 29 Aug 2024 14:10:14 +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=3xpPXg9dmF987Yz2PB7H7OzkYtJ9/Oy3aPF9XM/uAx8=; b=elnmL6XPhtImR/I/aucwu38q5k2f3VAgCLRNygMY5rjp//zTaJZqE4Tf/XXUqzV5wHsu kyAPXRylA+pOgLSzDa+GHJ8BjwSBlYDJq3mEt1xBrTpCKW3x2jEH5PIX71TB2ugs5dymND lGvXKo/laeNDaqmL9H72pQal1YLZinJ9l2m6mQHLzWMPDU/iy5iKo2Tai8y4rRLFkdOORJ yWNzy7naYAvCymcK3ESe9MQ/PAnETBLleQEC9I/6ETkPh1RbENyfNkWZ8603uhbYedMMIn DnIdskwxZkFSImt9r7Wgi+hP3vVYbVqzVe5v8KyBkYP04RBz0PE1iUhoQC6kh7Xg== Received: by recvd-764b8dc56-kcbb6 with SMTP id recvd-764b8dc56-kcbb6-1-66D08145-83 2024-08-29 14:10:13.879790479 +0000 UTC m=+661752.932690860 Received: from herokuapp.com (unknown) by geopod-ismtpd-13 (SG) with ESMTP id 1PpZ1La7RLm-Mk2jn2eQ5Q for ; Thu, 29 Aug 2024 14:10:13.796 +0000 (UTC) Date: Thu, 29 Aug 2024 14:10:13 +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: Hanmac 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: 95618 X-SG-EID: =?us-ascii?Q?u001=2Esmy6yCqJfS9vx+iKDXG5SgPH93Xj29cU+t3dbfH4xtF83pBltU8pCXPjy?= =?us-ascii?Q?ekl7IOZiY=2F9f=2FX9c2pX9cxxrKubCddcF+MDsTx1?= =?us-ascii?Q?8qLWYyR9UesK8PZDNlBtQtWafMHzswng7maKlF9?= =?us-ascii?Q?p+9f3evIDTeQvYJMUWL5eKw6fEAKo0EyQ5GfE4E?= =?us-ascii?Q?+huCfIbeyla50Ldd1u2K+bq9l2ko9jKIjHaRG6=2F?= =?us-ascii?Q?8P5WVQUhtvJUF25Yhd6NjNqnOyLTAAwO2jQjPhq?= =?us-ascii?Q?D4xiE46h1DWrEsfAX7U+Vfrg2A=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: JJT64YHMH2KA47HSOURY7XISIEI35NDV X-Message-ID-Hash: JJT64YHMH2KA47HSOURY7XISIEI35NDV 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:118982] [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: "Hanmac (Hans Mackowiak) via ruby-core" Cc: "Hanmac (Hans Mackowiak)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #20705 has been updated by Hanmac (Hans Mackowiak). we need to be careful with this, because while `0.1E-9` is also a valid ruby literal, `0.E-9` is not. (unknown method E for 0) `1E-9` is valid literal again ---------------------------------------- Feature #20705: Should "0.E-9" be a valid float value? https://bugs.ruby-lang.org/issues/20705#change-109556 * 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/