Skip to content

SteveShaw-phys2200/Midterm1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

##Midterm 1 ###Main program found in Midterm1.c

  • Note improvements to makefile
  • Note improvements to pi_bbp.c
    • BBP runs twice as fast now

####Aim of the project:

  1. implement Leibniz series to compute pi to error in 10^-6 range
  2. implement BBP series to compute pi to error in 10^-6 range
  3. run both programs several times to accurately measure time of computation of prog
  4. compare the efficiency of computing the leibniz series vs. BBP series

####Answers to Midterm I Programing Project: (Answer 5 changed after better pi_bbp.c function)

  • pi_leibniz.c contains Answer 1
  • Midterm1.c contains Answer 2 (top)
  • value of n1: 1100000
  • pi_leibniz.c contains Answer 3
  • Midterm1.c contains Answer 4 (middle)
  • value of n2: 4
  • Midterm1.c contains Answer 5 (bottom)
  • tLeibniz: 8.90 secs with 50 iterations
  • tBBP: 9.38 secs with 4,000,000 iterations
  • tLeibniz / tBBP: 75906
  1. N/A
  • (github)
  1. N/A
  • (this README.md)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors