Date: Mon, 24 Mar 1997 08:02:48 -0500 (EST) From: Obi Wan Oblivion <vdk@logrus.mv.com> To: freebsd-hackers@freebsd.org Subject: Problems with math.h Message-ID: <Pine.BSF.3.91.970324075510.307E-100000@logrus.mv.com>
next in thread | raw e-mail | index | archive | help
To Whom It May Concern: I am running 2.1.5 and cannot seem to get "sqrt" or "sqrtf" to work. A good example would be: #include <stdio.h> #include <math.h> main() { unsigned long int number,result; number = 64; result = (unsigned long int)sqrt((double)number); printf("The square root of %d is %d\n", number, result); return(0); } I build this with "cc -g -o" and get an "Undfined symbol _sqrt". Are these math functions not in the standard library, or am I doing something really bone-headed? Also, is typecasting appropriate in this case or will lint shut up and let me do the conversion? Thanks! -Jeff
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.970324075510.307E-100000>