numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
Loading...
Searching...
No Matches
num_collect::multi_double::quad Class Reference

class of quadruple precision floating-point numbers More...

#include <num_collect/multi_double/quad.h>

+ Collaboration diagram for num_collect::multi_double::quad:

Public Member Functions

constexpr quad () noexcept=default
 construct zero
 
constexpr quad (double high, double low) noexcept
 construct
 
template<typename Scalar , std::enable_if_t<(std::is_integral_v< Scalar >||std::is_floating_point_v< Scalar >) &&(!std::is_same_v< Scalar, quad >)> * = nullptr>
constexpr quad (Scalar value) noexcept
 convert implicitly
 
auto high () const noexcept -> double
 get higher digits
 
auto low () const noexcept -> double
 get lower digits
 
auto operator*= (const quad &right) noexcept -> quad &
 multiply with another number
 
auto operator+= (const quad &right) noexcept -> quad &
 add another number
 
auto operator- () const noexcept -> quad
 negate this number
 
auto operator-= (const quad &right) noexcept -> quad &
 subtract another number
 
auto operator/= (const quad &right) noexcept -> quad &
 divide by another number
 

Private Attributes

double high_ {0.0}
 higher digits
 
double low_ {0.0}
 lower digits
 

Detailed Description

class of quadruple precision floating-point numbers

Definition at line 32 of file quad.h.

Constructor & Destructor Documentation

◆ quad() [1/2]

num_collect::multi_double::quad::quad ( double high,
double low )
inlineconstexprnoexcept

construct

Parameters
[in]highhigher digits
[in]lowlower digits

Definition at line 45 of file quad.h.

◆ quad() [2/2]

template<typename Scalar , std::enable_if_t<(std::is_integral_v< Scalar >||std::is_floating_point_v< Scalar >) &&(!std::is_same_v< Scalar, quad >)> * = nullptr>
num_collect::multi_double::quad::quad ( Scalar value)
inlineconstexprnoexcept

convert implicitly

Template Parameters
Scalartype of scalar value
Parameters
[in]valuevalue

Definition at line 58 of file quad.h.

Member Function Documentation

◆ high()

auto num_collect::multi_double::quad::high ( ) const -> double
inlinenodiscardnoexcept

get higher digits

Returns
higher digits

Definition at line 66 of file quad.h.

◆ low()

auto num_collect::multi_double::quad::low ( ) const -> double
inlinenodiscardnoexcept

get lower digits

Returns
lower digits

Definition at line 73 of file quad.h.

◆ operator*=()

auto num_collect::multi_double::quad::operator*= ( const quad & right) -> quad&
inlinenoexcept

multiply with another number

Parameters
[in]rightanother number
Returns
this

Definition at line 112 of file quad.h.

◆ operator+=()

auto num_collect::multi_double::quad::operator+= ( const quad & right) -> quad&
inlinenoexcept

add another number

Parameters
[in]rightanother number
Returns
this

Definition at line 88 of file quad.h.

◆ operator-()

auto num_collect::multi_double::quad::operator- ( ) const -> quad
inlinenoexcept

negate this number

Returns
negated number

Definition at line 80 of file quad.h.

◆ operator-=()

auto num_collect::multi_double::quad::operator-= ( const quad & right) -> quad&
inlinenoexcept

subtract another number

Parameters
[in]rightanother number
Returns
this

Definition at line 102 of file quad.h.

◆ operator/=()

auto num_collect::multi_double::quad::operator/= ( const quad & right) -> quad&
inlinenoexcept

divide by another number

Parameters
[in]rightanother number
Returns
this

Definition at line 126 of file quad.h.

Member Data Documentation

◆ high_

double num_collect::multi_double::quad::high_ {0.0}
private

higher digits

Definition at line 139 of file quad.h.

◆ low_

double num_collect::multi_double::quad::low_ {0.0}
private

lower digits

Definition at line 142 of file quad.h.


The documentation for this class was generated from the following file: