tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
ceil.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2// SPDX-FileCopyrightText: Copyright (C) 2021 Tobias Hienzsch
3
4#ifndef TETL_CMATH_CEIL_HPP
5#define TETL_CMATH_CEIL_HPP
6
7#include <etl/_3rd_party/gcem/gcem.hpp>
8#include <etl/_concepts/integral.hpp>
9
10namespace etl {
11
12/// \ingroup cmath
13/// @{
14
15/// Computes the smallest integer value not less than arg.
16/// \details https://en.cppreference.com/w/cpp/numeric/math/ceil
17[[nodiscard]] constexpr auto ceil(float arg) noexcept -> float
18{
19 return etl::detail::gcem::ceil(arg);
20}
21[[nodiscard]] constexpr auto ceilf(float arg) noexcept -> float
22{
23 return etl::detail::gcem::ceil(arg);
24}
25[[nodiscard]] constexpr auto ceil(double arg) noexcept -> double
26{
27 return etl::detail::gcem::ceil(arg);
28}
29[[nodiscard]] constexpr auto ceil(long double arg) noexcept -> long double
30{
31 return etl::detail::gcem::ceil(arg);
32}
33[[nodiscard]] constexpr auto ceill(long double arg) noexcept -> long double
34{
35 return etl::detail::gcem::ceil(arg);
36}
37[[nodiscard]] constexpr auto ceil(integral auto arg) noexcept -> double
38{
39 return etl::detail::gcem::ceil(double(arg));
40}
41
42/// @}
43
44} // namespace etl
45
46#endif // TETL_CMATH_CEIL_HPP
constexpr auto ceilf(float arg) noexcept -> float
Definition ceil.hpp:21
constexpr auto ceil(long double arg) noexcept -> long double
Definition ceil.hpp:29
constexpr auto ceil(float arg) noexcept -> float
Definition ceil.hpp:17
constexpr auto ceill(long double arg) noexcept -> long double
Definition ceil.hpp:33
constexpr auto ceil(double arg) noexcept -> double
Definition ceil.hpp:25
Definition adjacent_find.hpp:9