Set errno in expm1{,f} / log1p{,f}

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Set errno in expm1{,f} / log1p{,f}

Joern Wolfgang Rennecke
I find that the gcc test gcc.dg/torture/pr68264.c fails because expm1 /
log1p fail to set errno.
Fixed with the attached patch.
OK to commit?

expm1-log1p-errno-patch.txt (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Set errno in expm1{,f} / log1p{,f}

Sourceware - newlib list mailing list
On 7/9/19 9:38 AM, Joern Wolfgang Rennecke wrote:
> I find that the gcc test gcc.dg/torture/pr68264.c fails because expm1 / log1p
> fail to set errno.
> Fixed with the attached patch.
> OK to commit?
It is interesting to note that the Linux log1p man page says "These functions do
not set errno."  This is in conflict with the C standard and POSIX which call
for the normal errno behavior for it. Perhaps this explains why errno was not
being set.

(Changes look good to me, but I don't have authority to approve committal.)

Craig




Reply | Threaded
Open this post in threaded view
|

Re: Set errno in expm1{,f} / log1p{,f}

Jeff Johnston
Patch applied.

-- Jeff J.

On Tue, Jul 9, 2019 at 12:06 PM Craig Howland via newlib <
[hidden email]> wrote:

> On 7/9/19 9:38 AM, Joern Wolfgang Rennecke wrote:
> > I find that the gcc test gcc.dg/torture/pr68264.c fails because expm1 /
> log1p
> > fail to set errno.
> > Fixed with the attached patch.
> > OK to commit?
> It is interesting to note that the Linux log1p man page says "These
> functions do
> not set errno."  This is in conflict with the C standard and POSIX which
> call
> for the normal errno behavior for it. Perhaps this explains why errno was
> not
> being set.
>
> (Changes look good to me, but I don't have authority to approve committal.)
>
> Craig
>
>
>
>
>