calc

Synopsis

Declared in <folly/math/Division.h>

class calc;

Description

The compact calculation state for a fixed divisor.

Unlike uint_divisor, this class stores only the calculation state. The caller supplies the divisor to each operation, and debug builds verify that it matches the state computed by the constructor. When the reciprocal algorithm is unavailable, calc is empty and uses the supplied divisor directly.

Type Aliases

Name

Description

result_type

result_type

value_type

value_type

Member Functions

Name

Description

calc [constructor]

calc

div

div

div_gt1

div_gt1

divrem

divrem

divrem_gt1

divrem_gt1

is_divisor_of

is_divisor_of

is_divisor_of_gt1

is_divisor_of_gt1

rem

rem

rem_gt1

rem_gt1

Friends

Name

Description

folly::uint_divisor

uint_divisor

Created with MrDocs