cMHN 1.2
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
fmod.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_CORE_VALUE_FUNCTIONS_FMOD_H
4#define pRC_CORE_VALUE_FUNCTIONS_FMOD_H
5
6#include <cmath>
7
11
12namespace pRC
13{
14 template<IsFloat TA, IsFloat TB>
15 static inline constexpr auto fmod(TA const &a, TB const &b)
16 {
17 return Float(std::fmod(a(), b()));
18 }
19
20 template<IsInteger TA, IsFloat TB>
21 static inline constexpr auto fmod(TA const &a, TB const &b)
22 {
23 return fmod(cast<Float<>>(a), b);
24 }
25
26 template<IsFloat TA, IsInteger TB>
27 static inline constexpr auto fmod(TA const &a, TB const &b)
28 {
29 return fmod(a, cast<Float<>>(b));
30 }
31
32 template<IsInteger TA, IsInteger TB>
33 static inline constexpr auto fmod(TA const &a, TB const &b)
34 {
35 return fmod(cast<Float<>>(a), cast<Float<>>(b));
36 }
37}
38#endif // pRC_CORE_VALUE_FUNCTIONS_FMOD_H
Definition cholesky.hpp:10
Float(Float< 16 >::Fundamental const) -> Float< 16 >
static constexpr auto cast(T const &a)
Definition cast.hpp:11
static constexpr auto fmod(XA &&a, XB &&b)
Definition fmod.hpp:15