Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Release Notes for HP-UX 10.30: HP 9000 Computers > Chapter 7 Other Operating System and Subsystem Changes

fpclassify

» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

For 10.30:

The new fpclassify macro hides a declaration of the old fpclassify function. The declarations of the fpclassify and fpclassifyf functions are marked as obsolete, but are retained because the macro definitions use them. The macro and the function classify values according to different schemes. Code written to the old fpclassify interface could still be recompiled by undefining the fpclassify macro and including the old number classification macros:

 /* TO USE OLD fpclassify INTERFACE ... */
#include <math.h>
#undef fpclassify
#define FP_PLUS_NORM 0
#define FP_MINUS_NORM 1
#define FP_PLUS_ZERO 2
#define FP_MINUS_ZERO 3
#define FP_PLUS_INF 4
#define FP_MINUS_INF 5
#define FP_PLUS_DENORM 6
#define FP_MINUS_DENORM 7
#define FP_SNAN 8
#define FP_QNAN 9

Functions Converted To Macros

The inquiry macros isnan, isinf, isfinite, and isnormal have been added to <math.h>.

In previous releases, isnan and isinf were functions. isnan still is a function if XOPEN extensions are invoked and if HP extensions are not invoked. The declarations of the isnanf, isinf, and isinff functions are marked as "obsolete", but are retained because they are used in the definitions of the macros.

New Macros

The C9X macros NAN and INFINITY have been added to <math.h>.

Value of Existing Macro Changed

The HUGE_VAL macro in <math.h> has been changed from the largest finite double precision number to positive infinity.

Impact

If you use any of the listed obsoleted functions, you will have to change your code if you want to compile or link on the 10.30 release.

matherr() is a common function of those being obsoleted. Although it was eliminated in the 1989 revision of the System V Interface Definition, there could still be some old programs that rely on it. Because the 10.30 math library will never call matherr, some existing matherr routines can probably be left in place, with the understanding they will remain unused. If you need to know whether a math function had an argument error, you can either examine the value returned by the function to see if it is INF or NaN or check errno to see if it is non-zero.

Compatibility

Programs compiled and linked shared on previous releases of 10.X will continue to run with the pre-10.30 interface using libm.1. The interface changes take affect in libm.2. Shared executables newly-linked on 10.30 must use libm.2.

The change in the value of HUGE_VAL is visible in the math.h header and changes the binary interface (although not the API) of all the functions that are specified to return it. This includes the C library functions strtod and wcstod. You should not encounter any problems unless you both:

  • use the HUGE_VAL macro in their program text

  • you try to mix and match pre-10.30 object files with newly-compiled objects

Performance

The C math library changes in 10.30 are unlikely to change the performance of your executable. The 10.20 and 10.30 libraries should perform similarly.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1997, Hewlett-Packard Development Company, L.P.