---
name: "fmaximum_mag_num"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/fmaximum_mag_num"
---

# fmaximum\_mag\_num(3)

floating-point maximum and minimum magnitude number functions

## NAME

**fmaximum\_mag\_num**, **fmaximum\_mag\_numf**, **fmaximum\_mag\_numl**, **fminimum\_mag\_num**, **fminimum\_mag\_numf**, **fminimum\_mag\_numl** – floating-point maximum and minimum magnitude number functions

## LIBRARY

Math Library (libm, -lm)

## SYNOPSIS

**#include \<math.h\>**

*double*\

**fmaximum\_mag\_num**(*double x*, *double y*);

*float*\

**fmaximum\_mag\_numf**(*float x*, *float y*);

*long double*\

**fmaximum\_mag\_numl**(*long double x*, *long double y*);

*double*\

**fminimum\_mag\_num**(*double x*, *double y*);

*float*\

**fminimum\_mag\_numf**(*float x*, *float y*);

*long double*\

**fminimum\_mag\_numl**(*long double x*, *long double y*);

## DESCRIPTION

The **fmaximum\_mag\_num**(), **fmaximum\_mag\_numf**(), and **fmaximum\_mag\_numl**() functions determine the larger of the absolute values of *x* and *y*, and return the argument with the larger absolute value, preferring a numeric value over an . If one argument is a numeric value and the other is an , the numeric value is returned. If the absolute values are equal, the behavior is equivalent to calling the corresponding **fmaximum\_num**() function on the arguments.

Likewise, the **fminimum\_mag\_num**(), **fminimum\_mag\_numf**(), and **fminimum\_mag\_numl**() functions determine the smaller of the absolute values of *x* and *y*, and return the argument with the smaller absolute value, preferring a numeric value over an . If one argument is a numeric value and the other is an , the numeric value is returned. If the absolute values are equal, the behavior is equivalent to calling the corresponding **fminimum\_num**() function on the arguments.

If both arguments are s, a quiet  is returned. If either argument is a signaling , an invalid exception is raised. Otherwise, these routines do not raise any floating-point exceptions.

## SEE ALSO

[fmax(3)](/fmax/3.md), [fmaximum(3)](/fmaximum/3.md), [fmaximum\_mag(3)](/fmaximum_mag/3.md), [fmaximum\_num(3)](/fmaximum_num/3.md), [math(3)](/math/3.md)

## STANDARDS

The **fmaximum\_mag\_num**(), **fmaximum\_mag\_numf**(), **fmaximum\_mag\_numl**(), **fminimum\_mag\_num**(), **fminimum\_mag\_numf**(), and **fminimum\_mag\_numl**() functions conform to ISO/IEC 9899:2024 (“ISO C23”).

## HISTORY

These routines first appeared in FreeBSD 16.0
