-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
561 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
//====================================================================================================================== | ||
/* | ||
Kyosu - Complex Without Complexes | ||
Copyright : KYOSU Contributors & Maintainers | ||
SPDX-License-Identifier: BSL-1.0 | ||
*/ | ||
//====================================================================================================================== | ||
#pragma once | ||
|
||
#include <kyosu/details/invoke.hpp> | ||
#include <eve/module/math.hpp> | ||
|
||
namespace kyosu::tags | ||
{ | ||
struct callable_csc : eve::elementwise | ||
{ | ||
using callable_tag_type = callable_csc; | ||
|
||
KYOSU_DEFERS_CALLABLE(csc_); | ||
|
||
template<eve::ordered_value T> | ||
static KYOSU_FORCEINLINE auto deferred_call(auto, T const& v) noexcept { return eve::csc(v); } | ||
|
||
template<typename T> | ||
KYOSU_FORCEINLINE auto operator()(T const& target) const noexcept -> decltype(eve::tag_invoke(*this, target)) | ||
{ | ||
return eve::tag_invoke(*this, target); | ||
} | ||
|
||
template<typename... T> | ||
eve::unsupported_call<callable_csc(T&&...)> operator()(T&&... x) const | ||
requires(!requires { eve::tag_invoke(*this, KYOSU_FWD(x)...); }) = delete; | ||
}; | ||
} | ||
|
||
namespace kyosu | ||
{ | ||
//====================================================================================================================== | ||
//! @addtogroup functions | ||
//! @{ | ||
//! @var csc | ||
//! @brief Computes the cosecant of the argument. | ||
//! | ||
//! **Defined in Header** | ||
//! | ||
//! @code | ||
//! #include <kyosu/functions.hpp> | ||
//! @endcode | ||
//! | ||
//! @groupheader{Callable Signatures} | ||
//! | ||
//! @code | ||
//! namespace kyosu | ||
//! { | ||
//! template<kyosu::concepts::cayley_dickson T> constexpr T csc(T z) noexcept; | ||
//! template<eve::ordered_value T> constexpr T csc(T z) noexcept; | ||
//! } | ||
//! @endcode | ||
//! | ||
//! **Parameters** | ||
//! | ||
//! * `z` : Value to process. | ||
//! | ||
//! **Return value** | ||
//! | ||
//! Returns the cosecant of the argument. | ||
//! | ||
//! @groupheader{Example} | ||
//! | ||
//! @godbolt{doc/csc.cpp} | ||
//! @} | ||
//====================================================================================================================== | ||
inline constexpr tags::callable_csc csc = {}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
//====================================================================================================================== | ||
/* | ||
Kyosu - Complex Without Complexes | ||
Copyright : KYOSU Contributors & Maintainers | ||
SPDX-License-Identifier: BSL-1.0 | ||
*/ | ||
//====================================================================================================================== | ||
#pragma once | ||
|
||
#include <kyosu/details/invoke.hpp> | ||
#include <eve/module/math.hpp> | ||
|
||
namespace kyosu::tags | ||
{ | ||
struct callable_csch : eve::elementwise | ||
{ | ||
using callable_tag_type = callable_csch; | ||
|
||
KYOSU_DEFERS_CALLABLE(csch_); | ||
|
||
template<eve::ordered_value T> | ||
static KYOSU_FORCEINLINE auto deferred_call(auto, T const& v) noexcept { return eve::csch(v); } | ||
|
||
template<typename T> | ||
KYOSU_FORCEINLINE auto operator()(T const& target) const noexcept -> decltype(eve::tag_invoke(*this, target)) | ||
{ | ||
return eve::tag_invoke(*this, target); | ||
} | ||
|
||
template<typename... T> | ||
eve::unsupported_call<callable_csch(T&&...)> operator()(T&&... x) const | ||
requires(!requires { eve::tag_invoke(*this, KYOSU_FWD(x)...); }) = delete; | ||
}; | ||
} | ||
|
||
namespace kyosu | ||
{ | ||
//====================================================================================================================== | ||
//! @addtogroup functions | ||
//! @{ | ||
//! @var csch | ||
//! @brief Computes the hyperbolic cscant of the argument. | ||
//! | ||
//! **Defined in Header** | ||
//! | ||
//! @code | ||
//! #include <kyosu/functions.hpp> | ||
//! @endcode | ||
//! | ||
//! @groupheader{Callable Signatures} | ||
//! | ||
//! @code | ||
//! namespace kyosu | ||
//! { | ||
//! template<kyosu::concepts::cayley_dickson T> constexpr T csch(T z) noexcept; | ||
//! template<eve::ordered_value T> constexpr T csch(T z) noexcept; | ||
//! } | ||
//! @endcode | ||
//! | ||
//! **Parameters** | ||
//! | ||
//! * `z` : Value to process. | ||
//! | ||
//! **Return value** | ||
//! | ||
//! Returns the hyperbolic cscant of the argument. | ||
//! | ||
//! @groupheader{Example} | ||
//! | ||
//! @godbolt{doc/csch.cpp} | ||
//! @} | ||
//====================================================================================================================== | ||
inline constexpr tags::callable_csch csch = {}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
//====================================================================================================================== | ||
/* | ||
Kyosu - Complex Without Complexes | ||
Copyright : KYOSU Contributors & Maintainers | ||
SPDX-License-Identifier: BSL-1.0 | ||
*/ | ||
//====================================================================================================================== | ||
#pragma once | ||
|
||
#include <kyosu/details/invoke.hpp> | ||
#include <eve/module/math.hpp> | ||
|
||
namespace kyosu::tags | ||
{ | ||
struct callable_sec : eve::elementwise | ||
{ | ||
using callable_tag_type = callable_sec; | ||
|
||
KYOSU_DEFERS_CALLABLE(sec_); | ||
|
||
template<eve::ordered_value T> | ||
static KYOSU_FORCEINLINE auto deferred_call(auto, T const& v) noexcept { return eve::sec(v); } | ||
|
||
template<typename T> | ||
KYOSU_FORCEINLINE auto operator()(T const& target) const noexcept -> decltype(eve::tag_invoke(*this, target)) | ||
{ | ||
return eve::tag_invoke(*this, target); | ||
} | ||
|
||
template<typename... T> | ||
eve::unsupported_call<callable_sec(T&&...)> operator()(T&&... x) const | ||
requires(!requires { eve::tag_invoke(*this, KYOSU_FWD(x)...); }) = delete; | ||
}; | ||
} | ||
|
||
namespace kyosu | ||
{ | ||
//====================================================================================================================== | ||
//! @addtogroup functions | ||
//! @{ | ||
//! @var sec | ||
//! @brief Computes the secant of the argument. | ||
//! | ||
//! **Defined in Header** | ||
//! | ||
//! @code | ||
//! #include <kyosu/functions.hpp> | ||
//! @endcode | ||
//! | ||
//! @groupheader{Callable Signatures} | ||
//! | ||
//! @code | ||
//! namespace kyosu | ||
//! { | ||
//! template<kyosu::concepts::cayley_dickson T> constexpr T sec(T z) noexcept; | ||
//! template<eve::ordered_value T> constexpr T sec(T z) noexcept; | ||
//! } | ||
//! @endcode | ||
//! | ||
//! **Parameters** | ||
//! | ||
//! * `z` : Value to process. | ||
//! | ||
//! **Return value** | ||
//! | ||
//! Returns the secant of the argument. | ||
//! | ||
//! @groupheader{Example} | ||
//! | ||
//! @godbolt{doc/sec.cpp} | ||
//! @} | ||
//====================================================================================================================== | ||
inline constexpr tags::callable_sec sec = {}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
//====================================================================================================================== | ||
/* | ||
Kyosu - Complex Without Complexes | ||
Copyright : KYOSU Contributors & Maintainers | ||
SPDX-License-Identifier: BSL-1.0 | ||
*/ | ||
//====================================================================================================================== | ||
#pragma once | ||
|
||
#include <kyosu/details/invoke.hpp> | ||
#include <eve/module/math.hpp> | ||
|
||
namespace kyosu::tags | ||
{ | ||
struct callable_sech : eve::elementwise | ||
{ | ||
using callable_tag_type = callable_sech; | ||
|
||
KYOSU_DEFERS_CALLABLE(sech_); | ||
|
||
template<eve::ordered_value T> | ||
static KYOSU_FORCEINLINE auto deferred_call(auto, T const& v) noexcept { return eve::sech(v); } | ||
|
||
template<typename T> | ||
KYOSU_FORCEINLINE auto operator()(T const& target) const noexcept -> decltype(eve::tag_invoke(*this, target)) | ||
{ | ||
return eve::tag_invoke(*this, target); | ||
} | ||
|
||
template<typename... T> | ||
eve::unsupported_call<callable_sech(T&&...)> operator()(T&&... x) const | ||
requires(!requires { eve::tag_invoke(*this, KYOSU_FWD(x)...); }) = delete; | ||
}; | ||
} | ||
|
||
namespace kyosu | ||
{ | ||
//====================================================================================================================== | ||
//! @addtogroup functions | ||
//! @{ | ||
//! @var sech | ||
//! @brief Computes the hyperbolic secant of the argument. | ||
//! | ||
//! **Defined in Header** | ||
//! | ||
//! @code | ||
//! #include <kyosu/functions.hpp> | ||
//! @endcode | ||
//! | ||
//! @groupheader{Callable Signatures} | ||
//! | ||
//! @code | ||
//! namespace kyosu | ||
//! { | ||
//! template<kyosu::concepts::cayley_dickson T> constexpr T sech(T z) noexcept; | ||
//! template<eve::ordered_value T> constexpr T sech(T z) noexcept; | ||
//! } | ||
//! @endcode | ||
//! | ||
//! **Parameters** | ||
//! | ||
//! * `z` : Value to process. | ||
//! | ||
//! **Return value** | ||
//! | ||
//! Returns the hyperbolic secant of the argument. | ||
//! | ||
//! @groupheader{Example} | ||
//! | ||
//! @godbolt{doc/sech.cpp} | ||
//! @} | ||
//====================================================================================================================== | ||
inline constexpr tags::callable_sech sech = {}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.