40 changes: 40 additions & 0 deletions libc/src/math/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,46 @@ add_math_entrypoint_object(fminf)
add_math_entrypoint_object(fminl)
add_math_entrypoint_object(fminf128)

add_math_entrypoint_object(fmaximum)
add_math_entrypoint_object(fmaximumf)
add_math_entrypoint_object(fmaximuml)
add_math_entrypoint_object(fmaximumf128)

add_math_entrypoint_object(fmaximum_num)
add_math_entrypoint_object(fmaximum_numf)
add_math_entrypoint_object(fmaximum_numl)
add_math_entrypoint_object(fmaximum_numf128)

add_math_entrypoint_object(fmaximum_mag)
add_math_entrypoint_object(fmaximum_magf)
add_math_entrypoint_object(fmaximum_magl)
add_math_entrypoint_object(fmaximum_magf128)

add_math_entrypoint_object(fmaximum_mag_num)
add_math_entrypoint_object(fmaximum_mag_numf)
add_math_entrypoint_object(fmaximum_mag_numl)
add_math_entrypoint_object(fmaximum_mag_numf128)

add_math_entrypoint_object(fminimum)
add_math_entrypoint_object(fminimumf)
add_math_entrypoint_object(fminimuml)
add_math_entrypoint_object(fminimumf128)

add_math_entrypoint_object(fminimum_num)
add_math_entrypoint_object(fminimum_numf)
add_math_entrypoint_object(fminimum_numl)
add_math_entrypoint_object(fminimum_numf128)

add_math_entrypoint_object(fminimum_mag)
add_math_entrypoint_object(fminimum_magf)
add_math_entrypoint_object(fminimum_magl)
add_math_entrypoint_object(fminimum_magf128)

add_math_entrypoint_object(fminimum_mag_num)
add_math_entrypoint_object(fminimum_mag_numf)
add_math_entrypoint_object(fminimum_mag_numl)
add_math_entrypoint_object(fminimum_mag_numf128)

add_math_entrypoint_object(fmod)
add_math_entrypoint_object(fmodf)
add_math_entrypoint_object(fmodl)
Expand Down
19 changes: 19 additions & 0 deletions libc/src/math/fmaximum.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation header for fmaximum --------------------------*- C++
//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_FMAXIMUM_H
#define LLVM_LIBC_SRC_MATH_FMAXIMUM_H

namespace LIBC_NAMESPACE {

double fmaximum(double x, double y);

} // namespace LIBC_NAMESPACE

#endif // LLVM_LIBC_SRC_MATH_FMAXIMUM_H
19 changes: 19 additions & 0 deletions libc/src/math/fmaximum_mag.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation header for fmaximum_mag------------------------*- C++
//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_FMAXIMUM_MAG_H
#define LLVM_LIBC_SRC_MATH_FMAXIMUM_MAG_H

namespace LIBC_NAMESPACE {

double fmaximum_mag(double x, double y);

} // namespace LIBC_NAMESPACE

#endif // LLVM_LIBC_SRC_MATH_FMAXIMUM_MAG_H
18 changes: 18 additions & 0 deletions libc/src/math/fmaximum_mag_num.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//===-- Implementation header for fmaximum_mag_num---------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_FMAXIMUM_MAG_NUM_H
#define LLVM_LIBC_SRC_MATH_FMAXIMUM_MAG_NUM_H

namespace LIBC_NAMESPACE {

double fmaximum_mag_num(double x, double y);

} // namespace LIBC_NAMESPACE

#endif // LLVM_LIBC_SRC_MATH_FMAXIMUM_MAG_NUM_H
19 changes: 19 additions & 0 deletions libc/src/math/fmaximum_mag_numf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation header for fmaximum_mag_numf ----------------------*- C++
//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_FMAXIMUM_MAG_NUMF_H
#define LLVM_LIBC_SRC_MATH_FMAXIMUM_MAG_NUMF_H

namespace LIBC_NAMESPACE {

float fmaximum_mag_numf(float x, float y);

} // namespace LIBC_NAMESPACE

#endif // LLVM_LIBC_SRC_MATH_FMAXIMUM_MAG_NUMF_H
21 changes: 21 additions & 0 deletions libc/src/math/fmaximum_mag_numf128.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//===-- Implementation header for fmaximum_mag_numf128 -------------------*- C++
// -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_FMAXIMUM_MAG_NUMF128_H
#define LLVM_LIBC_SRC_MATH_FMAXIMUM_MAG_NUMF128_H

#include "src/__support/macros/properties/types.h"

namespace LIBC_NAMESPACE {

float128 fmaximum_mag_numf128(float128 x, float128 y);

} // namespace LIBC_NAMESPACE

#endif // LLVM_LIBC_SRC_MATH_FMAXIMUM_MAG_NUMF128_H
19 changes: 19 additions & 0 deletions libc/src/math/fmaximum_mag_numl.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation header for fmaximum_mag_numl ----------------------*- C++
//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_FMAXIMUM_MAG_NUML_H
#define LLVM_LIBC_SRC_MATH_FMAXIMUM_MAG_NUML_H

namespace LIBC_NAMESPACE {

long double fmaximum_mag_numl(long double x, long double y);

} // namespace LIBC_NAMESPACE

#endif // LLVM_LIBC_SRC_MATH_FMAXIMUM_MAG_NUML_H
19 changes: 19 additions & 0 deletions libc/src/math/fmaximum_magf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation header for fmaximum_magf -------------------------*- C++
//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_FMAXIMUM_MAGF_H
#define LLVM_LIBC_SRC_MATH_FMAXIMUM_MAGF_H

namespace LIBC_NAMESPACE {

float fmaximum_magf(float x, float y);

} // namespace LIBC_NAMESPACE

#endif // LLVM_LIBC_SRC_MATH_FMAXIMUM_MAGF_H
21 changes: 21 additions & 0 deletions libc/src/math/fmaximum_magf128.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//===-- Implementation header for fmaximum_magf128 ----------------------*- C++
//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_FMAXIMUM_MAGF128_H
#define LLVM_LIBC_SRC_MATH_FMAXIMUM_MAGF128_H

#include "src/__support/macros/properties/types.h"

namespace LIBC_NAMESPACE {

float128 fmaximum_magf128(float128 x, float128 y);

} // namespace LIBC_NAMESPACE

#endif // LLVM_LIBC_SRC_MATH_FMAXIMUM_MAGF128_H
19 changes: 19 additions & 0 deletions libc/src/math/fmaximum_magl.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation header for fmaximum_magl -------------------------*- C++
//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_FMAXIMUM_MAGL_H
#define LLVM_LIBC_SRC_MATH_FMAXIMUM_MAGL_H

namespace LIBC_NAMESPACE {

long double fmaximum_magl(long double x, long double y);

} // namespace LIBC_NAMESPACE

#endif // LLVM_LIBC_SRC_MATH_FMAXIMUM_MAGL_H
19 changes: 19 additions & 0 deletions libc/src/math/fmaximum_num.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation header for fmaximum_num--------------------------*- C++
//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_FMAXIMUM_NUM_H
#define LLVM_LIBC_SRC_MATH_FMAXIMUM_NUM_H

namespace LIBC_NAMESPACE {

double fmaximum_num(double x, double y);

} // namespace LIBC_NAMESPACE

#endif // LLVM_LIBC_SRC_MATH_FMAXIMUM_NUM_H
19 changes: 19 additions & 0 deletions libc/src/math/fmaximum_numf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation header for fmaximum_numf -------------------------*- C++
//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_FMAXIMUM_NUMF_H
#define LLVM_LIBC_SRC_MATH_FMAXIMUM_NUMF_H

namespace LIBC_NAMESPACE {

float fmaximum_numf(float x, float y);

} // namespace LIBC_NAMESPACE

#endif // LLVM_LIBC_SRC_MATH_FMAXIMUM_NUMF_H
21 changes: 21 additions & 0 deletions libc/src/math/fmaximum_numf128.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//===-- Implementation header for fmaximum_numf128 ----------------------*- C++
//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_FMAXIMUM_NUMF128_H
#define LLVM_LIBC_SRC_MATH_FMAXIMUM_NUMF128_H

#include "src/__support/macros/properties/types.h"

namespace LIBC_NAMESPACE {

float128 fmaximum_numf128(float128 x, float128 y);

} // namespace LIBC_NAMESPACE

#endif // LLVM_LIBC_SRC_MATH_FMAXIMUM_NUMF128_H
19 changes: 19 additions & 0 deletions libc/src/math/fmaximum_numl.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation header for fmaximum_numl -------------------------*- C++
//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_FMAXIMUM_NUML_H
#define LLVM_LIBC_SRC_MATH_FMAXIMUM_NUML_H

namespace LIBC_NAMESPACE {

long double fmaximum_numl(long double x, long double y);

} // namespace LIBC_NAMESPACE

#endif // LLVM_LIBC_SRC_MATH_FMAXIMUM_NUML_H
19 changes: 19 additions & 0 deletions libc/src/math/fmaximumf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation header for fmaximumf -------------------------*- C++
//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_FMAXIMUMF_H
#define LLVM_LIBC_SRC_MATH_FMAXIMUMF_H

namespace LIBC_NAMESPACE {

float fmaximumf(float x, float y);

} // namespace LIBC_NAMESPACE

#endif // LLVM_LIBC_SRC_MATH_FMAXIMUMF_H
21 changes: 21 additions & 0 deletions libc/src/math/fmaximumf128.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//===-- Implementation header for fmaximumf128 ----------------------*- C++
//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_FMAXIMUMF128_H
#define LLVM_LIBC_SRC_MATH_FMAXIMUMF128_H

#include "src/__support/macros/properties/types.h"

namespace LIBC_NAMESPACE {

float128 fmaximumf128(float128 x, float128 y);

} // namespace LIBC_NAMESPACE

#endif // LLVM_LIBC_SRC_MATH_FMAXIMUMF128_H
19 changes: 19 additions & 0 deletions libc/src/math/fmaximuml.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation header for fmaximuml -------------------------*- C++
//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_FMAXIMUML_H
#define LLVM_LIBC_SRC_MATH_FMAXIMUML_H

namespace LIBC_NAMESPACE {

long double fmaximuml(long double x, long double y);

} // namespace LIBC_NAMESPACE

#endif // LLVM_LIBC_SRC_MATH_FMAXIMUML_H
19 changes: 19 additions & 0 deletions libc/src/math/fminimum.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation header for fminimum -------------------------*- C++
//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_FMINIMUM_H
#define LLVM_LIBC_SRC_MATH_FMINIMUM_H

namespace LIBC_NAMESPACE {

double fminimum(double x, double y);

} // namespace LIBC_NAMESPACE

#endif // LLVM_LIBC_SRC_MATH_FMINIMUM_H
19 changes: 19 additions & 0 deletions libc/src/math/fminimum_mag.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation header for fminimum_mag--------------------------*- C++
//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_FMINIMUM_MAG_H
#define LLVM_LIBC_SRC_MATH_FMINIMUM_MAG_H

namespace LIBC_NAMESPACE {

double fminimum_mag(double x, double y);

} // namespace LIBC_NAMESPACE

#endif // LLVM_LIBC_SRC_MATH_FMINIMUM_MAG_H
19 changes: 19 additions & 0 deletions libc/src/math/fminimum_mag_num.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation header for fminimum_mag_num------------------------*- C++
//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_FMINIMUM_MAG_NUM_H
#define LLVM_LIBC_SRC_MATH_FMINIMUM_MAG_NUM_H

namespace LIBC_NAMESPACE {

double fminimum_mag_num(double x, double y);

} // namespace LIBC_NAMESPACE

#endif // LLVM_LIBC_SRC_MATH_FMINIMUM_MAG_NUMH
19 changes: 19 additions & 0 deletions libc/src/math/fminimum_mag_numf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation header for fminimum_mag_numf ----------------------*- C++
//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_FMINIMUM_MAG_NUMF_H
#define LLVM_LIBC_SRC_MATH_FMINIMUM_MAG_NUMF_H

namespace LIBC_NAMESPACE {

float fminimum_mag_numf(float x, float y);

} // namespace LIBC_NAMESPACE

#endif // LLVM_LIBC_SRC_MATH_FMINIMUM_MAG_NUMF_H
21 changes: 21 additions & 0 deletions libc/src/math/fminimum_mag_numf128.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//===-- Implementation header for fminimum_mag_numf128 -------------------*- C++
//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_FMINIMUM_MAG_NUMF128_H
#define LLVM_LIBC_SRC_MATH_FMINIMUM_MAG_NUMF128_H

#include "src/__support/macros/properties/types.h"

namespace LIBC_NAMESPACE {

float128 fminimum_mag_numf128(float128 x, float128 y);

} // namespace LIBC_NAMESPACE

#endif // LLVM_LIBC_SRC_MATH_FMINIMUM_MAG_NUMF128_H
19 changes: 19 additions & 0 deletions libc/src/math/fminimum_mag_numl.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation header for fminimum_mag_numl ----------------------*- C++
//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_FMINIMUM_MAG_NUML_H
#define LLVM_LIBC_SRC_MATH_FMINIMUM_MAG_NUML_H

namespace LIBC_NAMESPACE {

long double fminimum_mag_numl(long double x, long double y);

} // namespace LIBC_NAMESPACE

#endif // LLVM_LIBC_SRC_MATH_FMINIMUM_MAG_NUML_H
19 changes: 19 additions & 0 deletions libc/src/math/fminimum_magf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation header for fminimum_magf -------------------------*- C++
//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_FMINIMUM_MAGF_H
#define LLVM_LIBC_SRC_MATH_FMINIMUM_MAGF_H

namespace LIBC_NAMESPACE {

float fminimum_magf(float x, float y);

} // namespace LIBC_NAMESPACE

#endif // LLVM_LIBC_SRC_MATH_FMINIMUM_MAGF_H
21 changes: 21 additions & 0 deletions libc/src/math/fminimum_magf128.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//===-- Implementation header for fminimum_magf128 ----------------------*- C++
//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_FMINIMUM_MAGF128_H
#define LLVM_LIBC_SRC_MATH_FMINIMUM_MAGF128_H

#include "src/__support/macros/properties/types.h"

namespace LIBC_NAMESPACE {

float128 fminimum_magf128(float128 x, float128 y);

} // namespace LIBC_NAMESPACE

#endif // LLVM_LIBC_SRC_MATH_FMINIMUM_MAGF128_H
19 changes: 19 additions & 0 deletions libc/src/math/fminimum_magl.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation header for fminimum_magl -------------------------*- C++
//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_FMINIMUM_MAGL_H
#define LLVM_LIBC_SRC_MATH_FMINIMUM_MAGL_H

namespace LIBC_NAMESPACE {

long double fminimum_magl(long double x, long double y);

} // namespace LIBC_NAMESPACE

#endif // LLVM_LIBC_SRC_MATH_FMINIMUM_MAGL_H
19 changes: 19 additions & 0 deletions libc/src/math/fminimum_num.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation header for fminimum_num--------------------------*- C++
//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_FMINIMUM_NUM_H
#define LLVM_LIBC_SRC_MATH_FMINIMUM_NUM_H

namespace LIBC_NAMESPACE {

double fminimum_num(double x, double y);

} // namespace LIBC_NAMESPACE

#endif // LLVM_LIBC_SRC_MATH_FMINIMUM_NUM_H
19 changes: 19 additions & 0 deletions libc/src/math/fminimum_numf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation header for fminimum_numf -------------------------*- C++
//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_FMINIMUM_NUMF_H
#define LLVM_LIBC_SRC_MATH_FMINIMUM_NUMF_H

namespace LIBC_NAMESPACE {

float fminimum_numf(float x, float y);

} // namespace LIBC_NAMESPACE

#endif // LLVM_LIBC_SRC_MATH_FMINIMUM_NUMF_H
21 changes: 21 additions & 0 deletions libc/src/math/fminimum_numf128.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//===-- Implementation header for fminimum_numf128 ----------------------*- C++
//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_FMINIMUM_NUMF128_H
#define LLVM_LIBC_SRC_MATH_FMINIMUM_NUMF128_H

#include "src/__support/macros/properties/types.h"

namespace LIBC_NAMESPACE {

float128 fminimum_numf128(float128 x, float128 y);

} // namespace LIBC_NAMESPACE

#endif // LLVM_LIBC_SRC_MATH_FMINIMUM_NUMF128_H
19 changes: 19 additions & 0 deletions libc/src/math/fminimum_numl.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation header for fminimum_numl -------------------------*- C++
//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_FMINIMUM_NUML_H
#define LLVM_LIBC_SRC_MATH_FMINIMUM_NUML_H

namespace LIBC_NAMESPACE {

long double fminimum_numl(long double x, long double y);

} // namespace LIBC_NAMESPACE

#endif // LLVM_LIBC_SRC_MATH_FMINIMUM_NUML_H
19 changes: 19 additions & 0 deletions libc/src/math/fminimumf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation header for fminimumf -------------------------*- C++
//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_FMINIMUMF_H
#define LLVM_LIBC_SRC_MATH_FMINIMUMF_H

namespace LIBC_NAMESPACE {

float fminimumf(float x, float y);

} // namespace LIBC_NAMESPACE

#endif // LLVM_LIBC_SRC_MATH_FMINIMUMF_H
21 changes: 21 additions & 0 deletions libc/src/math/fminimumf128.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//===-- Implementation header for fminimumf128 ----------------------*- C++
//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_FMINIMUMF128_H
#define LLVM_LIBC_SRC_MATH_FMINIMUMF128_H

#include "src/__support/macros/properties/types.h"

namespace LIBC_NAMESPACE {

float128 fminimumf128(float128 x, float128 y);

} // namespace LIBC_NAMESPACE

#endif // LLVM_LIBC_SRC_MATH_FMINIMUMF128_H
19 changes: 19 additions & 0 deletions libc/src/math/fminimuml.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation header for fminimuml -------------------------*- C++
//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_FMINIMUML_H
#define LLVM_LIBC_SRC_MATH_FMINIMUML_H

namespace LIBC_NAMESPACE {

long double fminimuml(long double x, long double y);

} // namespace LIBC_NAMESPACE

#endif // LLVM_LIBC_SRC_MATH_FMINIMUML_H
395 changes: 395 additions & 0 deletions libc/src/math/generic/CMakeLists.txt

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions libc/src/math/generic/fmaximum.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation of fmaximum function--------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/math/fmaximum.h"
#include "src/__support/FPUtil/BasicOperations.h"
#include "src/__support/common.h"

namespace LIBC_NAMESPACE {

LLVM_LIBC_FUNCTION(double, fmaximum, (double x, double y)) {
return fputil::fmaximum(x, y);
}

} // namespace LIBC_NAMESPACE
19 changes: 19 additions & 0 deletions libc/src/math/generic/fmaximum_mag.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation of fmaximum_mag function----------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/math/fmaximum_mag.h"
#include "src/__support/FPUtil/BasicOperations.h"
#include "src/__support/common.h"

namespace LIBC_NAMESPACE {

LLVM_LIBC_FUNCTION(double, fmaximum_mag, (double x, double y)) {
return fputil::fmaximum_mag(x, y);
}

} // namespace LIBC_NAMESPACE
19 changes: 19 additions & 0 deletions libc/src/math/generic/fmaximum_mag_num.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation of fmaximum_mag_num function------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/math/fmaximum_mag_num.h"
#include "src/__support/FPUtil/BasicOperations.h"
#include "src/__support/common.h"

namespace LIBC_NAMESPACE {

LLVM_LIBC_FUNCTION(double, fmaximum_mag_num, (double x, double y)) {
return fputil::fmaximum_mag_num(x, y);
}

} // namespace LIBC_NAMESPACE
19 changes: 19 additions & 0 deletions libc/src/math/generic/fmaximum_mag_numf.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation of fmaximum_mag_numf function-----------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/math/fmaximum_mag_numf.h"
#include "src/__support/FPUtil/BasicOperations.h"
#include "src/__support/common.h"

namespace LIBC_NAMESPACE {

LLVM_LIBC_FUNCTION(float, fmaximum_mag_numf, (float x, float y)) {
return fputil::fmaximum_mag_num(x, y);
}

} // namespace LIBC_NAMESPACE
19 changes: 19 additions & 0 deletions libc/src/math/generic/fmaximum_mag_numf128.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation of fmaximum_mag_numf128 function--------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/math/fmaximum_mag_numf128.h"
#include "src/__support/FPUtil/BasicOperations.h"
#include "src/__support/common.h"

namespace LIBC_NAMESPACE {

LLVM_LIBC_FUNCTION(float128, fmaximum_mag_numf128, (float128 x, float128 y)) {
return fputil::fmaximum_mag_num(x, y);
}

} // namespace LIBC_NAMESPACE
20 changes: 20 additions & 0 deletions libc/src/math/generic/fmaximum_mag_numl.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//===-- Implementation of fmaximum_mag_numl function-----------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/math/fmaximum_mag_numl.h"
#include "src/__support/FPUtil/BasicOperations.h"
#include "src/__support/common.h"

namespace LIBC_NAMESPACE {

LLVM_LIBC_FUNCTION(long double, fmaximum_mag_numl,
(long double x, long double y)) {
return fputil::fmaximum_mag_num(x, y);
}

} // namespace LIBC_NAMESPACE
19 changes: 19 additions & 0 deletions libc/src/math/generic/fmaximum_magf.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation of fmaximum_magf function---------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/math/fmaximum_magf.h"
#include "src/__support/FPUtil/BasicOperations.h"
#include "src/__support/common.h"

namespace LIBC_NAMESPACE {

LLVM_LIBC_FUNCTION(float, fmaximum_magf, (float x, float y)) {
return fputil::fmaximum_mag(x, y);
}

} // namespace LIBC_NAMESPACE
19 changes: 19 additions & 0 deletions libc/src/math/generic/fmaximum_magf128.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation of fmaximum_magf128 function------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/math/fmaximum_magf128.h"
#include "src/__support/FPUtil/BasicOperations.h"
#include "src/__support/common.h"

namespace LIBC_NAMESPACE {

LLVM_LIBC_FUNCTION(float128, fmaximum_magf128, (float128 x, float128 y)) {
return fputil::fmaximum_mag(x, y);
}

} // namespace LIBC_NAMESPACE
19 changes: 19 additions & 0 deletions libc/src/math/generic/fmaximum_magl.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation of fmaximum_magl function---------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/math/fmaximum_magl.h"
#include "src/__support/FPUtil/BasicOperations.h"
#include "src/__support/common.h"

namespace LIBC_NAMESPACE {

LLVM_LIBC_FUNCTION(long double, fmaximum_magl, (long double x, long double y)) {
return fputil::fmaximum_mag(x, y);
}

} // namespace LIBC_NAMESPACE
19 changes: 19 additions & 0 deletions libc/src/math/generic/fmaximum_num.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation of fmaximum_num function----------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/math/fmaximum_num.h"
#include "src/__support/FPUtil/BasicOperations.h"
#include "src/__support/common.h"

namespace LIBC_NAMESPACE {

LLVM_LIBC_FUNCTION(double, fmaximum_num, (double x, double y)) {
return fputil::fmaximum_num(x, y);
}

} // namespace LIBC_NAMESPACE
19 changes: 19 additions & 0 deletions libc/src/math/generic/fmaximum_numf.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation of fmaximum_numf function---------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/math/fmaximum_numf.h"
#include "src/__support/FPUtil/BasicOperations.h"
#include "src/__support/common.h"

namespace LIBC_NAMESPACE {

LLVM_LIBC_FUNCTION(float, fmaximum_numf, (float x, float y)) {
return fputil::fmaximum_num(x, y);
}

} // namespace LIBC_NAMESPACE
19 changes: 19 additions & 0 deletions libc/src/math/generic/fmaximum_numf128.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation of fmaximum_numf128 function------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/math/fmaximum_numf128.h"
#include "src/__support/FPUtil/BasicOperations.h"
#include "src/__support/common.h"

namespace LIBC_NAMESPACE {

LLVM_LIBC_FUNCTION(float128, fmaximum_numf128, (float128 x, float128 y)) {
return fputil::fmaximum_num(x, y);
}

} // namespace LIBC_NAMESPACE
19 changes: 19 additions & 0 deletions libc/src/math/generic/fmaximum_numl.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation of fmaximum_numl function---------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/math/fmaximum_numl.h"
#include "src/__support/FPUtil/BasicOperations.h"
#include "src/__support/common.h"

namespace LIBC_NAMESPACE {

LLVM_LIBC_FUNCTION(long double, fmaximum_numl, (long double x, long double y)) {
return fputil::fmaximum_num(x, y);
}

} // namespace LIBC_NAMESPACE
19 changes: 19 additions & 0 deletions libc/src/math/generic/fmaximumf.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation of fmaximumf function-------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/math/fmaximumf.h"
#include "src/__support/FPUtil/BasicOperations.h"
#include "src/__support/common.h"

namespace LIBC_NAMESPACE {

LLVM_LIBC_FUNCTION(float, fmaximumf, (float x, float y)) {
return fputil::fmaximum(x, y);
}

} // namespace LIBC_NAMESPACE
19 changes: 19 additions & 0 deletions libc/src/math/generic/fmaximumf128.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation of fmaximumf128 function----------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/math/fmaximumf128.h"
#include "src/__support/FPUtil/BasicOperations.h"
#include "src/__support/common.h"

namespace LIBC_NAMESPACE {

LLVM_LIBC_FUNCTION(float128, fmaximumf128, (float128 x, float128 y)) {
return fputil::fmaximum(x, y);
}

} // namespace LIBC_NAMESPACE
19 changes: 19 additions & 0 deletions libc/src/math/generic/fmaximuml.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation of fmaximuml function-------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/math/fmaximuml.h"
#include "src/__support/FPUtil/BasicOperations.h"
#include "src/__support/common.h"

namespace LIBC_NAMESPACE {

LLVM_LIBC_FUNCTION(long double, fmaximuml, (long double x, long double y)) {
return fputil::fmaximum(x, y);
}

} // namespace LIBC_NAMESPACE
19 changes: 19 additions & 0 deletions libc/src/math/generic/fminimum.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation of fminimum function--------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/math/fminimum.h"
#include "src/__support/FPUtil/BasicOperations.h"
#include "src/__support/common.h"

namespace LIBC_NAMESPACE {

LLVM_LIBC_FUNCTION(double, fminimum, (double x, double y)) {
return fputil::fminimum(x, y);
}

} // namespace LIBC_NAMESPACE
19 changes: 19 additions & 0 deletions libc/src/math/generic/fminimum_mag.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation of fminimum_mag function----------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/math/fminimum_mag.h"
#include "src/__support/FPUtil/BasicOperations.h"
#include "src/__support/common.h"

namespace LIBC_NAMESPACE {

LLVM_LIBC_FUNCTION(double, fminimum_mag, (double x, double y)) {
return fputil::fminimum_mag(x, y);
}

} // namespace LIBC_NAMESPACE
19 changes: 19 additions & 0 deletions libc/src/math/generic/fminimum_mag_num.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation of fminimum_mag_num function------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/math/fminimum_mag_num.h"
#include "src/__support/FPUtil/BasicOperations.h"
#include "src/__support/common.h"

namespace LIBC_NAMESPACE {

LLVM_LIBC_FUNCTION(double, fminimum_mag_num, (double x, double y)) {
return fputil::fminimum_mag_num(x, y);
}

} // namespace LIBC_NAMESPACE
19 changes: 19 additions & 0 deletions libc/src/math/generic/fminimum_mag_numf.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation of fminimum_mag_numf function-----------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/math/fminimum_mag_numf.h"
#include "src/__support/FPUtil/BasicOperations.h"
#include "src/__support/common.h"

namespace LIBC_NAMESPACE {

LLVM_LIBC_FUNCTION(float, fminimum_mag_numf, (float x, float y)) {
return fputil::fminimum_mag_num(x, y);
}

} // namespace LIBC_NAMESPACE
19 changes: 19 additions & 0 deletions libc/src/math/generic/fminimum_mag_numf128.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation of fminimum_mag_numf128 function--------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/math/fminimum_mag_numf128.h"
#include "src/__support/FPUtil/BasicOperations.h"
#include "src/__support/common.h"

namespace LIBC_NAMESPACE {

LLVM_LIBC_FUNCTION(float128, fminimum_mag_numf128, (float128 x, float128 y)) {
return fputil::fminimum_mag_num(x, y);
}

} // namespace LIBC_NAMESPACE
20 changes: 20 additions & 0 deletions libc/src/math/generic/fminimum_mag_numl.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//===-- Implementation of fminimum_mag_numl function-----------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/math/fminimum_mag_numl.h"
#include "src/__support/FPUtil/BasicOperations.h"
#include "src/__support/common.h"

namespace LIBC_NAMESPACE {

LLVM_LIBC_FUNCTION(long double, fminimum_mag_numl,
(long double x, long double y)) {
return fputil::fminimum_mag_num(x, y);
}

} // namespace LIBC_NAMESPACE
19 changes: 19 additions & 0 deletions libc/src/math/generic/fminimum_magf.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation of fminimum_magf function---------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/math/fminimum_magf.h"
#include "src/__support/FPUtil/BasicOperations.h"
#include "src/__support/common.h"

namespace LIBC_NAMESPACE {

LLVM_LIBC_FUNCTION(float, fminimum_magf, (float x, float y)) {
return fputil::fminimum_mag(x, y);
}

} // namespace LIBC_NAMESPACE
19 changes: 19 additions & 0 deletions libc/src/math/generic/fminimum_magf128.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation of fminimum_magf128 function------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/math/fminimum_magf128.h"
#include "src/__support/FPUtil/BasicOperations.h"
#include "src/__support/common.h"

namespace LIBC_NAMESPACE {

LLVM_LIBC_FUNCTION(float128, fminimum_magf128, (float128 x, float128 y)) {
return fputil::fminimum_mag(x, y);
}

} // namespace LIBC_NAMESPACE
19 changes: 19 additions & 0 deletions libc/src/math/generic/fminimum_magl.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation of fminimum_magl function---------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/math/fminimum_magl.h"
#include "src/__support/FPUtil/BasicOperations.h"
#include "src/__support/common.h"

namespace LIBC_NAMESPACE {

LLVM_LIBC_FUNCTION(long double, fminimum_magl, (long double x, long double y)) {
return fputil::fminimum_mag(x, y);
}

} // namespace LIBC_NAMESPACE
19 changes: 19 additions & 0 deletions libc/src/math/generic/fminimum_num.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation of fminimum_num function----------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/math/fminimum_num.h"
#include "src/__support/FPUtil/BasicOperations.h"
#include "src/__support/common.h"

namespace LIBC_NAMESPACE {

LLVM_LIBC_FUNCTION(double, fminimum_num, (double x, double y)) {
return fputil::fminimum_num(x, y);
}

} // namespace LIBC_NAMESPACE
19 changes: 19 additions & 0 deletions libc/src/math/generic/fminimum_numf.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation of fminimum_numf function---------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/math/fminimum_numf.h"
#include "src/__support/FPUtil/BasicOperations.h"
#include "src/__support/common.h"

namespace LIBC_NAMESPACE {

LLVM_LIBC_FUNCTION(float, fminimum_numf, (float x, float y)) {
return fputil::fminimum_num(x, y);
}

} // namespace LIBC_NAMESPACE
19 changes: 19 additions & 0 deletions libc/src/math/generic/fminimum_numf128.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation of fminimum_numf128 function------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/math/fminimum_numf128.h"
#include "src/__support/FPUtil/BasicOperations.h"
#include "src/__support/common.h"

namespace LIBC_NAMESPACE {

LLVM_LIBC_FUNCTION(float128, fminimum_numf128, (float128 x, float128 y)) {
return fputil::fminimum_num(x, y);
}

} // namespace LIBC_NAMESPACE
19 changes: 19 additions & 0 deletions libc/src/math/generic/fminimum_numl.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation of fminimum_numl function---------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/math/fminimum_numl.h"
#include "src/__support/FPUtil/BasicOperations.h"
#include "src/__support/common.h"

namespace LIBC_NAMESPACE {

LLVM_LIBC_FUNCTION(long double, fminimum_numl, (long double x, long double y)) {
return fputil::fminimum_num(x, y);
}

} // namespace LIBC_NAMESPACE
19 changes: 19 additions & 0 deletions libc/src/math/generic/fminimumf.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation of fminimumf function-------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/math/fminimumf.h"
#include "src/__support/FPUtil/BasicOperations.h"
#include "src/__support/common.h"

namespace LIBC_NAMESPACE {

LLVM_LIBC_FUNCTION(float, fminimumf, (float x, float y)) {
return fputil::fminimum(x, y);
}

} // namespace LIBC_NAMESPACE
19 changes: 19 additions & 0 deletions libc/src/math/generic/fminimumf128.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation of fminimumf128 function----------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/math/fminimumf128.h"
#include "src/__support/FPUtil/BasicOperations.h"
#include "src/__support/common.h"

namespace LIBC_NAMESPACE {

LLVM_LIBC_FUNCTION(float128, fminimumf128, (float128 x, float128 y)) {
return fputil::fminimum(x, y);
}

} // namespace LIBC_NAMESPACE
19 changes: 19 additions & 0 deletions libc/src/math/generic/fminimuml.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Implementation of fminimuml function-------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/math/fminimuml.h"
#include "src/__support/FPUtil/BasicOperations.h"
#include "src/__support/common.h"

namespace LIBC_NAMESPACE {

LLVM_LIBC_FUNCTION(long double, fminimuml, (long double x, long double y)) {
return fputil::fminimum(x, y);
}

} // namespace LIBC_NAMESPACE
418 changes: 418 additions & 0 deletions libc/test/src/math/smoke/CMakeLists.txt

Large diffs are not rendered by default.

101 changes: 101 additions & 0 deletions libc/test/src/math/smoke/FMaximumMagNumTest.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
//===-- Utility class to test fmaximum_mag_num[f|l] -------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_TEST_SRC_MATH_SMOKE_FMAXIMUMMAG_NUMTEST_H
#define LLVM_LIBC_TEST_SRC_MATH_SMOKE_FMAXIMUMMAG_NUMTEST_H

#include "src/__support/FPUtil/BasicOperations.h"
#include "src/__support/FPUtil/FPBits.h"
#include "test/UnitTest/FPMatcher.h"
#include "test/UnitTest/Test.h"

template <typename T>
class FMaximumMagNumTest : public LIBC_NAMESPACE::testing::Test {

DECLARE_SPECIAL_CONSTANTS(T)

public:
typedef T (*FMaximumMagNumFunc)(T, T);

void testNaN(FMaximumMagNumFunc func) {
EXPECT_FP_EQ(inf, func(aNaN, inf));
EXPECT_FP_EQ_WITH_EXCEPTION(inf, func(sNaN, inf), FE_INVALID);
EXPECT_FP_EQ(neg_inf, func(neg_inf, aNaN));
EXPECT_FP_EQ_WITH_EXCEPTION(neg_inf, func(neg_inf, sNaN), FE_INVALID);
EXPECT_EQ(FPBits(aNaN).uintval(), FPBits(func(aNaN, aNaN)).uintval());
EXPECT_FP_EQ(0.0, func(aNaN, 0.0));
EXPECT_FP_EQ(-0.0, func(-0.0, aNaN));
EXPECT_FP_EQ_WITH_EXCEPTION(0.0, func(sNaN, 0.0), FE_INVALID);
EXPECT_FP_EQ_WITH_EXCEPTION(-0.0, func(-0.0, sNaN), FE_INVALID);
EXPECT_FP_EQ(T(-1.2345), func(aNaN, T(-1.2345)));
EXPECT_FP_EQ(T(1.2345), func(T(1.2345), aNaN));
EXPECT_FP_EQ_WITH_EXCEPTION(T(-1.2345), func(sNaN, T(-1.2345)), FE_INVALID);
EXPECT_FP_EQ_WITH_EXCEPTION(T(1.2345), func(T(1.2345), sNaN), FE_INVALID);
EXPECT_FP_IS_NAN_WITH_EXCEPTION(func(aNaN, sNaN), FE_INVALID);
EXPECT_FP_IS_NAN_WITH_EXCEPTION(func(sNaN, aNaN), FE_INVALID);
EXPECT_EQ(FPBits(aNaN).uintval(), FPBits(func(aNaN, sNaN)).uintval());
EXPECT_EQ(FPBits(aNaN).uintval(), FPBits(func(sNaN, aNaN)).uintval());
EXPECT_EQ(FPBits(aNaN).uintval(), FPBits(func(sNaN, sNaN)).uintval());
}

void testInfArg(FMaximumMagNumFunc func) {
EXPECT_FP_EQ(inf, func(neg_inf, inf));
EXPECT_FP_EQ(inf, func(inf, 0.0));
EXPECT_FP_EQ(inf, func(-0.0, inf));
EXPECT_FP_EQ(inf, func(inf, T(1.2345)));
EXPECT_FP_EQ(inf, func(T(-1.2345), inf));
}

void testNegInfArg(FMaximumMagNumFunc func) {
EXPECT_FP_EQ(inf, func(inf, neg_inf));
EXPECT_FP_EQ(neg_inf, func(neg_inf, 0.0));
EXPECT_FP_EQ(neg_inf, func(-0.0, neg_inf));
EXPECT_FP_EQ(neg_inf, func(neg_inf, T(-1.2345)));
EXPECT_FP_EQ(neg_inf, func(T(1.2345), neg_inf));
}

void testBothZero(FMaximumMagNumFunc func) {
EXPECT_FP_EQ(0.0, func(0.0, 0.0));
EXPECT_FP_EQ(0.0, func(-0.0, 0.0));
EXPECT_FP_EQ(0.0, func(0.0, -0.0));
EXPECT_FP_EQ(-0.0, func(-0.0, -0.0));
}

void testRange(FMaximumMagNumFunc func) {
constexpr StorageType COUNT = 100'001;
constexpr StorageType STEP = STORAGE_MAX / COUNT;
for (StorageType i = 0, v = 0, w = STORAGE_MAX; i <= COUNT;
++i, v += STEP, w -= STEP) {
FPBits xbits(v), ybits(w);
if (xbits.is_inf_or_nan())
continue;
if (ybits.is_inf_or_nan())
continue;
T x = xbits.get_val();
T y = ybits.get_val();
if ((x == 0) && (y == 0))
continue;

if (LIBC_NAMESPACE::fputil::abs(x) > LIBC_NAMESPACE::fputil::abs(y)) {
EXPECT_FP_EQ(x, func(x, y));
} else {
EXPECT_FP_EQ(y, func(x, y));
}
}
}
};

#define LIST_FMAXIMUM_MAG_NUM_TESTS(T, func) \
using LlvmLibcFMaximumMagNumTest = FMaximumMagNumTest<T>; \
TEST_F(LlvmLibcFMaximumMagNumTest, NaN) { testNaN(&func); } \
TEST_F(LlvmLibcFMaximumMagNumTest, InfArg) { testInfArg(&func); } \
TEST_F(LlvmLibcFMaximumMagNumTest, NegInfArg) { testNegInfArg(&func); } \
TEST_F(LlvmLibcFMaximumMagNumTest, BothZero) { testBothZero(&func); } \
TEST_F(LlvmLibcFMaximumMagNumTest, Range) { testRange(&func); }

#endif // LLVM_LIBC_TEST_SRC_MATH_SMOKE_FMAXIMUMMAG_NUMTEST_H
89 changes: 89 additions & 0 deletions libc/test/src/math/smoke/FMaximumMagTest.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
//===-- Utility class to test fmaximum_mag[f|l] -----------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_TEST_SRC_MATH_SMOKE_FMAXIMUM_MAGTEST_H
#define LLVM_LIBC_TEST_SRC_MATH_SMOKE_FMAXIMUM_MAGTEST_H

#include "src/__support/FPUtil/BasicOperations.h"
#include "test/UnitTest/FPMatcher.h"
#include "test/UnitTest/Test.h"

template <typename T>
class FMaximumMagTest : public LIBC_NAMESPACE::testing::Test {

DECLARE_SPECIAL_CONSTANTS(T)

public:
typedef T (*FMaximumMagFunc)(T, T);

void testNaN(FMaximumMagFunc func) {
EXPECT_FP_EQ(aNaN, func(aNaN, inf));
EXPECT_FP_EQ(aNaN, func(neg_inf, aNaN));
EXPECT_FP_EQ(aNaN, func(aNaN, 0.0));
EXPECT_FP_EQ(aNaN, func(-0.0, aNaN));
EXPECT_FP_EQ(aNaN, func(aNaN, T(-1.2345)));
EXPECT_FP_EQ(aNaN, func(T(1.2345), aNaN));
EXPECT_FP_EQ(aNaN, func(aNaN, aNaN));
}

void testInfArg(FMaximumMagFunc func) {
EXPECT_FP_EQ(inf, func(neg_inf, inf));
EXPECT_FP_EQ(inf, func(inf, 0.0));
EXPECT_FP_EQ(inf, func(-0.0, inf));
EXPECT_FP_EQ(inf, func(inf, T(1.2345)));
EXPECT_FP_EQ(inf, func(T(-1.2345), inf));
}

void testNegInfArg(FMaximumMagFunc func) {
EXPECT_FP_EQ(inf, func(inf, neg_inf));
EXPECT_FP_EQ(neg_inf, func(neg_inf, 0.0));
EXPECT_FP_EQ(neg_inf, func(-0.0, neg_inf));
EXPECT_FP_EQ(neg_inf, func(neg_inf, T(-1.2345)));
EXPECT_FP_EQ(neg_inf, func(T(1.2345), neg_inf));
}

void testBothZero(FMaximumMagFunc func) {
EXPECT_FP_EQ(0.0, func(0.0, 0.0));
EXPECT_FP_EQ(0.0, func(-0.0, 0.0));
EXPECT_FP_EQ(0.0, func(0.0, -0.0));
EXPECT_FP_EQ(-0.0, func(-0.0, -0.0));
}

void testRange(FMaximumMagFunc func) {
constexpr StorageType COUNT = 100'001;
constexpr StorageType STEP = STORAGE_MAX / COUNT;
for (StorageType i = 0, v = 0, w = STORAGE_MAX; i <= COUNT;
++i, v += STEP, w -= STEP) {
FPBits xbits(v), ybits(w);
if (xbits.is_inf_or_nan())
continue;
if (ybits.is_inf_or_nan())
continue;
T x = xbits.get_val();
T y = ybits.get_val();
if ((x == 0) && (y == 0))
continue;

if (LIBC_NAMESPACE::fputil::abs(x) > LIBC_NAMESPACE::fputil::abs(y)) {
EXPECT_FP_EQ(x, func(x, y));
} else {
EXPECT_FP_EQ(y, func(x, y));
}
}
}
};

#define LIST_FMAXIMUM_MAG_TESTS(T, func) \
using LlvmLibcFMaximumMagTest = FMaximumMagTest<T>; \
TEST_F(LlvmLibcFMaximumMagTest, NaN) { testNaN(&func); } \
TEST_F(LlvmLibcFMaximumMagTest, InfArg) { testInfArg(&func); } \
TEST_F(LlvmLibcFMaximumMagTest, NegInfArg) { testNegInfArg(&func); } \
TEST_F(LlvmLibcFMaximumMagTest, BothZero) { testBothZero(&func); } \
TEST_F(LlvmLibcFMaximumMagTest, Range) { testRange(&func); }

#endif // LLVM_LIBC_TEST_SRC_MATH_SMOKE_FMAXIMUM_MAGTEST_H
100 changes: 100 additions & 0 deletions libc/test/src/math/smoke/FMaximumNumTest.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
//===-- Utility class to test fmaximum_num[f|l] -----------------*- C++ -*-===//
//
// Part Of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_TEST_SRC_MATH_SMOKE_FMAXIMUMNUMTEST_H
#define LLVM_LIBC_TEST_SRC_MATH_SMOKE_FMAXIMUMNUMTEST_H

#include "src/__support/FPUtil/FPBits.h"
#include "test/UnitTest/FPMatcher.h"
#include "test/UnitTest/Test.h"

template <typename T>
class FMaximumNumTest : public LIBC_NAMESPACE::testing::Test {

DECLARE_SPECIAL_CONSTANTS(T)

public:
typedef T (*FMaximumNumFunc)(T, T);

void testNaN(FMaximumNumFunc func) {
EXPECT_FP_EQ(inf, func(aNaN, inf));
EXPECT_FP_EQ_WITH_EXCEPTION(inf, func(sNaN, inf), FE_INVALID);
EXPECT_FP_EQ(neg_inf, func(neg_inf, aNaN));
EXPECT_FP_EQ_WITH_EXCEPTION(neg_inf, func(neg_inf, sNaN), FE_INVALID);
EXPECT_EQ(FPBits(aNaN).uintval(), FPBits(func(aNaN, aNaN)).uintval());
EXPECT_FP_EQ(0.0, func(aNaN, 0.0));
EXPECT_FP_EQ(-0.0, func(-0.0, aNaN));
EXPECT_FP_EQ_WITH_EXCEPTION(0.0, func(sNaN, 0.0), FE_INVALID);
EXPECT_FP_EQ_WITH_EXCEPTION(-0.0, func(-0.0, sNaN), FE_INVALID);
EXPECT_FP_EQ(T(-1.2345), func(aNaN, T(-1.2345)));
EXPECT_FP_EQ(T(1.2345), func(T(1.2345), aNaN));
EXPECT_FP_EQ_WITH_EXCEPTION(T(-1.2345), func(sNaN, T(-1.2345)), FE_INVALID);
EXPECT_FP_EQ_WITH_EXCEPTION(T(1.2345), func(T(1.2345), sNaN), FE_INVALID);
EXPECT_FP_IS_NAN_WITH_EXCEPTION(func(aNaN, sNaN), FE_INVALID);
EXPECT_FP_IS_NAN_WITH_EXCEPTION(func(sNaN, aNaN), FE_INVALID);
EXPECT_EQ(FPBits(aNaN).uintval(), FPBits(func(aNaN, sNaN)).uintval());
EXPECT_EQ(FPBits(aNaN).uintval(), FPBits(func(sNaN, aNaN)).uintval());
EXPECT_EQ(FPBits(aNaN).uintval(), FPBits(func(sNaN, sNaN)).uintval());
}

void testInfArg(FMaximumNumFunc func) {
EXPECT_FP_EQ(inf, func(neg_inf, inf));
EXPECT_FP_EQ(inf, func(inf, 0.0));
EXPECT_FP_EQ(inf, func(-0.0, inf));
EXPECT_FP_EQ(inf, func(inf, T(1.2345)));
EXPECT_FP_EQ(inf, func(T(-1.2345), inf));
}

void testNegInfArg(FMaximumNumFunc func) {
EXPECT_FP_EQ(inf, func(inf, neg_inf));
EXPECT_FP_EQ(0.0, func(neg_inf, 0.0));
EXPECT_FP_EQ(-0.0, func(-0.0, neg_inf));
EXPECT_FP_EQ(T(-1.2345), func(neg_inf, T(-1.2345)));
EXPECT_FP_EQ(T(1.2345), func(T(1.2345), neg_inf));
}

void testBothZero(FMaximumNumFunc func) {
EXPECT_FP_EQ(0.0, func(0.0, 0.0));
EXPECT_FP_EQ(0.0, func(-0.0, 0.0));
EXPECT_FP_EQ(0.0, func(0.0, -0.0));
EXPECT_FP_EQ(-0.0, func(-0.0, -0.0));
}

void testRange(FMaximumNumFunc func) {
constexpr StorageType COUNT = 100'001;
constexpr StorageType STEP = STORAGE_MAX / COUNT;
for (StorageType i = 0, v = 0, w = STORAGE_MAX; i <= COUNT;
++i, v += STEP, w -= STEP) {
FPBits xbits(v), ybits(w);
if (xbits.is_inf_or_nan())
continue;
if (ybits.is_inf_or_nan())
continue;
T x = xbits.get_val();
T y = ybits.get_val();
if ((x == 0) && (y == 0))
continue;

if (x > y) {
EXPECT_FP_EQ(x, func(x, y));
} else {
EXPECT_FP_EQ(y, func(x, y));
}
}
}
};

#define LIST_FMAXIMUM_NUM_TESTS(T, func) \
using LlvmLibcFMaximumNumTest = FMaximumNumTest<T>; \
TEST_F(LlvmLibcFMaximumNumTest, NaN) { testNaN(&func); } \
TEST_F(LlvmLibcFMaximumNumTest, InfArg) { testInfArg(&func); } \
TEST_F(LlvmLibcFMaximumNumTest, NegInfArg) { testNegInfArg(&func); } \
TEST_F(LlvmLibcFMaximumNumTest, BothZero) { testBothZero(&func); } \
TEST_F(LlvmLibcFMaximumNumTest, Range) { testRange(&func); }

#endif // LLVM_LIBC_TEST_SRC_MATH_SMOKE_FMAXIMUMNUMTEST_H
88 changes: 88 additions & 0 deletions libc/test/src/math/smoke/FMaximumTest.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
//===-- Utility class to test fmaximum[f|l] ---------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_TEST_SRC_MATH_SMOKE_FMAXIMUMTEST_H
#define LLVM_LIBC_TEST_SRC_MATH_SMOKE_FMAXIMUMTEST_H

#include "test/UnitTest/FPMatcher.h"
#include "test/UnitTest/Test.h"

template <typename T>
class FMaximumTest : public LIBC_NAMESPACE::testing::Test {

DECLARE_SPECIAL_CONSTANTS(T)

public:
typedef T (*FMaximumFunc)(T, T);

void testNaN(FMaximumFunc func) {
EXPECT_FP_EQ(aNaN, func(aNaN, inf));
EXPECT_FP_EQ(aNaN, func(neg_inf, aNaN));
EXPECT_FP_EQ(aNaN, func(aNaN, 0.0));
EXPECT_FP_EQ(aNaN, func(-0.0, aNaN));
EXPECT_FP_EQ(aNaN, func(aNaN, T(-1.2345)));
EXPECT_FP_EQ(aNaN, func(T(1.2345), aNaN));
EXPECT_FP_EQ(aNaN, func(aNaN, aNaN));
}

void testInfArg(FMaximumFunc func) {
EXPECT_FP_EQ(inf, func(neg_inf, inf));
EXPECT_FP_EQ(inf, func(inf, 0.0));
EXPECT_FP_EQ(inf, func(-0.0, inf));
EXPECT_FP_EQ(inf, func(inf, T(1.2345)));
EXPECT_FP_EQ(inf, func(T(-1.2345), inf));
}

void testNegInfArg(FMaximumFunc func) {
EXPECT_FP_EQ(inf, func(inf, neg_inf));
EXPECT_FP_EQ(0.0, func(neg_inf, 0.0));
EXPECT_FP_EQ(-0.0, func(-0.0, neg_inf));
EXPECT_FP_EQ(T(-1.2345), func(neg_inf, T(-1.2345)));
EXPECT_FP_EQ(T(1.2345), func(T(1.2345), neg_inf));
}

void testBothZero(FMaximumFunc func) {
EXPECT_FP_EQ(0.0, func(0.0, 0.0));
EXPECT_FP_EQ(0.0, func(-0.0, 0.0));
EXPECT_FP_EQ(0.0, func(0.0, -0.0));
EXPECT_FP_EQ(-0.0, func(-0.0, -0.0));
}

void testRange(FMaximumFunc func) {
constexpr StorageType COUNT = 100'001;
constexpr StorageType STEP = STORAGE_MAX / COUNT;
for (StorageType i = 0, v = 0, w = STORAGE_MAX; i <= COUNT;
++i, v += STEP, w -= STEP) {
FPBits xbits(v), ybits(w);
if (xbits.is_inf_or_nan())
continue;
if (ybits.is_inf_or_nan())
continue;
T x = xbits.get_val();
T y = ybits.get_val();
if ((x == 0) && (y == 0))
continue;

if (x > y) {
EXPECT_FP_EQ(x, func(x, y));
} else {
EXPECT_FP_EQ(y, func(x, y));
}
}
}
};

#define LIST_FMAXIMUM_TESTS(T, func) \
using LlvmLibcFMaximumTest = FMaximumTest<T>; \
TEST_F(LlvmLibcFMaximumTest, NaN) { testNaN(&func); } \
TEST_F(LlvmLibcFMaximumTest, InfArg) { testInfArg(&func); } \
TEST_F(LlvmLibcFMaximumTest, NegInfArg) { testNegInfArg(&func); } \
TEST_F(LlvmLibcFMaximumTest, BothZero) { testBothZero(&func); } \
TEST_F(LlvmLibcFMaximumTest, Range) { testRange(&func); }

#endif // LLVM_LIBC_TEST_SRC_MATH_SMOKE_FMAXIMUMTEST_H
101 changes: 101 additions & 0 deletions libc/test/src/math/smoke/FMinimumMagNumTest.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
//===-- Utility class to test fminimum_mag_num[f|l] -------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_TEST_SRC_MATH_SMOKE_FMINIMUMMAG_NUMTEST_H
#define LLVM_LIBC_TEST_SRC_MATH_SMOKE_FMINIMUMMAG_NUMTEST_H

#include "src/__support/FPUtil/BasicOperations.h"
#include "src/__support/FPUtil/FPBits.h"
#include "test/UnitTest/FPMatcher.h"
#include "test/UnitTest/Test.h"

template <typename T>
class FMinimumMagNumTest : public LIBC_NAMESPACE::testing::Test {

DECLARE_SPECIAL_CONSTANTS(T)

public:
typedef T (*FMinimumMagNumFunc)(T, T);

void testNaN(FMinimumMagNumFunc func) {
EXPECT_FP_EQ(inf, func(aNaN, inf));
EXPECT_FP_EQ_WITH_EXCEPTION(inf, func(sNaN, inf), FE_INVALID);
EXPECT_FP_EQ(neg_inf, func(neg_inf, aNaN));
EXPECT_FP_EQ_WITH_EXCEPTION(neg_inf, func(neg_inf, sNaN), FE_INVALID);
EXPECT_EQ(FPBits(aNaN).uintval(), FPBits(func(aNaN, aNaN)).uintval());
EXPECT_FP_EQ(0.0, func(aNaN, 0.0));
EXPECT_FP_EQ(-0.0, func(-0.0, aNaN));
EXPECT_FP_EQ_WITH_EXCEPTION(0.0, func(sNaN, 0.0), FE_INVALID);
EXPECT_FP_EQ_WITH_EXCEPTION(-0.0, func(-0.0, sNaN), FE_INVALID);
EXPECT_FP_EQ(T(-1.2345), func(aNaN, T(-1.2345)));
EXPECT_FP_EQ(T(1.2345), func(T(1.2345), aNaN));
EXPECT_FP_EQ_WITH_EXCEPTION(T(-1.2345), func(sNaN, T(-1.2345)), FE_INVALID);
EXPECT_FP_EQ_WITH_EXCEPTION(T(1.2345), func(T(1.2345), sNaN), FE_INVALID);
EXPECT_FP_IS_NAN_WITH_EXCEPTION(func(aNaN, sNaN), FE_INVALID);
EXPECT_FP_IS_NAN_WITH_EXCEPTION(func(sNaN, aNaN), FE_INVALID);
EXPECT_EQ(FPBits(aNaN).uintval(), FPBits(func(aNaN, sNaN)).uintval());
EXPECT_EQ(FPBits(aNaN).uintval(), FPBits(func(sNaN, aNaN)).uintval());
EXPECT_EQ(FPBits(aNaN).uintval(), FPBits(func(sNaN, sNaN)).uintval());
}

void testInfArg(FMinimumMagNumFunc func) {
EXPECT_FP_EQ(neg_inf, func(neg_inf, inf));
EXPECT_FP_EQ(0.0, func(inf, 0.0));
EXPECT_FP_EQ(-0.0, func(-0.0, inf));
EXPECT_FP_EQ(T(1.2345), func(inf, T(1.2345)));
EXPECT_FP_EQ(T(-1.2345), func(T(-1.2345), inf));
}

void testNegInfArg(FMinimumMagNumFunc func) {
EXPECT_FP_EQ(neg_inf, func(inf, neg_inf));
EXPECT_FP_EQ(0.0, func(neg_inf, 0.0));
EXPECT_FP_EQ(-0.0, func(-0.0, neg_inf));
EXPECT_FP_EQ(T(-1.2345), func(neg_inf, T(-1.2345)));
EXPECT_FP_EQ(T(1.2345), func(T(1.2345), neg_inf));
}

void testBothZero(FMinimumMagNumFunc func) {
EXPECT_FP_EQ(0.0, func(0.0, 0.0));
EXPECT_FP_EQ(-0.0, func(-0.0, 0.0));
EXPECT_FP_EQ(-0.0, func(0.0, -0.0));
EXPECT_FP_EQ(-0.0, func(-0.0, -0.0));
}

void testRange(FMinimumMagNumFunc func) {
constexpr StorageType COUNT = 100'001;
constexpr StorageType STEP = STORAGE_MAX / COUNT;
for (StorageType i = 0, v = 0, w = STORAGE_MAX; i <= COUNT;
++i, v += STEP, w -= STEP) {
FPBits xbits(v), ybits(w);
if (xbits.is_inf_or_nan())
continue;
if (ybits.is_inf_or_nan())
continue;
T x = xbits.get_val();
T y = ybits.get_val();
if ((x == 0) && (y == 0))
continue;

if (LIBC_NAMESPACE::fputil::abs(x) > LIBC_NAMESPACE::fputil::abs(y)) {
EXPECT_FP_EQ(y, func(x, y));
} else {
EXPECT_FP_EQ(x, func(x, y));
}
}
}
};

#define LIST_FMINIMUM_MAG_NUM_TESTS(T, func) \
using LlvmLibcFMinimumMagNumTest = FMinimumMagNumTest<T>; \
TEST_F(LlvmLibcFMinimumMagNumTest, NaN) { testNaN(&func); } \
TEST_F(LlvmLibcFMinimumMagNumTest, InfArg) { testInfArg(&func); } \
TEST_F(LlvmLibcFMinimumMagNumTest, NegInfArg) { testNegInfArg(&func); } \
TEST_F(LlvmLibcFMinimumMagNumTest, BothZero) { testBothZero(&func); } \
TEST_F(LlvmLibcFMinimumMagNumTest, Range) { testRange(&func); }

#endif // LLVM_LIBC_TEST_SRC_MATH_SMOKE_FMINIMUMMAG_NUMTEST_H
89 changes: 89 additions & 0 deletions libc/test/src/math/smoke/FMinimumMagTest.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
//===-- Utility class to test fminimum_mag[f|l] -----------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_TEST_SRC_MATH_SMOKE_FMINIMUM_MAGTEST_H
#define LLVM_LIBC_TEST_SRC_MATH_SMOKE_FMINIMUM_MAGTEST_H

#include "src/__support/FPUtil/BasicOperations.h"
#include "test/UnitTest/FPMatcher.h"
#include "test/UnitTest/Test.h"

template <typename T>
class FMinimumMagTest : public LIBC_NAMESPACE::testing::Test {

DECLARE_SPECIAL_CONSTANTS(T)

public:
typedef T (*FMinimumMagFunc)(T, T);

void testNaN(FMinimumMagFunc func) {
EXPECT_FP_EQ(aNaN, func(aNaN, inf));
EXPECT_FP_EQ(aNaN, func(neg_inf, aNaN));
EXPECT_FP_EQ(aNaN, func(aNaN, 0.0));
EXPECT_FP_EQ(aNaN, func(-0.0, aNaN));
EXPECT_FP_EQ(aNaN, func(aNaN, T(-1.2345)));
EXPECT_FP_EQ(aNaN, func(T(1.2345), aNaN));
EXPECT_FP_EQ(aNaN, func(aNaN, aNaN));
}

void testInfArg(FMinimumMagFunc func) {
EXPECT_FP_EQ(neg_inf, func(neg_inf, inf));
EXPECT_FP_EQ(0.0, func(inf, 0.0));
EXPECT_FP_EQ(-0.0, func(-0.0, inf));
EXPECT_FP_EQ(T(1.2345), func(inf, T(1.2345)));
EXPECT_FP_EQ(T(-1.2345), func(T(-1.2345), inf));
}

void testNegInfArg(FMinimumMagFunc func) {
EXPECT_FP_EQ(neg_inf, func(inf, neg_inf));
EXPECT_FP_EQ(0.0, func(neg_inf, 0.0));
EXPECT_FP_EQ(-0.0, func(-0.0, neg_inf));
EXPECT_FP_EQ(T(-1.2345), func(neg_inf, T(-1.2345)));
EXPECT_FP_EQ(T(1.2345), func(T(1.2345), neg_inf));
}

void testBothZero(FMinimumMagFunc func) {
EXPECT_FP_EQ(0.0, func(0.0, 0.0));
EXPECT_FP_EQ(-0.0, func(-0.0, 0.0));
EXPECT_FP_EQ(-0.0, func(0.0, -0.0));
EXPECT_FP_EQ(-0.0, func(-0.0, -0.0));
}

void testRange(FMinimumMagFunc func) {
constexpr StorageType COUNT = 100'001;
constexpr StorageType STEP = STORAGE_MAX / COUNT;
for (StorageType i = 0, v = 0, w = STORAGE_MAX; i <= COUNT;
++i, v += STEP, w -= STEP) {
FPBits xbits(v), ybits(w);
if (xbits.is_inf_or_nan())
continue;
if (ybits.is_inf_or_nan())
continue;
T x = xbits.get_val();
T y = ybits.get_val();
if ((x == 0) && (y == 0))
continue;

if (LIBC_NAMESPACE::fputil::abs(x) < LIBC_NAMESPACE::fputil::abs(y)) {
EXPECT_FP_EQ(x, func(x, y));
} else {
EXPECT_FP_EQ(y, func(x, y));
}
}
}
};

#define LIST_FMINIMUM_MAG_TESTS(T, func) \
using LlvmLibcFMinimumMagTest = FMinimumMagTest<T>; \
TEST_F(LlvmLibcFMinimumMagTest, NaN) { testNaN(&func); } \
TEST_F(LlvmLibcFMinimumMagTest, InfArg) { testInfArg(&func); } \
TEST_F(LlvmLibcFMinimumMagTest, NegInfArg) { testNegInfArg(&func); } \
TEST_F(LlvmLibcFMinimumMagTest, BothZero) { testBothZero(&func); } \
TEST_F(LlvmLibcFMinimumMagTest, Range) { testRange(&func); }

#endif // LLVM_LIBC_TEST_SRC_MATH_SMOKE_FMINIMUM_MAGTEST_H
100 changes: 100 additions & 0 deletions libc/test/src/math/smoke/FMinimumNumTest.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
//===-- Utility class to test fminimum_num[f|l] -----------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_TEST_SRC_MATH_SMOKE_FMINIMUMNUMTEST_H
#define LLVM_LIBC_TEST_SRC_MATH_SMOKE_FMINIMUMNUMTEST_H

#include "src/__support/FPUtil/FPBits.h"
#include "test/UnitTest/FPMatcher.h"
#include "test/UnitTest/Test.h"

template <typename T>
class FMinimumNumTest : public LIBC_NAMESPACE::testing::Test {

DECLARE_SPECIAL_CONSTANTS(T)

public:
typedef T (*FMinimumNumFunc)(T, T);

void testNaN(FMinimumNumFunc func) {
EXPECT_FP_EQ(inf, func(aNaN, inf));
EXPECT_FP_EQ_WITH_EXCEPTION(inf, func(sNaN, inf), FE_INVALID);
EXPECT_FP_EQ(neg_inf, func(neg_inf, aNaN));
EXPECT_FP_EQ_WITH_EXCEPTION(neg_inf, func(neg_inf, sNaN), FE_INVALID);
EXPECT_EQ(FPBits(aNaN).uintval(), FPBits(func(aNaN, aNaN)).uintval());
EXPECT_FP_EQ(0.0, func(aNaN, 0.0));
EXPECT_FP_EQ(-0.0, func(-0.0, aNaN));
EXPECT_FP_EQ_WITH_EXCEPTION(0.0, func(sNaN, 0.0), FE_INVALID);
EXPECT_FP_EQ_WITH_EXCEPTION(-0.0, func(-0.0, sNaN), FE_INVALID);
EXPECT_FP_EQ(T(-1.2345), func(aNaN, T(-1.2345)));
EXPECT_FP_EQ(T(1.2345), func(T(1.2345), aNaN));
EXPECT_FP_EQ_WITH_EXCEPTION(T(-1.2345), func(sNaN, T(-1.2345)), FE_INVALID);
EXPECT_FP_EQ_WITH_EXCEPTION(T(1.2345), func(T(1.2345), sNaN), FE_INVALID);
EXPECT_FP_IS_NAN_WITH_EXCEPTION(func(aNaN, sNaN), FE_INVALID);
EXPECT_FP_IS_NAN_WITH_EXCEPTION(func(sNaN, aNaN), FE_INVALID);
EXPECT_EQ(FPBits(aNaN).uintval(), FPBits(func(aNaN, sNaN)).uintval());
EXPECT_EQ(FPBits(aNaN).uintval(), FPBits(func(sNaN, aNaN)).uintval());
EXPECT_EQ(FPBits(aNaN).uintval(), FPBits(func(sNaN, sNaN)).uintval());
}

void testInfArg(FMinimumNumFunc func) {
EXPECT_FP_EQ(neg_inf, func(neg_inf, inf));
EXPECT_FP_EQ(0.0, func(inf, 0.0));
EXPECT_FP_EQ(-0.0, func(-0.0, inf));
EXPECT_FP_EQ(T(1.2345), func(inf, T(1.2345)));
EXPECT_FP_EQ(T(-1.2345), func(T(-1.2345), inf));
}

void testNegInfArg(FMinimumNumFunc func) {
EXPECT_FP_EQ(neg_inf, func(inf, neg_inf));
EXPECT_FP_EQ(neg_inf, func(neg_inf, 0.0));
EXPECT_FP_EQ(neg_inf, func(-0.0, neg_inf));
EXPECT_FP_EQ(neg_inf, func(neg_inf, T(-1.2345)));
EXPECT_FP_EQ(neg_inf, func(T(1.2345), neg_inf));
}

void testBothZero(FMinimumNumFunc func) {
EXPECT_FP_EQ(0.0, func(0.0, 0.0));
EXPECT_FP_EQ(-0.0, func(-0.0, 0.0));
EXPECT_FP_EQ(-0.0, func(0.0, -0.0));
EXPECT_FP_EQ(-0.0, func(-0.0, -0.0));
}

void testRange(FMinimumNumFunc func) {
constexpr StorageType COUNT = 100'001;
constexpr StorageType STEP = STORAGE_MAX / COUNT;
for (StorageType i = 0, v = 0, w = STORAGE_MAX; i <= COUNT;
++i, v += STEP, w -= STEP) {
FPBits xbits(v), ybits(w);
if (xbits.is_inf_or_nan())
continue;
if (ybits.is_inf_or_nan())
continue;
T x = xbits.get_val();
T y = ybits.get_val();
if ((x == 0) && (y == 0))
continue;

if (x > y) {
EXPECT_FP_EQ(y, func(x, y));
} else {
EXPECT_FP_EQ(x, func(x, y));
}
}
}
};

#define LIST_FMINIMUM_NUM_TESTS(T, func) \
using LlvmLibcFMinimumNumTest = FMinimumNumTest<T>; \
TEST_F(LlvmLibcFMinimumNumTest, NaN) { testNaN(&func); } \
TEST_F(LlvmLibcFMinimumNumTest, InfArg) { testInfArg(&func); } \
TEST_F(LlvmLibcFMinimumNumTest, NegInfArg) { testNegInfArg(&func); } \
TEST_F(LlvmLibcFMinimumNumTest, BothZero) { testBothZero(&func); } \
TEST_F(LlvmLibcFMinimumNumTest, Range) { testRange(&func); }

#endif // LLVM_LIBC_TEST_SRC_MATH_SMOKE_FMINIMUMNUMTEST_H
88 changes: 88 additions & 0 deletions libc/test/src/math/smoke/FMinimumTest.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
//===-- Utility class to test fminimum[f|l] ---------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_TEST_SRC_MATH_SMOKE_FMINIMUMTEST_H
#define LLVM_LIBC_TEST_SRC_MATH_SMOKE_FMINIMUMTEST_H

#include "test/UnitTest/FPMatcher.h"
#include "test/UnitTest/Test.h"

template <typename T>
class FMinimumTest : public LIBC_NAMESPACE::testing::Test {

DECLARE_SPECIAL_CONSTANTS(T)

public:
typedef T (*FMinimumFunc)(T, T);

void testNaN(FMinimumFunc func) {
EXPECT_FP_EQ(aNaN, func(aNaN, inf));
EXPECT_FP_EQ(aNaN, func(neg_inf, aNaN));
EXPECT_FP_EQ(aNaN, func(aNaN, 0.0));
EXPECT_FP_EQ(aNaN, func(-0.0, aNaN));
EXPECT_FP_EQ(aNaN, func(aNaN, T(-1.2345)));
EXPECT_FP_EQ(aNaN, func(T(1.2345), aNaN));
EXPECT_FP_EQ(aNaN, func(aNaN, aNaN));
}

void testInfArg(FMinimumFunc func) {
EXPECT_FP_EQ(neg_inf, func(neg_inf, inf));
EXPECT_FP_EQ(0.0, func(inf, 0.0));
EXPECT_FP_EQ(-0.0, func(-0.0, inf));
EXPECT_FP_EQ(T(1.2345), func(inf, T(1.2345)));
EXPECT_FP_EQ(T(1.2345), func(T(1.2345), inf));
}

void testNegInfArg(FMinimumFunc func) {
EXPECT_FP_EQ(neg_inf, func(inf, neg_inf));
EXPECT_FP_EQ(neg_inf, func(neg_inf, 0.0));
EXPECT_FP_EQ(neg_inf, func(-0.0, neg_inf));
EXPECT_FP_EQ(neg_inf, func(neg_inf, T(-1.2345)));
EXPECT_FP_EQ(neg_inf, func(T(1.2345), neg_inf));
}

void testBothZero(FMinimumFunc func) {
EXPECT_FP_EQ(0.0, func(0.0, 0.0));
EXPECT_FP_EQ(-0.0, func(-0.0, 0.0));
EXPECT_FP_EQ(-0.0, func(0.0, -0.0));
EXPECT_FP_EQ(-0.0, func(-0.0, -0.0));
}

void testRange(FMinimumFunc func) {
constexpr StorageType COUNT = 100'001;
constexpr StorageType STEP = STORAGE_MAX / COUNT;
for (StorageType i = 0, v = 0, w = STORAGE_MAX; i <= COUNT;
++i, v += STEP, w -= STEP) {
FPBits xbits(v), ybits(w);
if (xbits.is_inf_or_nan())
continue;
if (ybits.is_inf_or_nan())
continue;
T x = xbits.get_val();
T y = ybits.get_val();
if ((x == 0) && (y == 0))
continue;

if (x > y) {
EXPECT_FP_EQ(y, func(x, y));
} else {
EXPECT_FP_EQ(x, func(x, y));
}
}
}
};

