| Summary: | lround() result usually bad in range [1048576,2097152) | ||
|---|---|---|---|
| Product: | glibc | Reporter: | Richard Kelly <richard.m.kelly> |
| Component: | math | Assignee: | Andreas Jaeger <aj> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | svitkazok |
| Priority: | P2 | Flags: | fweimer:
security-
|
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Host: | Target: | ||
| Build: | Last reconfirmed: | 2004-01-30 20:35:21 | |
| Project(s) to access: | ssh public key: | ||
| Attachments: | Testprogram | ||
|
Description
Richard Kelly
2004-01-30 20:09:26 UTC
Created attachment 1 [details]
Testprogram
Ok, verified with the programm t.c: gromit:~/tmp:[0]$ gcc -Wall t.c -lm gromit:~/tmp:[0]$ ./a.out 2150924286 Fixed with a patch with the description below, it will be in the next release. Thanks, Andreas 2004-02-01 Ulrich Drepper <drepper@redhat.com> * math/libm-test.inc (lround_test): Add new test. (llround_test): Likewise. (lrint_test): Likewise. (llrint_test): Likewise. * sysdeps/ieee754/dbl-64/s_lround.c (__lround): Fix special case with result taking up 20 bits. * sysdeps/ieee754/dbl-64/s_lrint.c (__lrint): Likewise. * sysdeps/ieee754/dbl-64/s_llrint.c (__llrint): Likewise.. * sysdeps/ieee754/ldbl-96/s_lroundl.c (__lroundl): Fix special case with result taking up 31 bits. * sysdeps/ieee754/ldbl-96/s_lrintl.c (__lrintl): Likewise. Comment on attachment 1 [details] Testprogram >#define _GNU_SOURCE 1 >#include <math.h> >#include <stdio.h> > >int >main (void) >{ > long int j = lround (1071930.0008); > > printf ("%ld\n", j); > > return 0; >} Hello. Excuse me for posting a spam comment. But you have a very good site. And I really need this link. https://www.history-of-great-discoveries.com/ |