Bug 258 - powl problems
Summary: powl problems
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: math (show other bugs)
Version: 2.3.2
: P2 normal
Target Milestone: ---
Assignee: Andreas Jaeger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-08 12:55 UTC by Ronald Barrett
Modified: 2019-04-10 11:13 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ronald Barrett 2004-07-08 12:55:35 UTC
x.c:
#include <math.h>
#include <stdio.h>

int main(void){
 printf("inf = %Lg\n", powl(3.43646e+4928l, 3.43646e+4928l));
 printf("0 = %Lg\n", powl(10.0l, -1.1807237520575617777e+4932l));
 
 return 0;
}

gcc x.c -lm -o x && ./x
inf = nan
0 = nan
Comment 1 Petter Reinholdtsen 2004-07-23 09:30:44 UTC
I tried compiling this source on Solaris 8, but it fail to link because the
powl symbol is missing.  Not sure why.  There is no manual page, so I had a
look in the POSIX standard available on the web.  The powl() function is
documented there at
<URL: http://www.opengroup.org/onlinepubs/009695399/functions/pow.html >.

The code did compile and link on Tru64 Unix V5.1A, and gave this result:

% uname -a
OSF1 snape.uio.no V5.1 1885 alpha
% cc-wrapper x.c  -lm; ./a.out
inf = 1.18973e+4932
0 = 0
%
Comment 2 Jakub Jelinek 2004-07-23 13:38:06 UTC
Fixed in CVS on Jun, 19th.