# L-7 MCS 507 Wed 6 Sep 2023 : usempmathivfun.py

"""
Illustration of the evaluation of functions using interval arithmetic
with the mpmath package.
"""

from mpmath import iv
iv.dps = 15
E = iv.exp(1)
print('e :', E)
print('log(e) :', iv.log(E))
print('sin(e) :', iv.sin(E))
print('cos(e) :', iv.cos(E))
P = iv.pi
print('pi :', P)
print('sin(pi) :', iv.sin(P))
print('cos(pi) :', iv.cos(P))
