Dynamic Fraction Library 1.0.0
Reference-counted arbitrary precision rational number library (MIT OR Unlicense)
Loading...
Searching...
No Matches
Functions
Predicate Functions

Functions for testing fraction properties. More...

Functions

bool df_is_zero (df_frac f)
 Test if fraction is zero.
 
bool df_is_one (df_frac f)
 Test if fraction is one.
 
bool df_is_negative (df_frac f)
 Test if fraction is negative.
 
bool df_is_positive (df_frac f)
 Test if fraction is positive.
 
bool df_is_integer (df_frac f)
 Test if fraction is an integer.
 

Detailed Description

Functions for testing fraction properties.

Function Documentation

◆ df_is_integer()

bool df_is_integer ( df_frac  f)

Test if fraction is an integer.

Parameters
fFraction to test
Returns
true if denominator == 1

Definition at line 898 of file dynamic_fraction.h.

◆ df_is_negative()

bool df_is_negative ( df_frac  f)

Test if fraction is negative.

Parameters
fFraction to test
Returns
true if f < 0

Definition at line 886 of file dynamic_fraction.h.

◆ df_is_one()

bool df_is_one ( df_frac  f)

Test if fraction is one.

Parameters
fFraction to test
Returns
true if f == 1

Definition at line 880 of file dynamic_fraction.h.

◆ df_is_positive()

bool df_is_positive ( df_frac  f)

Test if fraction is positive.

Parameters
fFraction to test
Returns
true if f > 0

Definition at line 892 of file dynamic_fraction.h.

◆ df_is_zero()

bool df_is_zero ( df_frac  f)

Test if fraction is zero.

Parameters
fFraction to test
Returns
true if f == 0

Definition at line 874 of file dynamic_fraction.h.