logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

fmax, fmaxf, fmaxl - determine maximum of two floating-point numbers

Attributes

       For an explanation of the terms used in this section, see attributes(7).
       ┌─────────────────────────────────────────────────────────────────────────────┬───────────────┬─────────┐
       │ InterfaceAttributeValue   │
       ├─────────────────────────────────────────────────────────────────────────────┼───────────────┼─────────┤
       │ fmax(), fmaxf(), fmaxl()                                                    │ Thread safety │ MT-Safe │
       └─────────────────────────────────────────────────────────────────────────────┴───────────────┴─────────┘

Description

       These functions return the larger value of x and y.

Errors

       No errors occur.

History

       glibc 2.1.  C99, POSIX.1-2001.

Library

       Math library (libm, -lm)

Name

       fmax, fmaxf, fmaxl - determine maximum of two floating-point numbers

Return Value

       These functions return the maximum of x and y.

       If one argument is a NaN, the other argument is returned.

       If both arguments are NaN, a NaN is returned.

See Also

fdim(3), fmin(3)

Linux man-pages 6.9.1                              2024-05-02                                            fmax(3)

Standards

       C11, POSIX.1-2008.

Synopsis

#include<math.h>doublefmax(doublex,doubley);floatfmaxf(floatx,floaty);longdoublefmaxl(longdoublex,longdoubley);

   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

       fmax(), fmaxf(), fmaxl():
           _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

See Also