Skip to content

Commit

Permalink
math core
Browse files Browse the repository at this point in the history
  • Loading branch information
jtlap committed Oct 10, 2023
1 parent e32a890 commit 79bcdc8
Show file tree
Hide file tree
Showing 84 changed files with 78 additions and 292 deletions.
2 changes: 1 addition & 1 deletion include/eve/module/core/regular/add.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace eve
//!
//! **Parameters**
//!
//! * `xs ...` : [real](@ref eve::value) or [complex](@ref eve::complex) arguments.
//! * `xs ...` : [real](@ref eve::value) arguments.
//!
//! **Return value**
//!
Expand Down
6 changes: 2 additions & 4 deletions include/eve/module/core/regular/all.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,14 @@ namespace eve
//! namespace eve
//! {
//! template< eve::value T >
//! bool all(eve::as_logical<T> x) noexcept; //1
//! bool all(eve::as_logical<T> x) noexcept;
//!
//! template< eve::top_bits M >
//! bool all(M m) noexcept; //2
//! }
//! @endcode
//!
//! 1. A bool value which is true if and only if all elements of `x` are not zero.
//! 2 A bool value which is true if and only if all top bits elements of `x` are not zero.
//!
//! * A bool value which is true if and only if all elements of `x` are not zero.
//! **Parameters**
//!
//! * `x` : [argument](@ref eve::logical_value).
Expand Down
2 changes: 1 addition & 1 deletion include/eve/module/core/regular/any.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace eve
//! namespace eve
//! {
//! template< eve::value T >
//! bool any(eve::as_logical<T> x) noexcept; //1
//! bool any(eve::as_logical<T> x) noexcept;
//!
//! template< eve::top_bits M >
//! bool any(M m) noexcept; //2
Expand Down
6 changes: 3 additions & 3 deletions include/eve/module/core/regular/average.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ namespace eve
//!
//! **Parameters**
//!
//! * `x`, `y`: [real](@ref eve::value) or [complex](@ref eve::complex) arguments.
//! * `x`, `y`: [real](@ref eve::value) arguments.
//!
//! * `xs...` : [real](@ref eve::floating_value) or [complex](@ref eve::complex) arguments.
//! * `xs...` : [real](@ref eve::floating_value) arguments.
//!
//! **Return value**
//!
Expand All @@ -50,7 +50,7 @@ namespace eve
//! @note
//! * For two parameters half the sum of `x` and `y`. No overflow occurs.
//!
//! * For more than two parameters only floating or complex entries are allowed. No overflow occurs.
//! * For more than two parameters only floating entries are allowed. No overflow occurs.
//!
//! * If `x` and `y` are [integral values](@ref eve::integral_value) and the sum is odd, the
//! result
Expand Down
2 changes: 1 addition & 1 deletion include/eve/module/core/regular/binarize.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace eve
//! namespace eve
//! {
//! template< eve::value C >
//! C binarize(eve::as_logical<C> c) noexcept; //1
//! C binarize(eve::as_logical<C> c) noexcept;
//! template< eve::value V, eve::logical_value C >
//! T binarize(C, c, T v = T(1)) noexcept; //2
//! }
Expand Down
2 changes: 1 addition & 1 deletion include/eve/module/core/regular/binarize_not.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace eve
//! namespace eve
//! {
//! template< eve::value C >
//! C binarize_not(eve::as_logical<C> c) noexcept; //1
//! C binarize_not(eve::as_logical<C> c) noexcept;
//!
//! template<eve::value C, eve::value V >
//! T binarize_not(eve::as_logical<C> c, T v) noexcept; //2
Expand Down
2 changes: 1 addition & 1 deletion include/eve/module/core/regular/bit_reverse.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace eve
//! namespace eve
//! {
//! template< eve::value T >
//! T bit_reverse(T x) noexcept; //1
//! T bit_reverse(T x) noexcept;
//!
//! template< unsignedvalue T, integral_scalar_value N>
//! T bit_reverse(T x , N n) noexcept; //2
Expand Down
3 changes: 1 addition & 2 deletions include/eve/module/core/regular/ceil.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace eve
//!
//! **Parameters**
//!
//! * `x` : [real](@ref eve::value) or [complex](@ref eve::complex) argument.
//! * `x` : [real](@ref eve::value) argument.
//!
//! **Return value**
//!
Expand All @@ -45,7 +45,6 @@ namespace eve
//! The standard proposes 4 rounding modes namely: `FE_TONEAREST`, `FE_DOWNWARD`, `FE_UPWARD`,
//! `FE_TOWARDZERO`. This function object implements the `FE_UPWARD` version.
//!
//! For complex inputs the ceil operation is applied to both real and imaginary parts.
//!
//! @groupheader{Example}
//!
Expand Down
2 changes: 1 addition & 1 deletion include/eve/module/core/regular/conj.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace eve
//!
//! **Parameters**
//!
//! * `z` : [real](@ref eve::value) or [complex](@ref eve::complex) argument.
//! * `z` : [real](@ref eve::value) argument.
//!
//! **Return value**
//!
Expand Down
28 changes: 14 additions & 14 deletions include/eve/module/core/regular/converter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ template<scalar_value T> using converter_type = decorated<convert_to_<T>()>;
//! namespace eve
//! {
//! template< eve::value T >
//! as_wide_as<T, float> float32(T x) noexcept; //1
//! as_wide_as<T, float> float32(T x) noexcept;
//!
//! template< eve::callable C >
//! as_wide_as<T, float> float32(C x) noexcept; //2
Expand Down Expand Up @@ -149,7 +149,7 @@ inline constexpr converter_type<float> const float32 = {};
//! namespace eve
//! {
//! template< eve::value T >
//! as_wide_as<T, double> float64(T x) noexcept; //1
//! as_wide_as<T, double> float64(T x) noexcept;
//!
//! template< eve::callable C >
//! as_wide_as<T, double> float64(C x) noexcept; //2
Expand Down Expand Up @@ -194,7 +194,7 @@ inline constexpr converter_type<double> const float64 = {};
//! namespace eve
//! {
//! template< eve::value T >
//! as_wide_as<T, std::uint8_t> uint8(T x) noexcept; //1
//! as_wide_as<T, std::uint8_t> uint8(T x) noexcept;
//!
//! template< eve::callable C >
//! as_wide_as<T, std::uint8_t> uint8(C x) noexcept; //2
Expand Down Expand Up @@ -240,7 +240,7 @@ inline constexpr converter_type<std::uint8_t> const uint8 = {};
//! namespace eve
//! {
//! template< eve::value T >
//! as_wide_as<T, std::uint16_t> uint16(T x) noexcept; //1
//! as_wide_as<T, std::uint16_t> uint16(T x) noexcept;
//!
//! template< eve::callable C >
//! as_wide_as<T, std::uint16_t> uint16(C x) noexcept; //2
Expand Down Expand Up @@ -286,7 +286,7 @@ inline constexpr converter_type<std::uint16_t> const uint16 = {};
//! namespace eve
//! {
//! template< eve::value T >
//! as_wide_as<T, std::uint32_t> uint32(T x) noexcept; //1
//! as_wide_as<T, std::uint32_t> uint32(T x) noexcept;
//!
//! template< eve::callable C >
//! as_wide_as<T, std::uint32_t> uint32(C x) noexcept; //2
Expand Down Expand Up @@ -332,7 +332,7 @@ inline constexpr converter_type<std::uint32_t> const uint32 = {};
//! namespace eve
//! {
//! template< eve::value T >
//! as_wide_as<T, std::uint64_t> uint64(T x) noexcept; //1
//! as_wide_as<T, std::uint64_t> uint64(T x) noexcept;
//!
//! template< eve::callable C >
//! as_wide_as<T, std::uint64_t> uint64(C x) noexcept; //2
Expand Down Expand Up @@ -378,7 +378,7 @@ inline constexpr converter_type<std::uint64_t> const uint64 = {};
//! namespace eve
//! {
//! template< eve::value T >
//! as_wide_as<T, std::int8_t> int8(T x) noexcept; //1
//! as_wide_as<T, std::int8_t> int8(T x) noexcept;
//!
//! template< eve::callable C >
//! as_wide_as<T, std::int8_t> int8(C x) noexcept; //2
Expand Down Expand Up @@ -424,7 +424,7 @@ inline constexpr converter_type<std::int8_t> const int8 = {};
//! namespace eve
//! {
//! template< eve::value T >
//! as_wide_as<T, std::int16_t> int16(T x) noexcept; //1
//! as_wide_as<T, std::int16_t> int16(T x) noexcept;
//!
//! template< eve::callable C >
//! as_wide_as<T, std::int16_t> int16(C x) noexcept; //2
Expand Down Expand Up @@ -470,7 +470,7 @@ inline constexpr converter_type<std::int16_t> const int16 = {};
//! namespace eve
//! {
//! template< eve::value T >
//! as_wide_as<T, std::int32_t> int32(T x) noexcept; //1
//! as_wide_as<T, std::int32_t> int32(T x) noexcept;
//!
//! template< eve::callable C >
//! as_wide_as<T, std::int32_t> int32(C x) noexcept; //2
Expand Down Expand Up @@ -516,7 +516,7 @@ inline constexpr converter_type<std::int32_t> const int32 = {};
//! namespace eve
//! {
//! template< eve::value T >
//! as_wide_as<T, std::int64_t> int64(T x) noexcept; //1
//! as_wide_as<T, std::int64_t> int64(T x) noexcept;
//!
//! template< eve::callable C >
//! as_wide_as<T, std::int64_t> int64(C x) noexcept; //2
Expand Down Expand Up @@ -566,7 +566,7 @@ using int_converter = decorated<convert_by_<as_integer>()>;
//! namespace eve
//! {
//! template< eve::value T >
//! as_wide_as<T, eve::as_integer_t<T>> int_(T x) noexcept; //1
//! as_wide_as<T, eve::as_integer_t<T>> int_(T x) noexcept;
//!
//! template< eve::callable C >
//! as_wide_as<T, , eve::as_integer_t<T>> int_(C x) noexcept; //2
Expand Down Expand Up @@ -615,7 +615,7 @@ using uint_converter = decorated<convert_by_<as_uinteger>()>;
//! namespace eve
//! {
//! template< eve::value T >
//! as_wide_as<T, eve::as_integer_t<T, unsigned>> uint_(T x) noexcept; //1
//! as_wide_as<T, eve::as_integer_t<T, unsigned>> uint_(T x) noexcept;
//!
//! template< eve::callable C >
//! as_wide_as<T, , eve::as_integer_t<T, unsigned>> uint_(C x) noexcept; //2
Expand Down Expand Up @@ -664,7 +664,7 @@ using floating_converter = decorated<convert_by_<as_floating_point>()>;
//! namespace eve
//! {
//! template< eve::value T >
//! as_wide_as<T, eve::as_floating_point_t<T>> floating_(T x) noexcept; //1
//! as_wide_as<T, eve::as_floating_point_t<T>> floating_(T x) noexcept;
//!
//! template< eve::callable C >
//! as_wide_as<T, , eve::as_floating_point_t<T>> floating_(C x) noexcept; //2
Expand Down Expand Up @@ -712,7 +712,7 @@ using upgrade_converter = decorated<convert_by_<detail::upgrade, false>()>;
//! namespace eve
//! {
//! template< eve::value T >
//! as_wide_as<T, eve::upgrade_t<T>> upgrade_(T x) noexcept; //1
//! as_wide_as<T, eve::upgrade_t<T>> upgrade_(T x) noexcept;
//!
//! template< eve::callable C >
//! as_wide_as<T, , eve::upgrade_t<T>> upgrade_(C x) noexcept; //2
Expand Down
2 changes: 1 addition & 1 deletion include/eve/module/core/regular/count_true.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace eve
//! namespace eve
//! {
//! template< eve::value T >
//! T count_true(T x) noexcept; //1
//! T count_true(T x) noexcept;
//! }
//! template< eve::top_bits M >
//! as_wide_as<unsigned, M> any(M m) noexcept; //2
Expand Down
2 changes: 1 addition & 1 deletion include/eve/module/core/regular/dec.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace eve
//!
//! **Parameters**
//!
//! * `x` : [real](@ref eve::value) or [complex](@ref eve::complex) argument.
//! * `x` : [real](@ref eve::value) argument.
//!
//! **Return value**
//!
Expand Down
2 changes: 1 addition & 1 deletion include/eve/module/core/regular/dist.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace eve
//!
//! **Parameters**
//!
//! * `x`, `y` : [real](@ref eve::value) or [complex](@ref eve::complex) arguments.
//! * `x`, `y` : [real](@ref eve::value) arguments.
//!
//! **Return value**
//!
Expand Down
2 changes: 1 addition & 1 deletion include/eve/module/core/regular/div.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace eve
//!
//! **Parameters**
//!
//! * `xs ...` : [real](@ref eve::value) or [complex](@ref eve::complex) arguments.
//! * `xs ...` : [real](@ref eve::value) arguments.
//!
//! **Return value**
//!
Expand Down
7 changes: 1 addition & 6 deletions include/eve/module/core/regular/dot.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,16 @@ namespace eve
//!
//! **Parameters**
//!
//! * `x`, `y` : [real or complex arguments](@ref eve::value).
//! * `x`, `y` : [real arguments](@ref eve::value).
//!
//! **Return value**
//!
//! dot product: real(x)*real(y)+imag(x)*imag(y). For real numbers it is just the product.
//!
//! @groupheader{Example}
//!
//! **Real version**
//!
//! @godbolt{doc/core/regular/dot.cpp}
//!
//! **Complex version**
//!
//! @godbolt{doc/complex/regular/dot.cpp}
//!
//! @}
//================================================================================================
Expand Down
2 changes: 1 addition & 1 deletion include/eve/module/core/regular/fam.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace eve
//!
//! **Parameters**
//!
//! * `x`, `y`, `z` : [real or complex arguments](@ref eve::value).
//! * `x`, `y`, `z` : [real arguments](@ref eve::value).
//!
//! **Return value**
//!
Expand Down
2 changes: 1 addition & 1 deletion include/eve/module/core/regular/fanm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace eve
//!
//! **Parameters**
//!
//! * `x`, `y`, `z` : [real or complex arguments](@ref eve::value).
//! * `x`, `y`, `z` : [real arguments](@ref eve::value).
//!
//! **Return value**
//!
Expand Down
3 changes: 1 addition & 2 deletions include/eve/module/core/regular/floor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace eve
//!
//! **Parameters**
//!
//! * `x` : [real](@ref eve::value) or [complex](@ref eve::complex) argument.
//! * `x` : [real](@ref eve::value) argument.
//!
//! **Return value**
//!
Expand All @@ -45,7 +45,6 @@ namespace eve
//! The standard proposes 4 rounding modes namely: `FE_TONEAREST`, `FE_DOWNWARD`, `FE_UPWARD`,
//! `FE_TOWARDZERO`. This function object implements the `FE_DOWNWARD` version.
//!
//! For complex inputs the floor operation is applied to both real and imaginary parts.
//!
//! @groupheader{Example}
//!
Expand Down
2 changes: 1 addition & 1 deletion include/eve/module/core/regular/fma.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace eve
//!
//! **Parameters**
//!
//! * `x`, `y`, `z` : [real or complex arguments](@ref eve::value).
//! * `x`, `y`, `z` : [real arguments](@ref eve::value).
//!
//! **Return value**
//!
Expand Down
2 changes: 1 addition & 1 deletion include/eve/module/core/regular/fms.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace eve
//!
//! **Parameters**
//!
//! * `x`, `y`, `z` : [real or complex arguments](@ref eve::value).
//! * `x`, `y`, `z` : [real arguments](@ref eve::value).
//!
//! **Return value**
//!
Expand Down
2 changes: 1 addition & 1 deletion include/eve/module/core/regular/fnma.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace eve
//!
//! **Parameters**
//!
//! * `x`, `y`, `z` : [real or complex arguments](@ref eve::value).
//! * `x`, `y`, `z` : [real arguments](@ref eve::value).
//!
//! **Return value**
//!
Expand Down
3 changes: 1 addition & 2 deletions include/eve/module/core/regular/frac.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace eve
//!
//! **Parameters**
//!
//! * `x` : [real](@ref eve::value) or [complex](@ref eve::complex) argument.
//! * `x` : [real](@ref eve::value) argument.
//!
//! **Return value**
//!
Expand All @@ -49,7 +49,6 @@ namespace eve
//! * If an [element](@ref glossary_elementwise) of `x` is \f$\pm\infty\f$ or `Nan`, a
//! `Nan` is returned.
//!
//! For complex inputs the frac operation is applied to both real and imaginary parts.
//!
//! @groupheader{Example}
//!
Expand Down
2 changes: 1 addition & 1 deletion include/eve/module/core/regular/fsm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace eve
//!
//! **Parameters**
//!
//! * `x`, `y`, `z` : [real or complex arguments](@ref eve::value).
//! * `x`, `y`, `z` : [real arguments](@ref eve::value).
//!
//! **Return value**
//!
Expand Down
2 changes: 1 addition & 1 deletion include/eve/module/core/regular/fsnm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace eve
//!
//! **Parameters**
//!
//! * `x`, `y`, `z` : [real or complex arguments](@ref eve::value).
//! * `x`, `y`, `z` : [real arguments](@ref eve::value).
//!
//! **Return value**
//!
Expand Down
Loading

0 comments on commit 79bcdc8

Please sign in to comment.