'\" te .\" Copyright (C) 1988 Sun Microsystems, Inc. - All Rights Reserved. .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH FLOATINGPOINT.H 3HEAD "Mar 5, 1993" .SH NAME floatingpoint.h, floatingpoint \- IEEE floating point definitions .SH SYNOPSIS .LP .nf #include .fi .SH DESCRIPTION .sp .LP This file defines constants, types, and functions used to implement standard floating point according to ANSI/IEEE Std 754-1985. The functions are implemented in \fBlibc\fR. The included header file <\fBsys/ieeefp.h\fR> defines certain types of interest to the kernel. .SS "IEEE Rounding Modes" .sp .ne 2 .na \fB\fBfp_direction_type\fR\fR .ad .RS 23n The type of the IEEE rounding direction mode. Note: the order of enumeration varies according to hardware. .RE .sp .ne 2 .na \fB\fBfp_precision_type\fR\fR .ad .RS 23n The type of the IEEE rounding precision mode, which only applies on systems that support extended precision such as machines based on the Intel 80387 FPU or the 80486. \fBSIGFPE\fR handling: .RE .sp .ne 2 .na \fB\fBsigfpe_code_type\fR\fR .ad .RS 23n The type of a \fBSIGFPE\fR code. .RE .sp .ne 2 .na \fB\fBsigfpe_handler_type\fR\fR .ad .RS 23n The type of a user-definable \fBSIGFPE\fR exception handler called to handle a particular \fBSIGFPE\fR code. .RE .sp .ne 2 .na \fB\fBSIGFPE_DEFAULT\fR \fR .ad .RS 23n A macro indicating the default \fBSIGFPE\fR exception handling, namely to perform the exception handling specified by the user, if any, and otherwise to dump core using \fBabort\fR(3C). .RE .sp .ne 2 .na \fB\fBSIGFPE_IGNORE\fR \fR .ad .RS 23n A macro indicating an alternate \fBSIGFPE\fR exception handling, namely to ignore and continue execution. .RE .sp .ne 2 .na \fB\fBSIGFPE_ABORT\fR \fR .ad .RS 23n A macro indicating an alternate \fBSIGFPE\fR exception handling, namely to abort with a core dump. .RE .SS "IEEE Exception Handling" .sp .ne 2 .na \fB\fBN_IEEE_EXCEPTION\fR \fR .ad .RS 27n The number of distinct IEEE floating-point exceptions. .RE .sp .ne 2 .na \fB\fBfp_exception_type\fR\fR .ad .RS 27n The type of the \fBN_IEEE_EXCEPTION\fR exceptions. Each exception is given a bit number. .RE .sp .ne 2 .na \fB\fBfp_exception_field_type\fR\fR .ad .RS 27n The type intended to hold at least \fBN_IEEE_EXCEPTION\fR bits corresponding to the IEEE exceptions numbered by \fBfp_exception_type\fR. Thus \fBfp_inexact\fR corresponds to the least significant bit and \fBfp_invalid\fR to the fifth least significant bit. Note: some operations may set more than one exception. .RE .SS "IEEE Formats and Classification" .sp .ne 2 .na \fB\fBsingle\fR;\|\fBextended\fR;\|\fBquadruple\fR\fR .ad .sp .6 .RS 4n Definitions of IEEE formats. .RE .sp .ne 2 .na \fB\fBfp_class_type\fR\fR .ad .sp .6 .RS 4n An enumeration of the various classes of IEEE values and symbols. .RE .SS "IEEE Base Conversion" .sp .LP The functions described under \fBfloating_to_decimal\fR(3C) and \fBdecimal_to_floating\fR(3C) satisfy not only the \fBIEEE\fR Standard, but also the stricter requirements of correct rounding for all arguments. .sp .ne 2 .na \fB\fBDECIMAL_STRING_LENGTH\fR \fR .ad .RS 26n The length of a \fBdecimal_string\fR. .RE .sp .ne 2 .na \fB\fBdecimal_string\fR\fR .ad .RS 26n The digit buffer in a \fBdecimal_record\fR. .RE .sp .ne 2 .na \fB\fBdecimal_record\fR\fR .ad .RS 26n The canonical form for representing an unpacked decimal floating-point number. .RE .sp .ne 2 .na \fB\fBdecimal_form\fR\fR .ad .RS 26n The type used to specify fixed or floating binary to decimal conversion. .RE .sp .ne 2 .na \fB\fBdecimal_mode\fR\fR .ad .RS 26n A struct that contains specifications for conversion between binary and decimal. .RE .sp .ne 2 .na \fB\fBdecimal_string_form\fR\fR .ad .RS 26n An enumeration of possible valid character strings representing floating-point numbers, infinities, or NaNs. .RE .SH FILES .sp .LP \fB/usr/include/sys/ieeefp.h\fR .SH SEE ALSO .sp .LP \fBabort\fR(3C), \fBdecimal_to_floating\fR(3C), \fBeconvert\fR(3C), \fBfloating_to_decimal\fR(3C), \fBsigfpe\fR(3C), \fBstring_to_decimal\fR(3C), \fBstrtod\fR(3C)