Re: max double

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 15 Dec 2006, Steve Siegfried wrote:

Mike - EMAIL IGNORED wrote:

On Fri, 15 Dec 2006 19:44:42 -0500, Mike - EMAIL IGNORED wrote:

How do I find the max double on my FC4?
Thanks,
Mike.

Mia culpa. I see that I did not clearly state my question.
What include file and macro should I use to get the max
double in a c++ program?

Thanks again,
Mike.



#include <math.h>

Don't need that one.

#include <float.h>

Do need that one, though #include <cfloat> is preferred for C++.

Also need <cstdio> or <stdio.h> for C-style i/o or <iostream> for C++ stream i/o.


then reference "LDBL_MAX"

DBL_MAX for doubles, LDBL_MAX for long doubles.

If you use C-style i/o, be careful about format specifiers for printf() when printing long doubles (or long anything).

--
		Matthew Saltzman

Clemson University Math Sciences
mjs AT clemson DOT edu
http://www.math.clemson.edu/~mjs


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux