Submitter: Douglas Walls (US)
Submission Date: 2003-02-11
Reference Document: ISO/IEC WG14 N995
Version: 1.0 <! year-month-day hour:min:sec >
Subject: Does <math.h> define INT_MIN and INT_MAX?
<math.h> defines macros in terms of INT_MIN and INT_MAX. <math.h> defines functions returning the value of INT_MIN. It is unclear if inclusion of <math.h> defines INT_MIN and INT_MAX or also includes <limits.h>.
The description of <math.h> in C99 (section 7.12) says that the macros FP_ILOGB0 and FP_ILOGBNAN are defined in <math.h> with values, respectively INT_MIN or -INT_MAX and INT_MAX or INT_MIN, but never says that INT_MIN and INT_MAX are defined in <math.h>.
The synopsis of 22.214.171.124 The ilogb function says:
#include <math.h> int ilogb(double x); int ilogbf(float x); int ilogbl(long double x);The description of 126.96.36.199 The ilogb functions says "if x is infinite they compute the value INT_MAX;".
Does this mean that <math.h> includes <limits.h>?
Does this mean that <math.h> defines INT_MIN and INT_MAX?
Suggested Technical Corrigendum
Previous Defect Report < - > Next Defect Report