An Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227 Sample Translation of an XView Function to Pascal . . . . . . 229 Sample Program. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 Menu Demo Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231

11. Math Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233

Contents of the Math Libraries. . . . . . . . . . . . . . . . . . . . . . . . . . . 234 libm Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235 IEEE Support Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236 ieee_functions(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 ieee_values() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 ieee_retrospective() . . . . . . . . . . . . . . . . . . . . . . . . . . . 238 SPARC Libraries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238 Arithmetic Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 Math Library Exception-Handling Function: matherr() . . . . 240 libsunmath Support for IEEE Modes and Exceptions . . . . . . 242

Contents

xiii