#!/usr/bin/env python # encoding: utf-8 # # Copyright (c) 2010 Doug Hellmann. All rights reserved. # """Gauss Error Function """ #end_pymotw_header import math print '{:^5} {:7}'.format('x', 'erfc(x)') print '{:-^5} {:-^7}'.format('', '') for x in [ -3, -2, -1, -0.5, -0.25, 0, 0.25, 0.5, 1, 2, 3 ]: print '{:5.2f} {:7.4f}'.format(x, math.erfc(x))