Re: [PATCH] libm: Fix 'gamma' and 'gammaf' functions. Clean up other gamma code. [v2]
Keith Packard via Newlib <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
Jon Turney <[email protected]> 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
signature.asc
(application/pgp-signature, 832 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEw4O3eCVWE9/bQJ2R2yIaaQAAABEFAl9WboUACgkQ2yIaaQAA ABHAiA/+NbTDJ8cO73PEsxZEvZrF6aNEVDGcLegYpKMW/r/9Q4WSizxxcXOHtjMm TE7f0FPKfTQnd7mLJpsLWWrELMacq/v/b1S80i5wZ048u/ZZaGmJeBP5eS3hG5bF faypCP5+nNe1Npl/N3dAFT7tqikzPDamf6IVZ8JvRqL0XwpKspUZO8i0FUjeJlph 0xFTt7dTPyKXcpE1ELOwaLAtyPRyzXmteMeokoENBiOx0R4ATgZ5wPZPb390rWwA 8xyo3P7lX9UAkVp7lBywbV3sgZ3zn8saYpMbF/WDEAOT6JRLSEGq1pt8n0QcBS7T WCvO7Ce5TpMW8uwcJtUQjBLsHKYb8P0QLUZhHcfQf8Xro5hcLgDTIssWkXNN49F+ /n04j0bEObdYfg7bUbClbnNTe4iQpyEYdkivcpByRO32cpB7VkbvAO/N95eK/Eh1 1C0f76W68gH4l38LCy2eGMpC85uBBgc6pZLpKu/A72U8pSgFOlFXCtACNg/8yR/g HFAu4Z40vEkCHKNRz+ODpCITnGzmT8+KxAJUxEmqUYJwul68SbiPoVHrSnohbwVC 3hpdI7uXmJLX1Ej05x/nQZoUWCxpmD54SEIZBoCJd1ojrA2E1vgaIn79dGOg1zFz ur5rkQrUhDEq7GkAZAc48Uzuv23CuBngPMdGDfIh8AONNaNUGjo= =lD1o -----END PGP SIGNATURE-----