From owner-freebsd-questions Tue Oct 17 11:26:38 2000 Delivered-To: freebsd-questions@freebsd.org Received: from be-well.ilk.org (lowellg.ne.mediaone.net [24.147.184.128]) by hub.freebsd.org (Postfix) with ESMTP id 5E63537B4E5 for ; Tue, 17 Oct 2000 11:26:34 -0700 (PDT) Received: (from lowell@localhost) by be-well.ilk.org (8.11.1/8.11.1) id e9HIQRr11570; Tue, 17 Oct 2000 14:26:27 -0400 (EDT) (envelope-from lowell) To: freebsd-questions@freebsd.org Subject: Re: max_normal References: <39EC719D.B2AE23C4@salk.edu> From: Lowell Gilbert Date: 17 Oct 2000 14:26:27 -0400 In-Reply-To: croner@salk.edu's message of "17 Oct 2000 17:35:57 +0200" Message-ID: <44lmvnjpd8.fsf@lowellg.ne.mediaone.net> Lines: 17 X-Mailer: Gnus v5.7/Emacs 20.7 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG croner@salk.edu (Lisa J. Croner) writes: > I am trying to rewrite a program (it runs on an > old SUN) to run on a freeBSD machine. The program > has a function called max_normal that doesn't appear > in our new math.h for freeBSD. Do you know what > max_normal does and how I might replace it? It gives the largest possible normalized floating-point value. It seems to be related to IEEE 754 handling of denormalized numbers, which isn't part of standard C, and doesn't seem to be treated in the math libraries for any Unix machines I can find at hand, including some Solaris boxes. If you can write your program to deal only with normalized values (i.e., normal mathlib 'doubles'), that's your best bet. In that case, you would probably (depending on exactly how your program abuses, um, handles precision) use DBL_MIN and DBL_MAX. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message