PDA

View Full Version : Maths layperson in need of help


larashka
Jun18-04, 08:55 AM
Hi, I need some help understanding a formula I found on a website to convert the Western calendar to the Chinese one. I'm looking for anyone who can explain it to me in simple terms with clear examples. Any help at all would be much appreciated.

The relevant section from the website is pasted below but I have also included the link for more information.

Thanks in advance,
Belinda

--
For converting Western years into Chinese, for any positive integers x and y, let rem(x,y) denote the remainder on dividing x by y (i.e., rem(x,y) = x mod y). Then given a Western year n, the Chinese year (e,a,k) may be determined as follows: Let i*=*rem(n+6,10) if n is even, rem(n+6,10) - 1 otherwise. Then e = ½*i. (Note that rem(n+6,10) is simply the last digit of n+6.) a*=*rem(n+8,12), and k*is the largest integer k' such that 60k' <= n + 2756 (provided that n >= -2696). Having determined e and a by these means, the element name and the animal name are obtained from the above correspondence.
--
URL: http://www.hermetic.ch/cal_stud/ch_year.htm

arildno
Jun18-04, 09:10 AM
Let n=1994
Then i=rem(2000,10)=0
e=1/2*0=0
a=rem(2002,12) =10 (166*12=1992)
k<=(1994+2756)/60=79,...
so k=79

We have then Chinese year (0,10,79)

If this was a bit too quick for you, post again.

larashka
Jun18-04, 09:01 PM
Thanks Arildno, but I'm still at little unclear. I understand k and e but the rem() function in a and i is totally over my head.

arildno
Jun19-04, 03:17 AM
I guess what you want is an easy way to understand how to calculate the remainder function.
Now given x>y, you shall first find the largest integer n so that y*n<=x
How to do that?
Simply calculate x/y, and throw away the decimals after the point; there you have n!

Now, the remainder is given by x-n*y

cookiemonster
Jun19-04, 03:34 AM
It's also the same remainder you always got when you used to do long division in elementary school.

cookiemonster

larashka
Jun20-04, 05:36 AM
Thanks that's great, but could you tell me what are x and y in relation to the rest of the whole? For example, n = western year