maths.abs ========= .. py:module:: maths.abs .. autoapi-nested-parse:: Absolute Value. Functions --------- .. autoapisummary:: maths.abs.abs_max maths.abs.abs_max_sort maths.abs.abs_min maths.abs.abs_val maths.abs.test_abs_val Module Contents --------------- .. py:function:: abs_max(x: list[int]) -> int >>> abs_max([0,5,1,11]) 11 >>> abs_max([3,-10,-2]) -10 >>> abs_max([]) Traceback (most recent call last): ... ValueError: abs_max() arg is an empty sequence .. py:function:: abs_max_sort(x: list[int]) -> int >>> abs_max_sort([0,5,1,11]) 11 >>> abs_max_sort([3,-10,-2]) -10 >>> abs_max_sort([]) Traceback (most recent call last): ... ValueError: abs_max_sort() arg is an empty sequence .. py:function:: abs_min(x: list[int]) -> int >>> abs_min([0,5,1,11]) 0 >>> abs_min([3,-10,-2]) -2 >>> abs_min([]) Traceback (most recent call last): ... ValueError: abs_min() arg is an empty sequence .. py:function:: abs_val(num: float) -> float Find the absolute value of a number. >>> abs_val(-5.1) 5.1 >>> abs_val(-5) == abs_val(5) True >>> abs_val(0) 0 .. py:function:: test_abs_val() >>> test_abs_val()