Skip to content

Commit

Permalink
remaining functions
Browse files Browse the repository at this point in the history
  • Loading branch information
jtlap committed Sep 28, 2023
1 parent a0f85dd commit 950b220
Show file tree
Hide file tree
Showing 12 changed files with 57 additions and 30 deletions.
28 changes: 15 additions & 13 deletions doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,22 @@ Constructors

complex and quaternion can be constructed using callables facilities `complex` and `quaternion`.

complex can also be constructed from their polar representation
complex can also be constructed from their polar representation\n
quaternion from various parametrizations of \f$\mathbb{R}^4\f$ or from \f$\mathbb{R}^3\f$ rotations:

* angle and axis: from_angle_axis.hpp
* cylindrical: from_cylindrical
* cylindricospherical: from_cylindricospherical
* euler: from_eule
* multipolar: from_multipolar
* rotationmatrix: from_rotation_matrix
* semipolar: from_semipolar
* spherical: from_spherical
* two vectors: align

each of the from_xxx functions has a corresponding to_xxx version that gives back the
| | | |
|-------------------------|-----------------------------------------------------------------|-------------------------------------------------------------|
| angle and axis | [from_angle_axis](@ref kyosu::from_angle_axis ) | [to_angle_axis](@ref kyosu::to_angle_axis ) |
| cylindrical | [from_cylindrical](@ref kyosu::from_cylindrical ) | [to_cylindrical](@ref kyosu::to_cylindrical ) |
| cylindricospherical | [from_cylindrospherical](@ref kyosu::from_cylindrospherical ) | [to_cylindrospherical](@ref kyosu::to_cylindrospherical ) |
| euler | [from_euler](@ref kyosu::from_euler ) | [to_euler](@ref kyosu::to_euler ) |
| multipolar | [from_multipolar](@ref kyosu::from_multipolar ) | [to_multipolar](@ref kyosu::to_multipolar ) |
| rotation matrix | [from_rotation_matrix](@ref kyosu::from_rotation_matrix ) | [to_rotation_matrix](@ref kyosu::to_rotation_matrix ) |
| semipolar | [from_semipolar](@ref kyosu::from_semipolar ) | [to_semipolar](@ref kyosu::to_semipolar ) |
| spherical | [from_spherical](@ref kyosu::from_spherical ) | [to_spherical](@ref kyosu::to_spherical ) |
| two vectors | [align](@ref kyosu::align ) | |

The third column references to the corresponding to_xxx version that gives back the
chosen representation from a quaternion input.

TODO cayley_dickson<N> construction
Expand Down Expand Up @@ -158,7 +160,7 @@ complex functions and rotation related quaternion usage.
|------------------|------------------|--------------------|------------------|---------------|
| [beta](@ref kyosu::beta ) | [deta](@ref kyosu::deta ) | [digamma](@ref kyosu::digamma ) | [erf](@ref kyosu::erf ) | [erfcx](@ref kyosu::erfcx ) |
| [erfi](@ref kyosu::erfi ) | [eta](@ref kyosu::eta ) | [faddeeva](@ref kyosu::faddeeva ) | [lambda](@ref kyosu::lambda ) | [lbeta](@ref kyosu::lbeta ) |
| [log_abs_gamma](@ref kyosu::log_abs_gamma ) | [log_gamma](@ref kyosu::log_gamma ) | [lrising_factorial](@ref kyosu:lrising_factorial ) | [rising_factorial](@ref kyosu::rising_factorial ) | [tgamma](@ref kyosu::tgamma ) |
| [log_abs_gamma](@ref kyosu::log_abs_gamma ) | [log_gamma](@ref kyosu::log_gamma ) | [lrising_factorial](@ref kyosu::lrising_factorial ) | [rising_factorial](@ref kyosu::rising_factorial ) | [tgamma](@ref kyosu::tgamma ) |
| [zeta](@ref kyosu::zeta ) | | | | |

