[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#43530: lrint not defined but exists in library



Package: libc6-dev
Version: 2.1.2-0pre10
Severity: important

erik@vulcain:~/teilkrei > cat delme.c
#include <math.h>
#include <stdio.h>

int main()
{
double x=-3.3;
printf("%d\n",lrint(x));
return 0;
};
erik@vulcain:~/teilkrei > gcc -Wall delme.c -lm
delme.c: In function `main':
delme.c:7: warning: implicit declaration of function `lrint'
erik@vulcain:~/teilkrei > ./a.out
-3
erik@vulcain:~/teilkrei > info "(libc)Rounding Functions"
*snipsnap*
   The functions listed here perform operations such as rounding and
truncation of floating-point values. Some of these functions convert
floating point numbers to integer values.  They are all declared in
`math.h'.
*snipsnap*
 - Function: long int lrint (double X)
 - Function: long int lrintf (float X)
 - Function: long int lrintl (long double X)
     These functions are just like `rint', but they return a `long int'
     instead of a floating-point number.
*snipsnap*


bug: docu sais lrint is defined, but test shows it is not defined.
but it is implemented in libm and works correctly.


cu
erik

--
EMAIL: erikyyy@studbox.uni-stuttgart.de                  \\\\
       thieleek@tick.informatik.uni-stuttgart.de         o `QQ'_
IRC:   erikyyy                                            /   __8
WWW:   http://wwwcip.rus.uni-stuttgart.de/~inf24628/      '  `
       http://tick.informatik.uni-stuttgart.de/~thieleek/


Reply to: