| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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) |
| 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) |
| 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) |
| 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) |
| 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) |
| 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) |
| 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) |
| 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) |
| 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) |
| 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) |
| 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) |
| 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) |
| 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) |
| 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) |
| 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) |
| 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) |
| 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) |
| 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) |
| 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) |
| 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) |
| 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) |
| 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) |
| 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) |
| 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) |
| 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) |
| 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) |
| 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) |
| 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) |
| 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) |
| 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) |
| 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) |
| 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) |