#define LIST_FMINIMUM_TESTS(T, func) \
using LlvmLibcFMinimumTest = FMinimumTest<T>; \
TEST_F(LlvmLibcFMinimumTest, NaN) { testNaN(&func); } \
TEST_F(LlvmLibcFMinimumTest, InfArg) { testInfArg(&func); } \
TEST_F(LlvmLibcFMinimumTest, NegInfArg) { testNegInfArg(&func); } \
TEST_F(LlvmLibcFMinimumTest, BothZero) { testBothZero(&func); } \
TEST_F(LlvmLibcFMinimumTest, Range) { testRange(&func); }

#endif // LLVM_LIBC_TEST_SRC_MATH_SMOKE_FMINIMUMTEST_H
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/fmaximum_mag_num_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for fmaximum_mag_num-------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------------------------------------------------===//

#include "FMaximumMagNumTest.h"

#include "src/math/fmaximum_mag_num.h"

LIST_FMAXIMUM_MAG_NUM_TESTS(double, LIBC_NAMESPACE::fmaximum_mag_num)
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/fmaximum_mag_numf128_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for fmaximum_mag_numf128---------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "FMaximumMagNumTest.h"

#include "src/math/fmaximum_mag_numf128.h"

LIST_FMAXIMUM_MAG_NUM_TESTS(float128, LIBC_NAMESPACE::fmaximum_mag_numf128)
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/fmaximum_mag_numf_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for fmaximum_mag_numf------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "FMaximumMagNumTest.h"

#include "src/math/fmaximum_mag_numf.h"

LIST_FMAXIMUM_MAG_NUM_TESTS(float, LIBC_NAMESPACE::fmaximum_mag_numf)
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/fmaximum_mag_numl_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for fmaximum_mag_numl------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "FMaximumMagNumTest.h"

#include "src/math/fmaximum_mag_numl.h"

LIST_FMAXIMUM_MAG_NUM_TESTS(long double, LIBC_NAMESPACE::fmaximum_mag_numl)
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/fmaximum_mag_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for fmaximum_mag-----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------------------------------------------------===//

#include "FMaximumMagTest.h"

#include "src/math/fmaximum_mag.h"

LIST_FMAXIMUM_MAG_TESTS(double, LIBC_NAMESPACE::fmaximum_mag)
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/fmaximum_magf128_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for fmaximum_magf128-------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "FMaximumMagTest.h"

#include "src/math/fmaximum_magf128.h"

LIST_FMAXIMUM_MAG_TESTS(float128, LIBC_NAMESPACE::fmaximum_magf128)
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/fmaximum_magf_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for fmaximum_magf----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "FMaximumMagTest.h"

#include "src/math/fmaximum_magf.h"

LIST_FMAXIMUM_MAG_TESTS(float, LIBC_NAMESPACE::fmaximum_magf)
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/fmaximum_magl_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for fmaximum_magl----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "FMaximumMagTest.h"

#include "src/math/fmaximum_magl.h"

LIST_FMAXIMUM_MAG_TESTS(long double, LIBC_NAMESPACE::fmaximum_magl)
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/fmaximum_num_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for fmaximum_num-----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------------------------------------------------===//

#include "FMaximumNumTest.h"

#include "src/math/fmaximum_num.h"

LIST_FMAXIMUM_NUM_TESTS(double, LIBC_NAMESPACE::fmaximum_num)
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/fmaximum_numf128_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for fmaximum_numf128-------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "FMaximumNumTest.h"

#include "src/math/fmaximum_numf128.h"

LIST_FMAXIMUM_NUM_TESTS(float128, LIBC_NAMESPACE::fmaximum_numf128)
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/fmaximum_numf_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for fmaximum_numf----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "FMaximumNumTest.h"

#include "src/math/fmaximum_numf.h"

LIST_FMAXIMUM_NUM_TESTS(float, LIBC_NAMESPACE::fmaximum_numf)
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/fmaximum_numl_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for fmaximum_numl----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "FMaximumNumTest.h"

#include "src/math/fmaximum_numl.h"

LIST_FMAXIMUM_NUM_TESTS(long double, LIBC_NAMESPACE::fmaximum_numl)
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/fmaximum_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for fmaximum---------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------------------------------------------------===//

#include "FMaximumTest.h"

#include "src/math/fmaximum.h"

LIST_FMAXIMUM_TESTS(double, LIBC_NAMESPACE::fmaximum)
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/fmaximumf128_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for fmaximumf128-----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "FMaximumTest.h"

#include "src/math/fmaximumf128.h"

LIST_FMAXIMUM_TESTS(float128, LIBC_NAMESPACE::fmaximumf128)
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/fmaximumf_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for fmaximumf--------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "FMaximumTest.h"

#include "src/math/fmaximumf.h"

LIST_FMAXIMUM_TESTS(float, LIBC_NAMESPACE::fmaximumf)
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/fmaximuml_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for fmaximuml--------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "FMaximumTest.h"

#include "src/math/fmaximuml.h"

LIST_FMAXIMUM_TESTS(long double, LIBC_NAMESPACE::fmaximuml)
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/fminimum_mag_num_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for fminimum_mag_num-------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------------------------------------------------===//

#include "FMinimumMagNumTest.h"

#include "src/math/fminimum_mag_num.h"

LIST_FMINIMUM_MAG_NUM_TESTS(double, LIBC_NAMESPACE::fminimum_mag_num)
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/fminimum_mag_numf128_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for fminimum_mag_numf128---------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "FMinimumMagNumTest.h"

#include "src/math/fminimum_mag_numf128.h"

LIST_FMINIMUM_MAG_NUM_TESTS(float128, LIBC_NAMESPACE::fminimum_mag_numf128)
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/fminimum_mag_numf_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for fminimum_mag_numf------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "FMinimumMagNumTest.h"

#include "src/math/fminimum_mag_numf.h"

LIST_FMINIMUM_MAG_NUM_TESTS(float, LIBC_NAMESPACE::fminimum_mag_numf)
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/fminimum_mag_numl_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for fminimum_mag_numl------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "FMinimumMagNumTest.h"

#include "src/math/fminimum_mag_numl.h"

LIST_FMINIMUM_MAG_NUM_TESTS(long double, LIBC_NAMESPACE::fminimum_mag_numl)
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/fminimum_mag_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for fminimum_mag-----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------------------------------------------------===//

#include "FMinimumMagTest.h"

#include "src/math/fminimum_mag.h"

LIST_FMINIMUM_MAG_TESTS(double, LIBC_NAMESPACE::fminimum_mag)
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/fminimum_magf128_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for fminimum_magf128-------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "FMinimumMagTest.h"

#include "src/math/fminimum_magf128.h"

LIST_FMINIMUM_MAG_TESTS(float128, LIBC_NAMESPACE::fminimum_magf128)
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/fminimum_magf_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for fminimum_magf----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "FMinimumMagTest.h"

#include "src/math/fminimum_magf.h"

LIST_FMINIMUM_MAG_TESTS(float, LIBC_NAMESPACE::fminimum_magf)
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/fminimum_magl_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for fminimum_magl----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "FMinimumMagTest.h"

#include "src/math/fminimum_magl.h"

LIST_FMINIMUM_MAG_TESTS(long double, LIBC_NAMESPACE::fminimum_magl)
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/fminimum_num_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for fminimum_num-----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------------------------------------------------===//

#include "FMinimumNumTest.h"

#include "src/math/fminimum_num.h"

LIST_FMINIMUM_NUM_TESTS(double, LIBC_NAMESPACE::fminimum_num)
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/fminimum_numf128_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for fminimum_numf128-------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "FMinimumNumTest.h"

#include "src/math/fminimum_numf128.h"

LIST_FMINIMUM_NUM_TESTS(float128, LIBC_NAMESPACE::fminimum_numf128)
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/fminimum_numf_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for fminimum_numf----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "FMinimumNumTest.h"

#include "src/math/fminimum_numf.h"

LIST_FMINIMUM_NUM_TESTS(float, LIBC_NAMESPACE::fminimum_numf)
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/fminimum_numl_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for fminimum_numl----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "FMinimumNumTest.h"

#include "src/math/fminimum_numl.h"

LIST_FMINIMUM_NUM_TESTS(long double, LIBC_NAMESPACE::fminimum_numl)
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/fminimum_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for fminimum---------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------------------------------------------------===//

#include "FMinimumTest.h"

#include "src/math/fminimum.h"

LIST_FMINIMUM_TESTS(double, LIBC_NAMESPACE::fminimum)
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/fminimumf128_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for fminimumf128-----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "FMinimumTest.h"

#include "src/math/fminimumf128.h"

LIST_FMINIMUM_TESTS(float128, LIBC_NAMESPACE::fminimumf128)
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/fminimumf_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for fminimumf--------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "FMinimumTest.h"

#include "src/math/fminimumf.h"

LIST_FMINIMUM_TESTS(float, LIBC_NAMESPACE::fminimumf)
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/fminimuml_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for fminimuml--------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "FMinimumTest.h"

#include "src/math/fminimuml.h"

LIST_FMINIMUM_TESTS(long double, LIBC_NAMESPACE::fminimuml)