From: bugzilla-daemon@bugzilla.kernel.org
To: linux-man@vger.kernel.org
Subject: [Bug 214815] pow(3): underflow result can be -0.0
Date: Tue, 26 Oct 2021 11:51:07 +0000 [thread overview]
Message-ID: <bug-214815-11311-7UA46lU5n9@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-214815-11311@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=214815
--- Comment #1 from Alejandro Colomar (man-pages) (alx.manpages@gmail.com) ---
[[CC += glibc]]
Hello,
On 10/26/21 12:33 AM, bugzilla-daemon@bugzilla.kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=214815
>
> Bug ID: 214815
> Summary: pow(3): underflow result can be -0.0
> Product: Documentation
> Version: unspecified
> Hardware: All
> OS: Linux
> Status: NEW
> Severity: low
> Priority: P1
> Component: man-pages
> Assignee: documentation_man-pages@kernel-bugs.osdl.org
> Reporter: mwelinder@gmail.com
> Regression: No
>
> The pow(3) man pages as found here:
> https://man7.org/linux/man-pages/man3/pow.3.html says...
>
> "If result underflows, and is not representable, a range error occurs, and
> 0.0
> is returned."
>
> That fails to take signs into account. pow(-1e-100,5) produces -0.0, not 0.0
>
> Suggested wording: "... and 0.0 with the appropriate sign is returned."
>
I checked the C standard, and it doesn't mention what to do in this case
(or I couldn't find it). I also checked POSIX; it says that pow() shall
return 0.0 in this case (doesn't specify the sign; should we assume
+0.0, or is it a lazy/buggy wording for +/-0.0?). Finally, the glibc
manual doesn't mention this special case.
So, is this a bug in glibc?
Or is it a bug in POSIX?
Or is it an undocumented glibc extension?
I checked FreeBSD's manual, and it doesn't mention this special case either.
Thanks,
Alex
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
next prev parent reply other threads:[~2021-10-26 11:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-25 22:33 [Bug 214815] New: pow(3): underflow result can be -0.0 bugzilla-daemon
2021-10-26 11:51 ` bugzilla-daemon [this message]
2021-10-26 16:48 ` [Bug 214815] " bugzilla-daemon
2021-10-26 20:54 ` bugzilla-daemon
2021-10-27 20:12 ` bugzilla-daemon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-214815-11311-7UA46lU5n9@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@bugzilla.kernel.org \
--cc=linux-man@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox