From patchwork Sun Mar 31 20:38:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1918354 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=bzntrMyB; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V75bM1ZzHz1yYH for ; Mon, 1 Apr 2024 07:39:11 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 82E9A3858C41 for ; Sun, 31 Mar 2024 20:39:08 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by sourceware.org (Postfix) with ESMTPS id 1C3F93858D35 for ; Sun, 31 Mar 2024 20:38:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1C3F93858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1C3F93858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2604:1380:40e1:4800::1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711917529; cv=none; b=w6Ytc2Hya9wOjJocqXPUpHAl9QKcC1w18V1tTSin6JPpyHWbcJpsgw4BFUEZjxABmdfLETe728yNvbVAR5YMCj7jHNVTlGNX4XkkAMaSXz6OMykjdHd+hFcFzy3f4zmStW1ajzW0wNb2TT2ue/X2xi0BJYQ8uP2mOxWc/6fKlQA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711917529; c=relaxed/simple; bh=Cs9LzN2DY2mWV7tZ8UOTDErMrCBGrjy0opwrFl9fEKQ=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=E2QXW1Erpmt2AYFsScYeqR/2k/TD9OV8j/e/1V40/KjAGuXeIaMoG/h+0H0C8vDL1+j+bFh+F0g9l4LsBJn5cKzVReOuvsQEvUtZTLFA7gccZWVOqWKG7rk+/p7RL7gNvB9TXyvtipfk6APVYYWvvA1XPYy/rBcVs9kD0QqU30o= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id E35FECE0B4B; Sun, 31 Mar 2024 20:38:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6C65EC433F1; Sun, 31 Mar 2024 20:38:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711917523; bh=Cs9LzN2DY2mWV7tZ8UOTDErMrCBGrjy0opwrFl9fEKQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bzntrMyBaCClP+A/CjiaYafKPz5Vx0UNgJ4jXroArTSqA1TgZ0thcJZnaOiG2Xppk /GongSOE00pIm015nGajhX45mZvTfiCJ/X2Nr+aXbyc6ScaHsUzc+iLpSMnf9AW9FJ 4iRpDRW9kDI0vTLiEVO4AJ5Z6+uqYib7X+lo3PytfyTEnWLfcN2zLiCbFKRX9Ketxl xI9RrUYIH3GDxkLnu4XLVkTXuHGC9daBs28qaFYc0b3XfwBPQKDWci4SIqyRExUwMg sVlMSpAaucXwMNe0jZZmX0m0fmAAwV7g/DvcRnhP1U/TZ9Juxm0MNQjcNwkkpXZcYy K7GCIwEHdNQXA== Date: Sun, 31 Mar 2024 22:38:39 +0200 From: Alejandro Colomar To: libc-alpha@sourceware.org Cc: Alejandro Colomar , Morten Welinder , Adhemerval Zanella Netto , Vincent Lefevre , DJ Delorie , Paul Zimmermann , Andreas Schwab Subject: [PATCH v3 1/4] manual: logb(x) is floor(log2(fabs(x))) Message-ID: <20240331203829.23591-2-alx@kernel.org> X-Mailer: git-send-email 2.43.0 References: <20240305161213.14364-1-alx@kernel.org> <20240331203829.23591-1-alx@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240331203829.23591-1-alx@kernel.org> X-Spam-Status: No, score=-10.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org log2(3) doesn't accept negative input, but it seems logb(3) does accept it. Link: Reported-by: Morten Welinder Reviewed-by: DJ Delorie Cc: Adhemerval Zanella Netto Cc: Vincent Lefevre Cc: Paul Zimmermann Cc: Andreas Schwab Signed-off-by: Alejandro Colomar --- manual/math.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manual/math.texi b/manual/math.texi index 2f6ee253b9..c54eaebb65 100644 --- a/manual/math.texi +++ b/manual/math.texi @@ -561,7 +561,7 @@ These functions return the base-2 logarithm of @var{x}. @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions extract the exponent of @var{x} and return it as a floating-point value. If @code{FLT_RADIX} is two, @code{logb} is equal -to @code{floor (log2 (x))}, except it's probably faster. +to @code{floor (log2 (fabs (x)))}, except it's probably faster. If @var{x} is de-normalized, @code{logb} returns the exponent @var{x} would have if it were normalized. If @var{x} is infinity (positive or From patchwork Sun Mar 31 20:38:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1918356 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=oFZ++th5; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V75c5678Zz1yYH for ; Mon, 1 Apr 2024 07:39:49 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 284083858D38 for ; Sun, 31 Mar 2024 20:39:48 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by sourceware.org (Postfix) with ESMTPS id 35833385841C for ; Sun, 31 Mar 2024 20:38:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 35833385841C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 35833385841C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=139.178.84.217 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711917533; cv=none; b=Kn7JSsW8NyjYlZQKkPm8Z4o+wcgnHfJDdPzFIxaiCaqfn1kyrMCPuWARLs6SLWRenjApjAeXV7qonsPR414ddlmehQa1Oj8pvxuPbi+vhDAemseOhx2S4HtxQz/9N5kMvHCpU0GnxAzvQURw1g7AbOGYJ5TsSYSxMgkA6jD5Pdk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711917533; c=relaxed/simple; bh=Qsd+zVsUf9Lpe3OwoNf4wgC43s2Nq7b+ptaC4exJEGM=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=QFR/B7onPlMzIwp8JX9O33LYYEgDPTNN6OB6XjAjO3KCvqBiAwH/t6QS7hWSai7buLNSQZ6uFmuJGTLMPcRBEQL+jzMSDSfhep+/n91rAIgaFV2B/RpjbFj2u5u+nspxNUzMEXchoa2KaHBkGMi7xkUNSpo93F1FrwdwCNbpsSc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id C5ECB6066F; Sun, 31 Mar 2024 20:38:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C2CD1C433F1; Sun, 31 Mar 2024 20:38:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711917527; bh=Qsd+zVsUf9Lpe3OwoNf4wgC43s2Nq7b+ptaC4exJEGM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oFZ++th55ahlR/NGGkOjO6whfmKjAdpHkIAuJTw9ObenqfTuI0WUxut2RjYLpbYW6 PKXigu677Mn0MS9NsttwADfj7YUb8HpTSEfKi5QwRAlA0oKSYbug8FKHs4GDbqQ1Ex nlsGK18ZtN7eC+18BNq8VRT4gjBnlaArdia6WkU8j/SQJbiUAzzZS99jdVVwZ8axkN mP2CeiTJrku40/9qwIcsBCY0CX/78L2LU9ooaoULTwz5qqAKwDo30vyDtsX/aY6dJa Q+4kuFjPaJS9llh83HnltIC9XxFpRoRXfT7jgmN240hpiyfiVIpxbWqDVJYlVC79IZ jANHmJHK3ZXsQ== Date: Sun, 31 Mar 2024 22:38:44 +0200 From: Alejandro Colomar To: libc-alpha@sourceware.org Cc: Alejandro Colomar , Morten Welinder , Adhemerval Zanella Netto , Vincent Lefevre , DJ Delorie , Paul Zimmermann , Andreas Schwab Subject: [PATCH v3 2/4] manual: floor(log2(fabs(x))) has rounding errors Message-ID: <20240331203829.23591-3-alx@kernel.org> X-Mailer: git-send-email 2.43.0 References: <20240305161213.14364-1-alx@kernel.org> <20240331203829.23591-1-alx@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240331203829.23591-1-alx@kernel.org> X-Spam-Status: No, score=-10.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Link: Reported-by: Vincent Lefevre Suggested-by: Vincent Lefevre Reviewed-by: DJ Delorie Cc: Morten Welinder Cc: Adhemerval Zanella Netto Cc: Paul Zimmermann Cc: Andreas Schwab Signed-off-by: Alejandro Colomar --- manual/math.texi | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/manual/math.texi b/manual/math.texi index c54eaebb65..79bf3a1401 100644 --- a/manual/math.texi +++ b/manual/math.texi @@ -560,8 +560,11 @@ These functions return the base-2 logarithm of @var{x}. @standardsx{logbfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions extract the exponent of @var{x} and return it as a -floating-point value. If @code{FLT_RADIX} is two, @code{logb} is equal -to @code{floor (log2 (fabs (x)))}, except it's probably faster. +floating-point value. +If @code{FLT_RADIX} is two, +@code{logb (x)} is similar to @code{floor (log2 (fabs (x)))}, +except that the latter may give an incorrect integer +due to intermediate rounding. If @var{x} is de-normalized, @code{logb} returns the exponent @var{x} would have if it were normalized. If @var{x} is infinity (positive or From patchwork Sun Mar 31 20:38:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1918357 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=Fow+xdVl; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V75cq41j6z1yYB for ; Mon, 1 Apr 2024 07:40:27 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C47F43858D35 for ; Sun, 31 Mar 2024 20:40:25 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by sourceware.org (Postfix) with ESMTPS id 1180F385842C for ; Sun, 31 Mar 2024 20:38:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1180F385842C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1180F385842C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=145.40.73.55 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711917538; cv=none; b=w1M6+0zxYxh+vUJKGCnSVTdJTwQ4sRjI3ETqbfRgL57D8O5apdQK0RXPRlHYg8gfAf48qs+g743nrjbw14ajv4ekH45MCiJtF/IbuYkHaYYD3I8L8j56jNG7o8xJJTWjsjmbe9fquGeNoxq5HQ5V8EJ6qCROrJXkMJAMztignSM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711917538; c=relaxed/simple; bh=gKH+7BdUChhLIIMNkcrUV+TAepLNwFO9CaEY9O74ASE=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=benNwvzkmLqHT3tN8UJrfvSkn0Ig+Jw6RmhtsieDguetSlDOK7Iv0WOc1tRVieFiB4yGPWQEJlbfJNYTuJBNKdGkijiGuvDFc1GATAAtYfya5XM0nkd60w1eXzvyl2q7Fa/Apl7AefyC8sAP19FCsX2t3If2/uoiik1RLcbA4r4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 830B1CE0B4B; Sun, 31 Mar 2024 20:38:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14C89C433C7; Sun, 31 Mar 2024 20:38:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711917531; bh=gKH+7BdUChhLIIMNkcrUV+TAepLNwFO9CaEY9O74ASE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Fow+xdVlSUBl54GZAbgQ9ft9Z+Qglwp3KojoDX1JQkV1z68OVNjmd+nn5pyZxLFX/ mBECb9IA/wwiWnxX1SNLJdIMcXSdR2zfAicYd7kCLjpRPZvABxbYSkzG1X4qzsxumx ozJpO3CM7qlbMPKgvchtLlEo40Qa9vbuoTjBKtfgy9VkFFJl6Gp0qNxtaZ8DazihoD yYFR9mdbv/uvWSxK26smNBLXSGbEFr1jE9o6Ysn7v7iavvKia8Hv1lu/kKWopCBtlp nwH0XJH4w/MUKWUidJc1y+VjStDRU1z3S/SbOJ4unE+YlWdWLrxEbQItejXBCKhoj4 V3O8pnk7c+k4g== Date: Sun, 31 Mar 2024 22:38:48 +0200 From: Alejandro Colomar To: libc-alpha@sourceware.org Cc: Alejandro Colomar , Morten Welinder , Adhemerval Zanella Netto , Vincent Lefevre , DJ Delorie , Paul Zimmermann , Andreas Schwab Subject: [PATCH v3 3/4] manual: Clarify return value of cbrt(3) Message-ID: <20240331203829.23591-4-alx@kernel.org> X-Mailer: git-send-email 2.43.0 References: <20240305161213.14364-1-alx@kernel.org> <20240331203829.23591-1-alx@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240331203829.23591-1-alx@kernel.org> X-Spam-Status: No, score=-10.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Link: Reported-by: Morten Welinder Cowritten-by: Morten Welinder Cc: Adhemerval Zanella Netto Cc: Vincent Lefevre Cc: DJ Delorie Cc: Paul Zimmermann Cc: Andreas Schwab Signed-off-by: Alejandro Colomar --- manual/math.texi | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/manual/math.texi b/manual/math.texi index 79bf3a1401..dfb685a71e 100644 --- a/manual/math.texi +++ b/manual/math.texi @@ -700,8 +700,12 @@ Mathematically, it should return a complex number. @standardsx{cbrtfN, TS 18661-3:2015, math.h} @standardsx{cbrtfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} -These functions return the cube root of @var{x}. They cannot -fail; every representable real value has a representable real cube root. +These functions return the cube root of @var{x}. +They cannot fail; +every representable real value +has a real cube root, +and rounding it to a representable value +never causes overflow nor underflow. @end deftypefun @deftypefun double hypot (double @var{x}, double @var{y}) From patchwork Sun Mar 31 20:38:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1918355 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=Q8XDbLTO; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V75bj17nzz1yYH for ; Mon, 1 Apr 2024 07:39:29 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4B6EA3858D37 for ; Sun, 31 Mar 2024 20:39:27 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by sourceware.org (Postfix) with ESMTPS id 79D903858427 for ; Sun, 31 Mar 2024 20:38:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 79D903858427 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 79D903858427 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=145.40.73.55 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711917542; cv=none; b=EJeA9xwbgyVU9NLEG6yJB4NjsdfWuwm88URrhOQuHt8TiB7XRAMuXulxRu2pNlEvL4zqEFQPKsfcD1bvwqEJ/3wYKuWOSCszrFUSVXPbWz/cZB9y96e8zMI9Vf5y0rTKocI728tgm3egPWUwapqAHn7JhKtTvWfLdzlADdTI+KE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711917542; c=relaxed/simple; bh=saG1ryPAxjTbiuIgji8GmfnGqncxhLJl68Bh2AymBxU=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=BCI4bEU7mFnPbrIImmm3FiavAiLu11iRD/KrubAhICA8pe3JSLH3oGlqI5OTD2D0yD023GOump/RXMcHtAXMAP0NL99148l+NMBOTCv8TyQQFfRGNhU0quGSD45v5SkbLA5Sr9Ugq6AJxJdS9PFX/cEVXE0+g1+9MuOeltOe1tM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id E1650CE0B22; Sun, 31 Mar 2024 20:38:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5FB24C433F1; Sun, 31 Mar 2024 20:38:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711917536; bh=saG1ryPAxjTbiuIgji8GmfnGqncxhLJl68Bh2AymBxU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Q8XDbLTOT//63pKx1dkMOFHHBYFyWEDvBGRBkzQTR4tHqa236o7d3IoXsmjLr13/0 rig4Je1ivT/lNVUTvE+LJQNnNUediBCtvc1x3LOM/1C+aKitjztuVnZjZHoDOThY0I hmsmvR3PZAtkm6Jf2Kg7hGbPxvsLHVtxnU/YeoFxInJYedIz00JrhbUBj/vlEXngda peaPaq9WVpG/CJegp+ARnAdKiSWJgyJ8Pj50HLqEQ1u16DUqNDE1W+v1wCXiMErkoF 1Ch/Vy6yohBRZNZh42c1CMuwCTezwJH9CD50+xtnr/ZDS2EQum0P1q8kCaO4nMpKLz teWJpj7TRh9ig== Date: Sun, 31 Mar 2024 22:38:52 +0200 From: Alejandro Colomar To: libc-alpha@sourceware.org Cc: Alejandro Colomar , Morten Welinder , Adhemerval Zanella Netto , Vincent Lefevre , DJ Delorie , Paul Zimmermann , Andreas Schwab Subject: [PATCH v3 4/4] manual: significand() uses FLT_RADIX, not 2 Message-ID: <20240331203829.23591-5-alx@kernel.org> X-Mailer: git-send-email 2.43.0 References: <20240305161213.14364-1-alx@kernel.org> <20240331203829.23591-1-alx@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240331203829.23591-1-alx@kernel.org> X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org It's implemented using scalb(), which uses FLT_RADIX, AFAIK. Link: Reported-by: Morten Welinder Cc: Adhemerval Zanella Netto Cc: Vincent Lefevre Cc: DJ Delorie Cc: Paul Zimmermann Cc: Andreas Schwab Signed-off-by: Alejandro Colomar --- manual/arith.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manual/arith.texi b/manual/arith.texi index 0742c08ac4..034d9d2ba5 100644 --- a/manual/arith.texi +++ b/manual/arith.texi @@ -1395,7 +1395,7 @@ The @code{scalb} function is the BSD name for @code{ldexp}. @standards{BSD, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} @code{significand} returns the mantissa of @var{x} scaled to the range -@math{[1, 2)}. +@math{[1, @code{FLT_RADIX})}. It is equivalent to @w{@code{scalb (@var{x}, (double) -ilogb (@var{x}))}}. This function exists mainly for use in certain standardized tests