* Fwd: exp sets the errno to ERANGE error .
[not found] <CAGfacvQD2ysaOspXS0MMXe9ECOuaOsMGOwhujAY_0V2aA4NHAw@mail.gmail.com>
@ 2019-05-07 8:23 ` Umesh Kalappa
2019-05-07 11:51 ` Florian Weimer
0 siblings, 1 reply; 2+ messages in thread
From: Umesh Kalappa @ 2019-05-07 8:23 UTC (permalink / raw)
To: libc-help
Hi everyone ,
we have situations ,where the following program sets the errno to
34(range error) in the version 2.28
$cat test.c
int main() {
printf("errno %d\n", errno);
printf("%f\n", exp(-1421.0));
printf("errno %d\n", errno);
}
according the C11 standard the exp should not set the errno to ERANGE
when it underflow to zero .
so we think that glibc (atleast 2.28) is not consistent with the C
standard and any comments regrading the same .
Thank you and looking forward for any suggestions / comments.
~Umesh
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Fwd: exp sets the errno to ERANGE error .
2019-05-07 8:23 ` Fwd: exp sets the errno to ERANGE error Umesh Kalappa
@ 2019-05-07 11:51 ` Florian Weimer
0 siblings, 0 replies; 2+ messages in thread
From: Florian Weimer @ 2019-05-07 11:51 UTC (permalink / raw)
To: libc-help
* Umesh Kalappa:
> Hi everyone ,
>
> we have situations ,where the following program sets the errno to
> 34(range error) in the version 2.28
>
> $cat test.c
> int main() {
> printf("errno %d\n", errno);
> printf("%f\n", exp(-1421.0));
> printf("errno %d\n", errno);
> }
>
> according the C11 standard the exp should not set the errno to ERANGE
> when it underflow to zero .
>
> so we think that glibc (atleast 2.28) is not consistent with the C
> standard and any comments regrading the same .
>
> Thank you and looking forward for any suggestions / comments.
> ~Umesh
There's a thread covering this on libc-alpha already.
Thanks,
Florian
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-05-07 11:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CAGfacvQD2ysaOspXS0MMXe9ECOuaOsMGOwhujAY_0V2aA4NHAw@mail.gmail.com>
2019-05-07 8:23 ` Fwd: exp sets the errno to ERANGE error Umesh Kalappa
2019-05-07 11:51 ` Florian Weimer
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).