Math 171 Computer Programs

Math 171 Computer Programs

Below you will find some of our algorithms from class coded into a number of different programming languages.  The simplest way to run a program (without installing any software to your computer) is to cut and paste your favorite code to http://codepad.org (opens in new window).  Then edit the code and run it.

Newton's Method

Lua --- newt_lua
Python --- newt_py
Ruby --- newt_rb
C++ --- newt_cpp
Scilab --- newt_sci

Riemann Sums

Lua --- riemann_lua
Python --- riemann_py
C++ --- riemann_cpp

Trapezoid Rule

Lua --- trap_lua
C++ --- trap_cpp

Simpson's Rule

Lua --- simps_lua
C++ --- simps_cpp