public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: "Keith Packard" <keithp@keithp.com>
To: Jon Turney <jon.turney@dronecode.org.uk>,
	"newlib\@sourceware.org" <newlib@sourceware.org>
Subject: Re: [PATCH] libm: Fix 'gamma' and 'gammaf' functions. Clean up other gamma code. [v2]
Date: Mon, 07 Sep 2020 10:31:49 -0700	[thread overview]
Message-ID: <871rjd5w8q.fsf@keithp.com> (raw)
In-Reply-To: <a314bc24-47a8-521e-853b-fb77cb74a7ff@dronecode.org.uk>

[-- Attachment #1: Type: text/plain, Size: 723 bytes --]

Jon Turney <jon.turney@dronecode.org.uk> writes:

> Does the documentation (embedded in some comments at the start of 
> w_gamma.c) for these functions need updating?  I'm not sure if the 
> 'RETURNS' section is correct now?

Yes, lgamma(gamma) returns ERANGE for all overflows and poles. tgamma
returns EDOM for negative integers and -INFINITY, but ERANGE for zero or
overflow as per current POSIX specs.

C17 allows some variation in the errors for tgamma, allowing either
domain or pole errors for non-positive integers, which seems
inconsistent with IEEE754 to me.

> There's also a comment about the historical renaming which might be 
> better exposed as a part of 'NOTES'?

Perhaps?

-- 
-keith

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

      reply	other threads:[~2020-09-07 17:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-04 16:25 Keith Packard
2020-09-04 19:30 ` Corinna Vinschen
2020-09-07 14:27 ` Jon Turney
2020-09-07 17:31   ` Keith Packard [this message]

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=871rjd5w8q.fsf@keithp.com \
    --to=keithp@keithp.com \
    --cc=jon.turney@dronecode.org.uk \
    --cc=newlib@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).