Build-in sqrt()?
- From: "peng.xiaoyu@xxxxxxxxx" <peng.xiaoyu@xxxxxxxxx>
- Date: 26 Nov 2006 20:05:09 -0800
hello everyone,
why this c code can be compiled and linked without -lm?
#include<math.h>
#include<stdio.h>
int main()
{
printf("%f\n",sqrt(2.0));
return 0;
}
even NO sqrt symbol when i use nm to list symbols from the object file
someone can give me a hint? i'm using a gcc-4.1.2 with glibc2.4.1 under
linux
best regards
.
- Follow-Ups:
- Re: Build-in sqrt()?
- From: Richard Heathfield
- Re: Build-in sqrt()?
- From: Simon Biber
- Re: Build-in sqrt()?
- From: loic-dev
- Re: Build-in sqrt()?
- From: Jack Klein
- Re: Build-in sqrt()?
- From: Tim Prince
- Re: Build-in sqrt()?
- From: santosh
- Re: Build-in sqrt()?
- Prev by Date: Re: static memory allocation versus dynamic memory allocation
- Next by Date: Re: Writing an int to a file, not quite sure how buffers work.
- Previous by thread: inserion sort code
- Next by thread: Re: Build-in sqrt()?
- Index(es):
Relevant Pages
|
|