1#! /usr/bin/env python3 2 3# Test inspired from example published on the project page: 4# https://mpmath.org/ 5 6from mpmath import mp 7 8mp.dps = 50 9 10result = mp.quad(lambda x: mp.exp(-x**2), [-mp.inf, mp.inf]) ** 2 11 12# Pi digits can be cross-checked here: 13# https://www.angio.net/pi/digits.html 14expected_result = "3.1415926535897932384626433832795028841971693993751" 15 16assert str(result) == expected_result 17