# Maths layperson in need of help

1. Jun 18, 2004

### larashka

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.

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

Last edited: Jun 18, 2004
2. Jun 18, 2004

### arildno

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.

3. Jun 18, 2004

### larashka

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.

4. Jun 19, 2004

### arildno

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

5. Jun 19, 2004