integer_equivalent_number_to_integer

mathtools.integer_equivalent_number_to_integer(number)

Integer-equivalent number to integer.

>>> mathtools.integer_equivalent_number_to_integer(17.0)
17

Returns noninteger-equivalent number unchanged:

>>> mathtools.integer_equivalent_number_to_integer(17.5)
17.5

Raises type error on nonnumber input.

Returns number.