xref: /freebsd/lib/msun/man/fmaximum_mag_num.3 (revision f62d826a6f5b9022b0cedfe22a698998ad9cb7f4)
1*f62d826aSJesús Blázquez.\" Copyright (c) 2004 David Schultz <das@FreeBSD.org>
2*f62d826aSJesús Blázquez.\" Copyright (c) 2026 Jesús Blázquez <jesuscblazquez@gmail.com>
3*f62d826aSJesús Blázquez.\" All rights reserved.
4*f62d826aSJesús Blázquez.\"
5*f62d826aSJesús Blázquez.\" Redistribution and use in source and binary forms, with or without
6*f62d826aSJesús Blázquez.\" modification, are permitted provided that the following conditions
7*f62d826aSJesús Blázquez.\" are met:
8*f62d826aSJesús Blázquez.\" 1. Redistributions of source code must retain the above copyright
9*f62d826aSJesús Blázquez.\"    notice, this list of conditions and the following disclaimer.
10*f62d826aSJesús Blázquez.\" 2. Redistributions in binary form must reproduce the above copyright
11*f62d826aSJesús Blázquez.\"    notice, this list of conditions and the following disclaimer in the
12*f62d826aSJesús Blázquez.\"    documentation and/or other materials provided with the distribution.
13*f62d826aSJesús Blázquez.\"
14*f62d826aSJesús Blázquez.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15*f62d826aSJesús Blázquez.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16*f62d826aSJesús Blázquez.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17*f62d826aSJesús Blázquez.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18*f62d826aSJesús Blázquez.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19*f62d826aSJesús Blázquez.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20*f62d826aSJesús Blázquez.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21*f62d826aSJesús Blázquez.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22*f62d826aSJesús Blázquez.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23*f62d826aSJesús Blázquez.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24*f62d826aSJesús Blázquez.\" SUCH DAMAGE.
25*f62d826aSJesús Blázquez.Dd April 3, 2026
26*f62d826aSJesús Blázquez.Dt FMAXIMUM_MAG_NUM 3
27*f62d826aSJesús Blázquez.Os
28*f62d826aSJesús Blázquez.Sh NAME
29*f62d826aSJesús Blázquez.Nm fmaximum_mag_num ,
30*f62d826aSJesús Blázquez.Nm fmaximum_mag_numf ,
31*f62d826aSJesús Blázquez.Nm fmaximum_mag_numl ,
32*f62d826aSJesús Blázquez.Nm fminimum_mag_num ,
33*f62d826aSJesús Blázquez.Nm fminimum_mag_numf ,
34*f62d826aSJesús Blázquez.Nm fminimum_mag_numl
35*f62d826aSJesús Blázquez.Nd floating-point maximum and minimum magnitude number functions
36*f62d826aSJesús Blázquez.Sh LIBRARY
37*f62d826aSJesús Blázquez.Lb libm
38*f62d826aSJesús Blázquez.Sh SYNOPSIS
39*f62d826aSJesús Blázquez.In math.h
40*f62d826aSJesús Blázquez.Ft double
41*f62d826aSJesús Blázquez.Fn fmaximum_mag_num "double x" "double y"
42*f62d826aSJesús Blázquez.Ft float
43*f62d826aSJesús Blázquez.Fn fmaximum_mag_numf "float x" "float y"
44*f62d826aSJesús Blázquez.Ft "long double"
45*f62d826aSJesús Blázquez.Fn fmaximum_mag_numl "long double x" "long double y"
46*f62d826aSJesús Blázquez.Ft double
47*f62d826aSJesús Blázquez.Fn fminimum_mag_num "double x" "double y"
48*f62d826aSJesús Blázquez.Ft float
49*f62d826aSJesús Blázquez.Fn fminimum_mag_numf "float x" "float y"
50*f62d826aSJesús Blázquez.Ft "long double"
51*f62d826aSJesús Blázquez.Fn fminimum_mag_numl "long double x" "long double y"
52*f62d826aSJesús Blázquez.Sh DESCRIPTION
53*f62d826aSJesús BlázquezThe
54*f62d826aSJesús Blázquez.Fn fmaximum_mag_num ,
55*f62d826aSJesús Blázquez.Fn fmaximum_mag_numf ,
56*f62d826aSJesús Blázquezand
57*f62d826aSJesús Blázquez.Fn fmaximum_mag_numl
58*f62d826aSJesús Blázquezfunctions determine the larger of the absolute values of
59*f62d826aSJesús Blázquez.Fa x
60*f62d826aSJesús Blázquezand
61*f62d826aSJesús Blázquez.Fa y ,
62*f62d826aSJesús Blázquezand return the argument with the larger absolute value,
63*f62d826aSJesús Blázquezpreferring a numeric value over an \*(Na.
64*f62d826aSJesús BlázquezIf one argument is a numeric value and the other is an \*(Na,
65*f62d826aSJesús Blázquezthe numeric value is returned.
66*f62d826aSJesús BlázquezIf the absolute values are equal, the behavior is equivalent to calling the corresponding
67*f62d826aSJesús Blázquez.Fn fmaximum_num
68*f62d826aSJesús Blázquezfunction on the arguments.
69*f62d826aSJesús Blázquez.Pp
70*f62d826aSJesús BlázquezLikewise, the
71*f62d826aSJesús Blázquez.Fn fminimum_mag_num ,
72*f62d826aSJesús Blázquez.Fn fminimum_mag_numf ,
73*f62d826aSJesús Blázquezand
74*f62d826aSJesús Blázquez.Fn fminimum_mag_numl
75*f62d826aSJesús Blázquezfunctions determine the smaller of the absolute values of
76*f62d826aSJesús Blázquez.Fa x
77*f62d826aSJesús Blázquezand
78*f62d826aSJesús Blázquez.Fa y ,
79*f62d826aSJesús Blázquezand return the argument with the smaller absolute value,
80*f62d826aSJesús Blázquezpreferring a numeric value over an \*(Na.
81*f62d826aSJesús BlázquezIf one argument is a numeric value and the other is an \*(Na,
82*f62d826aSJesús Blázquezthe numeric value is returned.
83*f62d826aSJesús BlázquezIf the absolute values are equal, the behavior is equivalent to calling the corresponding
84*f62d826aSJesús Blázquez.Fn fminimum_num
85*f62d826aSJesús Blázquezfunction on the arguments.
86*f62d826aSJesús Blázquez.Pp
87*f62d826aSJesús BlázquezIf both arguments are \*(Nas, a quiet \*(Na is returned.
88*f62d826aSJesús BlázquezIf either argument is a signaling \*(Na, an invalid exception is raised.
89*f62d826aSJesús BlázquezOtherwise, these routines do not raise any floating-point exceptions.
90*f62d826aSJesús Blázquez.Sh SEE ALSO
91*f62d826aSJesús Blázquez.Xr fmax 3 ,
92*f62d826aSJesús Blázquez.Xr fmaximum 3 ,
93*f62d826aSJesús Blázquez.Xr fmaximum_mag 3 ,
94*f62d826aSJesús Blázquez.Xr fmaximum_num 3 ,
95*f62d826aSJesús Blázquez.Xr math 3
96*f62d826aSJesús Blázquez.Sh STANDARDS
97*f62d826aSJesús BlázquezThe
98*f62d826aSJesús Blázquez.Fn fmaximum_mag_num ,
99*f62d826aSJesús Blázquez.Fn fmaximum_mag_numf ,
100*f62d826aSJesús Blázquez.Fn fmaximum_mag_numl ,
101*f62d826aSJesús Blázquez.Fn fminimum_mag_num ,
102*f62d826aSJesús Blázquez.Fn fminimum_mag_numf ,
103*f62d826aSJesús Blázquezand
104*f62d826aSJesús Blázquez.Fn fminimum_mag_numl
105*f62d826aSJesús Blázquezfunctions conform to
106*f62d826aSJesús Blázquez.St -isoC-2023 .
107*f62d826aSJesús Blázquez.Sh HISTORY
108*f62d826aSJesús BlázquezThese routines first appeared in
109*f62d826aSJesús Blázquez.Fx 16.0 ..\"
110