Skip site navigation (1)Skip section navigation (2)
Date:      17 Oct 2000 14:26:27 -0400
From:      Lowell Gilbert <lowell@world.std.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: max_normal
Message-ID:  <44lmvnjpd8.fsf@lowellg.ne.mediaone.net>
In-Reply-To: croner@salk.edu's message of "17 Oct 2000 17:35:57 %2B0200"
References:  <39EC719D.B2AE23C4@salk.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44lmvnjpd8.fsf>