Math Is Fun Forum
  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2006-07-22 07:22:44

All_Is_Number
Member
Registered: 2006-07-10
Posts: 258

Happy Pi Approximation Day

Today is 22/7, in case you might have missed it.


You can shear a sheep many times but skin him only once.

Offline

#2 2006-07-22 07:36:32

Devantè
Real Member
Registered: 2006-07-14
Posts: 6,400

Re: Happy Pi Approximation Day

Didn't realise...a day hard to remember. That is, unless you're a computer or a robot that can store the value of 22/7. Nice find. smile

Offline

#3 2006-07-22 11:43:30

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,685

Re: Happy Pi Approximation Day

LOL! Is it marked on your calendar?


"The physicists defer only to mathematicians, and the mathematicians defer only to God ..."  - Leon M. Lederman

Offline

#4 2006-07-22 15:49:32

All_Is_Number
Member
Registered: 2006-07-10
Posts: 258

Re: Happy Pi Approximation Day

MathsIsFun wrote:

LOL! Is it marked on your calendar?

big_smile:D:D

Actually, I happened across the information while checking out Pi on Wikipedia when looking at the Pi thread in the Cool forum. I noticed that it was today, so I thought I would let everyone here know.

Most days I couldn't tell you what the date is!


You can shear a sheep many times but skin him only once.

Offline

#5 2007-07-22 10:38:02

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,685

Re: Happy Pi Approximation Day

This wonderful day has rolled around again ... "Happy Pi Approximation Day"!


"The physicists defer only to mathematicians, and the mathematicians defer only to God ..."  - Leon M. Lederman

Offline

#6 2007-07-22 20:03:27

Devantè
Real Member
Registered: 2006-07-14
Posts: 6,400

Re: Happy Pi Approximation Day

Happy 'Pi Approximation Day', everyone!

Has been a year since I last posted in this thread, and I can't believe I'm saying this again!

Yes, it is hard to remember.

Offline

#7 2007-07-23 05:48:05

mikau
Member
Registered: 2005-08-22
Posts: 1,504

Re: Happy Pi Approximation Day

but pi itself actually occurs somewhere between 21/7 and 22/7. smile

Ya know, pi is a great number but there are other really important numbers worthy of notice! take for instance, 1 day. It occurs exactly 1 month and 1 day appart except for one month.

What about e or Phi?

Holy crud! I just wrote a simple program and i found the best e approximation day on the calender is the 19th of july! Thats just 3 days before the best pi approximation day!!

Also, the best phi approximation day appears to be the 13th of august . Also not far away!

Kind of scary that pi day, e day, phi day and a 1 day all occur within a month of eachother.

Its very depressing that there isn't a 0 day though. But I guess, if we're talking about approximatons, best approximation is january 31st. 1/31 (though we put month first that time)

Hmm.. I guess we could pick some random day and imagine it to be i day. I say it should be february 29th.

Last edited by mikau (2007-07-23 05:55:43)


A logarithm is just a misspelled algorithm.

Offline

#8 2007-07-23 06:27:20

mikau
Member
Registered: 2005-08-22
Posts: 1,504

Re: Happy Pi Approximation Day

And for anyone who cares, here's a java program to find any 'X approximation day'

import java.util.*;

public class Calanderfraction
{


	public static void main(String[] args)
	{
		// program to prompt the user to enter some constant
		// the program finds the day/month ratio that
		// best approximates that constant

	   // prompt the user to enter a constant
	   Scanner console = new Scanner(System.in);
	   System.out.print(" Enter the constant to search for: ");
	   final double SEARCHED_CONSTANT = console.nextDouble();

		// set the maximum number of days for each month, considering leap years as well
	   int[] daysInMonth = {31, 29, 31, 30, 31, 30, 31,31,30,31,30,31};

	   // variable to store the ratio of day/month.
	   //initialize to an arbitrary value
	   double fraction = 1;

	   // variable to store the difference of fraction and SEARCHED_CONSTANT for any date
	   // initialize to some arbitrary value
	   double smallestDifference = 10;

	   // variable to hold the best approximation of SEARCHED_CONSTANT found thus far
	   //initialize to an arbitrary value
	   double best = 1;

	   // variables to hold the integer numerator and denominator of 'best'
	   //initialize to arbitrary values
	   int num = 1, den = 1;

	   // process all 12 months
	   for (int month = 1; month <= 12; month++)
	   {
	   	   // for each month, process each day
	   	   for (int day = 1; day <= daysInMonth[month-1]; day++)
	 	   {
		   	  // determine the fraction of day/month
		   	  fraction = (double)(day)/(double)(month);

			  // if this is a better approximation of SEARCHED_CONSTANT
			  if (Math.abs(fraction - SEARCHED_CONSTANT) < smallestDifference)
			  {
		    	// update the best values
		    	num = day;
		    	den = month;
		     	smallestDifference = Math.abs(fraction - SEARCHED_CONSTANT);
			   	best = fraction;
		   	  }
		   } // end for. go to next month
	   } // end for. all months have passed


		// print the best day/month ratio found in fraction form, and its decimal value
	   System.out.println("\nThe best calendar approximation for " + SEARCHED_CONSTANT + " is "
	   					 + num + "/" + den + " = " + best);
	 } // end main

} // end class

A logarithm is just a misspelled algorithm.

Offline

Board footer

Powered by FluxBB