HPlogo HP C/HP-UX Programmer's Guide: HP 9000 Computers > Chapter 6 Migrating C Programs to HP-UX

Floating-Point Format

» 

Technical documentation

Complete book in PDF

 » Table of Contents

The VAX floating-point representation is different from that on HP 9000 computers. You will have to change any programs dependent on the characteristics of VAX floating point. In particular, this difference could expose errors in the code that happen to work acceptably on the VAX. These errors include mismatched function return types (float on one side, double on the other), and passing the address of a double instead of a float to scanf. The VAX representation of a float differs in the number of bits in the exponent, as well as the mantissa. Therefore, mismatched types can cause a vastly different answer on HP 9000 computers.

© Hewlett-Packard Development Company, L.P.