| 
    LibreOffice Module tools (master) 1
    
   | 
 
#include <tools/fract.hxx>#include <tools/debug.hxx>#include <o3tl/hash_combine.hxx>#include <o3tl/safeint.hxx>#include <sal/log.hxx>#include <osl/diagnose.h>#include <algorithm>#include <cmath>#include <numeric>#include <boost/rational.hpp>Go to the source code of this file.
Functions | |
| static boost::rational< sal_Int32 > | rational_FromDouble (double dVal) | 
| static void | rational_ReduceInaccurate (boost::rational< sal_Int32 > &rRational, unsigned nSignificantBits) | 
| static int | impl_NumberOfBits (sal_uInt32 nNum) | 
| Find the number of bits required to represent this number, using the CLZ intrinsic.  More... | |
| static boost::rational< sal_Int32 > | toRational (sal_Int32 n, sal_Int32 d) | 
| static constexpr bool | isOutOfRange (sal_Int64 nNum) | 
| Fraction | operator+ (const Fraction &rVal1, const Fraction &rVal2) | 
| Fraction | operator- (const Fraction &rVal1, const Fraction &rVal2) | 
| Fraction | operator* (const Fraction &rVal1, const Fraction &rVal2) | 
| Fraction | operator/ (const Fraction &rVal1, const Fraction &rVal2) | 
| bool | operator!= (const Fraction &rVal1, const Fraction &rVal2) | 
| bool | operator<= (const Fraction &rVal1, const Fraction &rVal2) | 
| bool | operator>= (const Fraction &rVal1, const Fraction &rVal2) | 
| bool | operator== (const Fraction &rVal1, const Fraction &rVal2) | 
| bool | operator< (const Fraction &rVal1, const Fraction &rVal2) | 
| bool | operator> (const Fraction &rVal1, const Fraction &rVal2) | 
      
  | 
  static | 
Find the number of bits required to represent this number, using the CLZ intrinsic.
Definition at line 412 of file fract.cxx.
Referenced by rational_ReduceInaccurate().
      
  | 
  staticconstexpr | 
Definition at line 52 of file fract.cxx.
Referenced by Fraction::Fraction().
      
  | 
  static | 
      
  | 
  static | 
Definition at line 443 of file fract.cxx.
References DBG_ASSERT, and impl_NumberOfBits().
Referenced by Fraction::ReduceInaccurate().
      
  | 
  static | 
Definition at line 41 of file fract.cxx.
Referenced by Fraction::MakeFraction(), Fraction::operator double(), Fraction::operator sal_Int32(), Fraction::operator*=(), Fraction::operator+=(), Fraction::operator-=(), Fraction::operator/=(), and Fraction::ReduceInaccurate().