*To*: Debian Users <debian-user@lists.debian.org>*Subject*: Re: sqrt C function*From*: Paul Scott <waterhorse@ultrasw.com>*Date*: Fri, 10 Aug 2001 19:27:39 -0700*Message-id*: <3B74981B.8070702@ultrasw.com>*References*: <e1.18d1d4c3.28a5ed27@aol.com>

R1nso13@aol.com wrote:

when i try to use the sqrt function in gcc 3.0, and the gcc that's standardwith 2.2r3 ( i forget the version) i get errors. here's some example code:#include <math.h> #include <stdio.h> double num; double num_root; int main () { num = 4; num_root = sqrt(num); return (0); }fails to compile. i've tried using double as well as float variables. i'msure this is due to poor coding, but i'm looked at the man page andlinuxdoc.org and cannot find any example implementations of sqrt(). I'mrunning i386 arch, and have math.h (as well as the complete gcc 3.0)installed.

I doubt if this is your problem but on most compilers: double num; num = 4;

num = 4.;

Paul Scott

**Follow-Ups**:**Re: sqrt C function***From:*Craig Dickson <crdic@yahoo.com>

**References**:**sqrt C function***From:*R1nso13@aol.com

- Prev by Date:
**Re: matrox g450 and dri** - Next by Date:
**Re: sqrt C function** - Previous by thread:
**sqrt C function** - Next by thread:
**Re: sqrt C function** - Index(es):