Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.programming    |    Programming issues that transcend langua    |    57,431 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 56,850 of 57,431    |
|    Stefan Ram to Stefan Ram    |
|    Re: Another little puzzle    |
|    28 Dec 22 12:12:13    |
      From: ram@zedat.fu-berlin.de              ram@zedat.fu-berlin.de (Stefan Ram) writes:       >I waited a few days before answering to allow       >sufficient time to think about the problem.               (A few lines in this post contain more than 72 characters.)               I sometimes look at records of events like when someone got        up or went to bed on different days and wonder about the        "average time" he gets up or goes to bed. Some years ago,        I asked in another newsgroup how to average times, and from        answers there I kept this expression for a spreadsheet and        two times in cells A1 and B1:              REST(1.5+1/6.28318530717959*ARCTAN2((COS((A1-0.5)*6.283185307179       9)+COS((B1-0.5)*6.28318530717959))/2,(SIN((A1-0.5)*6.28318530717       59)+SIN((B1-0.5)*6.28318530717959))/2),1)               . I added a bit, like "REST", but the trigonometric part        came from that newsgroup. (Times t of a day in spreadsheets        often are 0 <= t < 1 because they often use the day as the        unit of time). At that time, I did not understand what was        going on! In hindsight, today, I see that this seems to        calculate the average via the average of the position of        the two points on a 24-hour clock in two dimensions.               The corresponding Wikipedia page is called, "Mean of circular        quantities".               I also have a copy of a page "Circular Values Math and        Statistics with C++11" saved. Other pages I found were        "Averages-Mean angle - Rosetta Code", "Averaging Angles -        The Math Doctors", or "algorithm - How do you calculate        the average of a set of angles - Stack Overflow". Maybe        some of these pages can still be found in the Web today.               There was also another web page that used lines some of        which have more than 72 characters. It contained,              |A good way to estimate an average angle, A, from a set of angle measurements       |a[i] 0<=i |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca