SMTStabilizer API
Public API documentation for SMTStabilizer
Loading...
Searching...
No Matches
stabilizer::parser::MathUtils Class Reference

Numeric helper wrappers shared by parser-side evaluation and rewrite. More...

#include <util.h>

Static Public Member Functions

static Integer pow (const Integer &base, const Integer &exp)
 
static Real pow (const Real &base, const Real &exp)
 
static Integer gcd (const Integer &a, const Integer &b)
 
static Integer lcm (const Integer &a, const Integer &b)
 
static Real sqrt (const Integer &i)
 
static Real sqrt (const Real &r)
 
static Real safeSqrt (const Integer &i)
 
static Real safeSqrt (const Real &r)
 
static Integer ceil (const Real &r)
 
static Integer floor (const Real &r)
 
static Integer round (const Real &r)
 
static bool isPrime (const Integer &n)
 
static bool isEven (const Integer &n)
 
static bool isOdd (const Integer &n)
 
static Integer factorial (const Integer &n)
 

Detailed Description

Numeric helper wrappers shared by parser-side evaluation and rewrite.

Definition at line 63 of file util.h.

Member Function Documentation

◆ ceil()

Integer stabilizer::parser::MathUtils::ceil ( const Real r)
static

◆ factorial()

Integer stabilizer::parser::MathUtils::factorial ( const Integer n)
static

Definition at line 337 of file util.cpp.

Referenced by stabilizer::parser::Parser::rewrite().

◆ floor()

Integer stabilizer::parser::MathUtils::floor ( const Real r)
static

◆ gcd()

Integer stabilizer::parser::MathUtils::gcd ( const Integer a,
const Integer b 
)
static

Definition at line 278 of file util.cpp.

References gcd().

Referenced by gcd(), lcm(), and stabilizer::parser::Parser::rewrite().

◆ isEven()

bool stabilizer::parser::MathUtils::isEven ( const Integer n)
static

Definition at line 333 of file util.cpp.

Referenced by stabilizer::parser::Parser::rewrite().

◆ isOdd()

bool stabilizer::parser::MathUtils::isOdd ( const Integer n)
static

Definition at line 335 of file util.cpp.

Referenced by stabilizer::parser::Parser::rewrite().

◆ isPrime()

bool stabilizer::parser::MathUtils::isPrime ( const Integer n)
static

Definition at line 319 of file util.cpp.

Referenced by stabilizer::parser::Parser::rewrite().

◆ lcm()

Integer stabilizer::parser::MathUtils::lcm ( const Integer a,
const Integer b 
)
static

Definition at line 284 of file util.cpp.

References gcd().

Referenced by stabilizer::parser::Parser::rewrite().

◆ pow() [1/2]

Integer stabilizer::parser::MathUtils::pow ( const Integer base,
const Integer exp 
)
static

◆ pow() [2/2]

Real stabilizer::parser::MathUtils::pow ( const Real base,
const Real exp 
)
static

Definition at line 276 of file util.cpp.

References stabilizer::parser::HighPrecisionReal::pow().

◆ round()

Integer stabilizer::parser::MathUtils::round ( const Real r)
static

◆ safeSqrt() [1/2]

Real stabilizer::parser::MathUtils::safeSqrt ( const Integer i)
static

Definition at line 301 of file util.cpp.

References stabilizer::parser::HighPrecisionReal::sqrt().

◆ safeSqrt() [2/2]

Real stabilizer::parser::MathUtils::safeSqrt ( const Real r)
static

Definition at line 308 of file util.cpp.

References stabilizer::parser::HighPrecisionReal::sqrt().

◆ sqrt() [1/2]

Real stabilizer::parser::MathUtils::sqrt ( const Integer i)
static

Definition at line 288 of file util.cpp.

References stabilizer::parser::HighPrecisionReal::sqrt().

◆ sqrt() [2/2]

Real stabilizer::parser::MathUtils::sqrt ( const Real r)
static

Definition at line 294 of file util.cpp.

References stabilizer::parser::HighPrecisionReal::sqrt().


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