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 BFC691F5CB for ; Thu, 3 Oct 2024 09:12:39 +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=ZPy++XCR; 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=hvLcjDiL; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1727946727; bh=JutFZyBEzdblrtSkpjxhRezwYz8la8ydvJT4b0/pngs=; 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=ZPy++XCRWhpvr4/FBUi1HNgROfrFxmeANHnUF1Wtd/5vHrpaqhkotC6D9CigJcwCX Vq07b6OdnjEf/9lnA/dwNzTIqnDCA3qTJczHtklLacbAPk/fcsf8A1Aiez59QUnzOF E2bPJx1YBzkZXxVxrrNochCs2u/Lb42g7WFJptcA= Received: from nue.mailmanlists.eu (localhost [IPv6:::1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 2A2E943F89 for ; Thu, 3 Oct 2024 09:12:07 +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=hvLcjDiL; 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 E022443FA6 for ; Thu, 3 Oct 2024 09:11:54 +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=6033Fi6aUZAltO1UcB6UER/EE6JPgMc2lHFOAuXpAgk=; b=hvLcjDiLVAAsxkemAUnB50WfHG9fWnd1lH5tMMRYBcAKjvxSUJGjliP6aHwb6uIaii6L gwcDhB6EmHFYN0kb8WB5dsTDN5PnmmjmmtT+NY3MyP+DrT4E2eCrRP0ZLiGqcxBYnvaPkE 8apm9dxSj1kaAeXKRpuPUF3dJsXyOTnECmjvxq0h5ZYzV2YwiK9cpqstixWVEQRcwnpwDY ya1zisTo6VcH+1xLQUygJAdayTxN55bPpkS/3BCGqszVgOqJUNRqBt3Z3mX9k4tZytAf4+ j1ngb6Et0dirOd6x5vAIfG7SOCiRT5LsOCToOFCuetYXUOq7nr+rTxznApLyQmbg== Received: by recvd-d66cff667-86cnt with SMTP id recvd-d66cff667-86cnt-1-66FE5FD9-9 2024-10-03 09:11:53.403077489 +0000 UTC m=+1782823.112994010 Received: from herokuapp.com (unknown) by geopod-ismtpd-9 (SG) with ESMTP id lTmiwgcGQ9C7YT-GAdlECQ for ; Thu, 03 Oct 2024 09:11:53.355 +0000 (UTC) Date: Thu, 03 Oct 2024 09:11:53 +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: kou 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: 96065 X-SG-EID: =?us-ascii?Q?u001=2ED7OOQ=2Fm0Kq07zFkvzUGZ6zzR5=2FOB9wyQMTO8JGnwe+KzVz45MeDEcWVwb?= =?us-ascii?Q?EYHiser+3MtoKXWerJd3H7fJrQoui6kBs4QC6fv?= =?us-ascii?Q?i+OAj2kJFC=2Fy0qLbQr67ED7TSr6OQb9EwM9f4AO?= =?us-ascii?Q?vdIipZUy=2FTey7KrKB40Xr3aLyteC=2FeXBn6kPYcZ?= =?us-ascii?Q?m2sIkS=2FAUSno2NWinqWMxhwXereyhhfQkI9ew4e?= =?us-ascii?Q?x=2Fd6k2QHzKL1s3sX7Wxz7q7z6WKxDs776PhpMPY?= =?us-ascii?Q?HTgn?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: PVFLIEAPKQ6TUAORPVNY2DZH2WGSNCNV X-Message-ID-Hash: PVFLIEAPKQ6TUAORPVNY2DZH2WGSNCNV 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:119429] [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: "kou (Kouhei Sutou) via ruby-core" Cc: "kou (Kouhei Sutou)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #20705 has been updated by kou (Kouhei Sutou). @nobu Could you open a PR based on your implementation https://github.com/nobu/ruby/tree/float-dtoa ? My implementation doesn't accept `0xf.p0` but your implementation does. ---------------------------------------- Feature #20705: Should "0.E-9" be a valid float value? https://bugs.ruby-lang.org/issues/20705#change-110044 * 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/