Computational Methods for Nonlinear Systems

Physics 7682 - Fall 2015


Instructor: Chris Myers

Mondays & Fridays 1:30-3:30, Rockefeller B3 (directions)

http://www.physics.cornell.edu/~myers/teaching/ComputationalMethods/

Estimating Pi Exercise

Background

We introduce several useful features of the Python language and associated libraries by writing a program to estimate the numerical value of pi by drawing random numbers.

Learning Goals

Science: This introduces a powerful method for estimating via Monte Carlo.

Computation: This warmup exercise is used as part of an interactive demo in class to illustrate Development Environments, Interpreters and Workflows. In addition, this exercise introduces some issues related to the performance of interpreted vs. compiled code, tools for analyzing such performance, and simple plotting.

Procedure