From owner-freebsd-hackers Mon Mar 24 05:07:18 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id FAA06902 for hackers-outgoing; Mon, 24 Mar 1997 05:07:18 -0800 (PST) Received: from bort.mv.net (root@[192.80.84.6]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id FAA06897 for ; Mon, 24 Mar 1997 05:07:14 -0800 (PST) Received: from logrus.mv.com (logrus.mv.com [207.22.5.64]) by bort.mv.net (8.8.3/mem-951016) with SMTP id IAA08814 for ; Mon, 24 Mar 1997 08:07:11 -0500 (EST) Date: Mon, 24 Mar 1997 08:02:48 -0500 (EST) From: Obi Wan Oblivion To: freebsd-hackers@freebsd.org Subject: Problems with math.h Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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 #include 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