xref: /minix3/lib/libm/man/ieee_test.3 (revision 84d9c625bfea59e274550651111ae9edfdc40fbd)
12fe8fb19SBen Gras.\" Copyright (c) 1985, 1991 Regents of the University of California.
22fe8fb19SBen Gras.\" All rights reserved.
32fe8fb19SBen Gras.\"
42fe8fb19SBen Gras.\" Redistribution and use in source and binary forms, with or without
52fe8fb19SBen Gras.\" modification, are permitted provided that the following conditions
62fe8fb19SBen Gras.\" are met:
72fe8fb19SBen Gras.\" 1. Redistributions of source code must retain the above copyright
82fe8fb19SBen Gras.\"    notice, this list of conditions and the following disclaimer.
92fe8fb19SBen Gras.\" 2. Redistributions in binary form must reproduce the above copyright
102fe8fb19SBen Gras.\"    notice, this list of conditions and the following disclaimer in the
112fe8fb19SBen Gras.\"    documentation and/or other materials provided with the distribution.
122fe8fb19SBen Gras.\" 3. Neither the name of the University nor the names of its contributors
132fe8fb19SBen Gras.\"    may be used to endorse or promote products derived from this software
142fe8fb19SBen Gras.\"    without specific prior written permission.
152fe8fb19SBen Gras.\"
162fe8fb19SBen Gras.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
172fe8fb19SBen Gras.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
182fe8fb19SBen Gras.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
192fe8fb19SBen Gras.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
202fe8fb19SBen Gras.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
212fe8fb19SBen Gras.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
222fe8fb19SBen Gras.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
232fe8fb19SBen Gras.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
242fe8fb19SBen Gras.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
252fe8fb19SBen Gras.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
262fe8fb19SBen Gras.\" SUCH DAMAGE.
272fe8fb19SBen Gras.\"
282fe8fb19SBen Gras.\"     from: @(#)ieee.3	6.4 (Berkeley) 5/6/91
29*84d9c625SLionel Sambuc.\"	$NetBSD: ieee_test.3,v 1.12 2011/09/13 07:11:43 njoly Exp $
302fe8fb19SBen Gras.\"
31*84d9c625SLionel Sambuc.Dd August 3, 2011
322fe8fb19SBen Gras.Dt IEEE_TEST 3
332fe8fb19SBen Gras.Os
342fe8fb19SBen Gras.Sh NAME
352fe8fb19SBen Gras.Nm logb ,
362fe8fb19SBen Gras.Nm logbf ,
37*84d9c625SLionel Sambuc.Nm logbl ,
382fe8fb19SBen Gras.Nm scalb ,
392fe8fb19SBen Gras.Nm scalbf ,
402fe8fb19SBen Gras.Nm significand ,
412fe8fb19SBen Gras.Nm significandf
422fe8fb19SBen Gras.Nd IEEE test functions
432fe8fb19SBen Gras.Sh LIBRARY
442fe8fb19SBen Gras.Lb libm
452fe8fb19SBen Gras.Sh SYNOPSIS
462fe8fb19SBen Gras.In math.h
472fe8fb19SBen Gras.Ft double
482fe8fb19SBen Gras.Fn logb "double x"
492fe8fb19SBen Gras.Ft float
502fe8fb19SBen Gras.Fn logbf "float x"
51*84d9c625SLionel Sambuc.Ft long double
52*84d9c625SLionel Sambuc.Fn logbl "long double x"
532fe8fb19SBen Gras.Ft double
542fe8fb19SBen Gras.Fn scalb "double x" "double n"
552fe8fb19SBen Gras.Ft float
562fe8fb19SBen Gras.Fn scalbf "float x" "float n"
572fe8fb19SBen Gras.Ft double
582fe8fb19SBen Gras.Fn significand "double x"
592fe8fb19SBen Gras.Ft float
602fe8fb19SBen Gras.Fn significandf "float x"
612fe8fb19SBen Gras.Sh DESCRIPTION
622fe8fb19SBen GrasThese functions allow users to test conformance to
632fe8fb19SBen Gras.St -ieee754 .
642fe8fb19SBen GrasTheir use is not otherwise recommended.
652fe8fb19SBen Gras.Pp
662fe8fb19SBen Gras.Fn logb x
672fe8fb19SBen Grasreturns
682fe8fb19SBen Gras.Fa x Ns 's exponent
692fe8fb19SBen Gras.Fa n ,
702fe8fb19SBen Grasa signed integer converted to double\-precision floating\-point.
712fe8fb19SBen Gras.Fn logb \*(Pm\*(If
722fe8fb19SBen Gras= +\*(If;
732fe8fb19SBen Gras.Fn logb 0
742fe8fb19SBen Gras= -\*(If with a division by zero exception.
752fe8fb19SBen Gras.Pp
762fe8fb19SBen Gras.Fn scalbn x n
772fe8fb19SBen Grasreturns
782fe8fb19SBen Gras.Fa x Ns \(**(2** Ns Fa n )
792fe8fb19SBen Grascomputed by exponent manipulation.
802fe8fb19SBen Gras.Pp
812fe8fb19SBen Gras.Fn significand x
822fe8fb19SBen Grasreturns
832fe8fb19SBen Gras.Fa sig ,
842fe8fb19SBen Graswhere
852fe8fb19SBen Gras.Fa x
862fe8fb19SBen Gras:=
872fe8fb19SBen Gras.Fa sig No \(** 2** Ns Fa n
882fe8fb19SBen Graswith 1 \*[Le]
892fe8fb19SBen Gras.Fa sig
902fe8fb19SBen Gras\*[Lt] 2.
912fe8fb19SBen Gras.Fn significand x
922fe8fb19SBen Grasis not defined when
932fe8fb19SBen Gras.Fa x
942fe8fb19SBen Grasis 0, \*(Pm\*(If, or \*(Na.
952fe8fb19SBen Gras.Sh SEE ALSO
962fe8fb19SBen Gras.Xr math 3
972fe8fb19SBen Gras.Sh STANDARDS
982fe8fb19SBen Gras.St -ieee754
99