math

File Purpose: math tools

Functions

_ast_math_eval_node(node)

evaluate a parsed ast node, recursively.

as_roman_numeral(x)

convert x to a roman numeral string.

ast_math_eval(expr)

evaluate a string math expression using ast.

float_rounding(x[, prec])

round x to a more-likely-to-be-input float (if possible, else just return x).

from_roman_numeral(s)

convert roman numeral string s to an integer.

is_integer(x)

return whether x is an integer.

nonempty_product(iterable)

returns the product of all elements in iterable; iterable must have at least 1 element.

np_all_int(x)

returns whether all values in x are integer-valued.

product(iterable)

returns the product of all elements in iterable.

round_to_int(x[, mode])

return x rounded to an integer, using the specified mode.