Python math, adapted for use with physical quantities
Many of the functions only accept dimensionless quantities, and they operate on the underlying values—not the values as represented in a particular display unit. To operate on values in a display unit would be to favor a particular unit, which is against the design of the package.
The constants (pi, e) are exactly as they are in Python math.
These functions accept floats, integers, and dimensionless quantities:
They are the same as those from Python math, except the documentation of acosh(), asinh(), and atanh() has been corrected (see http://bugs.python.org/issue21902). The functions cast quantities cast as floats and return floats, except for factorial(), which casts quantities as integers and returns integers.
All of the other functions (below) are different than those in Python math.
These functions accept angle as a quantity:
They return floats (as in Python math).
These functions accept floats, integers, and dimensionless quantities:
They return angles as quantities.
atan2() accepts accept floats, integers, and quantities of the same dimension. It returns angle as a quantity.
These functions are no longer applicable and have been deleted since angle is a quantity:
These functions accept floats, integers, and dimensionless quantities:
If the input is a float or an integer, the output is a float. If the input is a Quantity or a ScalarUnit, the result is the same and has the same dimension, display, etc.
These functions accept floats, integers, and quantities:
If the input is a float or an integer, the output is a float. If the input is a Quantity or a ScalarUnit, the result is of the same type and has the same dimension, display, etc. (of the first argument in the case of copysign()).
These functions also accept floats, integers, and quantities:
If the input is an float or an integer, the output is a float. If the input is a Quantity or a ScalarUnit, the result is the same. The dimensions and display units are handled according to the power.
fmod() accepts floats, integers, and quantities of the same dimension. The output is always a float.
These functions also accept floats, integers, and quantities of the same dimension:
The display unit (and prefixable attribute, if applicable) of the first argument or entry is propagated to the output.
These functions accept floats or quantities:
Only the value of a quantity is used; dimension and display unit are ignored.