1. ## ABOUT CALCULATION - Biorhythms

HI EVERYONE,,

this is my function and i will state the problem at the bottom..

Code:
```//calculate the physical cycle which has physical curve 23 days
double physicalCycle(Date& dob, Date& currentDate)
{
double score;
double distance = distanceFromDobAndCurrentDate(dob, currentDate);

score = 100 * sin(360*(distance/23));
return score;
//check - the answer should be 63.10879473
}```
when i entered
dob: 1 1 1969
current date: 1 6 2004

the output of the physical cycle should be 63.10879473 but it is wrongly output which is -80.---

can someone tell me wat is the problem, is it the formula or..?

this is the website u can calculate the physical cycle http://www.orcapia.com/froggy/biorhy...&detl=1&save=1

2. Have you checked that the distance is calculated correctly? Have you taken into account that sin takes radians, not degrees? (To convert from degrees to radians multiply by pi and divide by 180)

3. i though tat sin is in the library..

4. yes the distance is 100% sure correct