!rm -rf latexify_py
!git clone https://github.com/odashi/latexify_py -b develop
!pip install -e latexify_py
# Before running following cells, restart the runtime so that the installed
# module is activated.
import math
import latexify
@latexify.with_latex
def solve(a, b, c):
return (-b + math.sqrt(b**2 - 4*a*c)) / (2*a)
print(solve(1, 4, 3))
print(solve)
print()
solve
-1.0
\operatorname{solve}(a, b, c) \triangleq \frac{-b + \sqrt{b^{2} - 4ac}}{2a}
\(\operatorname{solve}(a, b, c) \triangleq \frac{-b + \sqrt{b^{2} - 4ac}}{2a}\)
@latexify.with_latex
def sinc(x):
if x == 0: