phys_581.assignment_0#

Assignment 0

Evaluation of special functions.

Attributes#

Functions#

quadratic_equation(a, b, c)

Return xs=(x1, x2), the two roots of the quadratic equation $ax^2+bx*c=0$.

_quadratic_equation(a, b, c)

Return xs=(x1, x2), the two roots of the quadratic equation $ax^2+bx*c=0$.

Module Contents#

_TINY#
quadratic_equation(a, b, c)#

Return xs=(x1, x2), the two roots of the quadratic equation $ax^2+bx*c=0$.

Examples

>>> quadratic_equation(1, 2, 3)
_quadratic_equation(a, b, c)#

Return xs=(x1, x2), the two roots of the quadratic equation $ax^2+bx*c=0$.

This version is stable with respect to cancellation errors.