* callables usable with quaternion complex and real only
Expand Down
2 changes: 1 addition & 1 deletion include/kyosu/complex/lrising_factorial.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ namespace kyosu
//!
//! **Return value**
//!
//! @brief Computes the Rising Factorial function i.e. \f$\log\frac{\Gamma(x+y)}{\Gamma(x)}\f$.
//! @brief Computes the logarithm Rising Factorial function i.e. \f$\log\frac{\Gamma(x+y)}{\Gamma(x)}\f$.
//!
//! @groupheader{Example}
//!
Expand Down
2 changes: 1 addition & 1 deletion include/kyosu/complex/tgamma.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ namespace kyosu
//!
//! **Return value**
//!
//! Returns \f$\Gamma(z)\f$. If z is floating the result is as if complex(z) was used in the call.
//! Returns \f$\Gamma(z)\f$.
//!
//! @groupheader{Example}
//!
Expand Down
9 changes: 4 additions & 5 deletions include/kyosu/complex/zeta.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace kyosu
//! @addtogroup functions
//! @{
//! @var zeta
//! @brief Computes the Riemann \f$\zeta\f$ \f$ \displaystyle \sum_0^\infty \frac{1}{(n+1)^z}\f$.
//! @brief Computes the Riemann \f$ \displaystyle\zeta(z)=\sum_0^\infty \frac{1}{(n+1)^z}\f$.
//!
//! **Defined in Header**
//!
Expand All @@ -56,19 +56,18 @@ namespace kyosu
//! @code
//! namespace kyosu
//! {
//! template<unsigned_scalar_value K, eve::ordered_value T> constexpr auto zeta(K, k, T z) noexcept; //1
//! template<unsigned_scalar_value K, kyosu::concepts::complex T> constexpr auto zeta(K, k, T z) noexcept; //2
//! template<eve::floatingordered_value T> constexpr auto zeta(T z) noexcept;
//! template<kyosu::concepts::complex T> constexpr auto zeta(T z) noexcept;
//! }
//! @endcode
//!
//! **Parameters**
//!
//! * `k` : scalar unsigned value, parameter of the sum.
//! * `z` : complex or real value to process.
//!
//! **Return value**
//!
//! Returns the Dirichlet alternating zzeta function: sum \f$ \displaystyle \sum_0^\infty \frac{1}{(n+1)^z}\f$
//! Returns the Dirichlet zeta function: \f$ \displaystyle \sum_0^\infty \frac{1}{(n+1)^z}\f$
//!
//! @groupheader{Example}
//!
Expand Down
2 changes: 1 addition & 1 deletion include/kyosu/functions/cosh.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ namespace kyosu
//!
//! **Return value**
//!
//! 2. Returns [elementwise](@ref glossary_elementwise) the complex value
//! 2. Returns elementwise the complex value
//! of the hyperbolic cosine of the input.
//!
//! * for every z: `kyosu::cosh(kyosu::conj(z)) == kyosu::conj(std::cosh(z))`
Expand Down
2 changes: 1 addition & 1 deletion include/kyosu/functions/from_angle_axis.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ namespace kyosu::tags
namespace kyosu
{
//================================================================================================
//! @addtogroup quaternion
//! @addtogroup functions
//! @{
//! @var from_angle_axis
//!
Expand Down
2 changes: 1 addition & 1 deletion include/kyosu/functions/log.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ namespace kyosu
//!
//! 1. a real typed input z is treated as if [kyosu::complex](@ref kyosu::complex)(z) was entered.
//!
//! 2. Returns [elementwise](@ref glossary_elementwise) the natural logarithm of the input
//! 2. Returns elementwise the natural logarithm of the input
//! in the range of a strip in the interval \f$i\times[-\pi, \pi]\f$ along the imaginary axis
//! and mathematically unbounded along the real axis. .
//!
Expand Down
3 changes: 2 additions & 1 deletion include/kyosu/functions/rotate_vec.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ namespace kyosu
//! **Parameters**
//!
//! `q`: quaternion value defining the rotation.
//! `x`: span of 3 elements to rotate.
//!
//! `v`: span of 3 elements to rotate.
//!
//! **Return value**
//!
Expand Down
2 changes: 1 addition & 1 deletion include/kyosu/functions/sqrt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ namespace kyosu
//!
//! 1. a real typed input z is treated as if [kyosu::complex](@ref kyosu::complex)(z) was entered.
//!
//! 2. Returns the [elementwise](@ref glossary_elementwise) the square root of z,
//! 2. Returns the elementwise the square root of z,
//! in the range of the right half-plane, including the imaginary axis (\f$[0, +\infty]\f$
//! along the real axis and \f$[-\infty, +\infty]\f$ along the imaginary axis.)
//!
Expand Down
12 changes: 9 additions & 3 deletions include/kyosu/functions/tan.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ namespace kyosu
//! @code
//! namespace kyosu
//! {
//! template<kyosu::concepts::cayley_dickson T> constexpr T tan(T z) noexcept;
//! template<eve::floating_ordered_value T> constexpr T tan(T z) noexcept;
//! template<eve::floating_ordered_value T> constexpr T tan(T z) noexcept; //1
//! template<kyosu::concepts::complex T> constexpr T tan(T z) noexcept; //2
//! template<kyosu::concepts::cayley_dickson T> constexpr T tan(T z) noexcept; //3
//! }
//! @endcode
//!
Expand All @@ -63,7 +64,12 @@ namespace kyosu
//!
//! **Return value**
//!
//! Returns the tangent of the argument.
//! 1. Returns eve::tan(z)
//!
//! 2. The behavior of this function is equivalent to \f$-i\tanh(i\; z)\f$.
//!
//! 3. Returns \f$-I_z\,; \tanh(I_z\; z)\f$ if \f$z\f$ is not zero else \f$\tan(z_0)\f$, where \f$I_z = \frac{\underline{z}}{|\underline{z}|}\f$ and
//! \f$\underline{z}\f$ is the [pure](@ref kyosu::imag ) part of \f$z\f$.
//!
//! @groupheader{Example}
//!
Expand Down
21 changes: 20 additions & 1 deletion include/kyosu/functions/tanh.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,26 @@ namespace kyosu
//!
//! **Return value**
//!
//! Returns the hyperbolic tangent of the argument.
//! 1. Returns eve::tanh(z).
//!
//! 2. Returns elementwise the complex value
//! of the hyperbolic tangent of the input.
//!
//! * for every z: `kyosu::tanh(kyosu::conj(z)) == kyosu::conj(std::tanh(z))`
//! * for every z: `kyosu::tanh(-z) == -kyosu::tanh(z)`
//! * If z is \f$+0\f$, the result is \f$+0\f$
//! * If z is \f$x+i \infty\f$ (for any non zero finite x), the result is \f$NaN+i NaN\f$
//! * If z is \f$i \infty\f$ the result is \f$i NaN\f$
//! * If z is \f$x,NaN\f$ (for any non zero finite x), the result is \f$NaN+i NaN\f$
//! * If z is \f$i NaN\f$ the result is \f$i NaN\f$
//! * If z is \f$+\infty,y\f$ (for any finite positive y), the result is \f$1\f$
//! * If z is \f$+\infty+i \infty\f$, the result is \f$1,\pm 0\f$ (the sign of the imaginary part is unspecified)
//! * If z is \f$+\infty+i NaN\f$, the result is \f$1\f$ (the sign of the imaginary part is unspecified)
//! * If z is \f$NaN\f$, the result is \f$NaN\f$
//! * If z is \f$NaN+i y\f$ (for any non-zero y), the result is \f$NaN+i NaN\f$
//! * If z is \f$NaN+i NaN\f$, the result is \f$NaN+i NaN\f$
//!
//! 3. The call is semantically equivalent to sinh(z)/cosh(z);
//!
//! @groupheader{Example}
//!
Expand Down
2 changes: 1 addition & 1 deletion include/kyosu/functions/trunc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ namespace kyosu
//! namespace kyosu
//! {
//! template<kyosu::concepts::cayley_dickson T> constexpr T trunc(T z) noexcept;
//! template<eve::floating_ordered_value T> constexpr T trunc(T z) noexcept;
//! template<eve::floating_ordered_value T> constexpr T trunc(T z) noexcept;
//! }
//! @endcode
//!
Expand Down

0 comments on commit 950b220

Please sign in to comment.