|
|
Umm, it's located in "Coon Rapids"...
Need we say any more?
If it's not broken, fix it until it is
|
|
|
|
|
And "charges" and "police" appears in every god damn news story!
Snow expected Tuesday, according to police, charges are not expected to be filed
|
|
|
|
|
|
|
I prefer computers and cats
|
|
|
|
|
Ok, it seems Mr. Bihy isn't posting it. Here's an easy one for today:
Old-fashioned mother's question (5)
I ain't got no signature.
|
|
|
|
|
Pirate Guy wrote: Old-fashioned mother's question
Aren't kiddos excessively modern these days?
Okay, let me get my coat, which I haven't got to get since Feb
|
|
|
|
|
|
Eh ?
We can’t stop here, this is bat country - Hunter S Thompson RIP
|
|
|
|
|
Nope.
I ain't got no signature.
|
|
|
|
|
With utter disgust at the wordplay ...
MUMSY
Y = question? Really? I'm still shuddering!
I am not a number. I am a ... no, wait!
|
|
|
|
|
Like it or not, you should start to preparing for tomorrow...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
Just because you did't see it before? That's ridiculous really!
Anyway you are up for tomorrow.
I ain't got no signature.
|
|
|
|
|
Professional standards! If I've not seen it before it's because no crossword editor in the world would accept it.
I am not a number. I am a ... no, wait!
|
|
|
|
|
Well, whatever fancies you!
I ain't got no signature.
|
|
|
|
|
I agree
We can’t stop here, this is bat country - Hunter S Thompson RIP
|
|
|
|
|
OR…
Why VB is better than C#.
Back in the days before GPS, and when Transit took up half the bridge on a destroyer, I navigated by sextant and Admiralty tables. After four years working in Iraq, I took a year off to go sailing, so thought I would computerise the tables function – using an HP75C (no Interwebs back then). I built a digital almanac in HP Basic, good for plus or minus 3k years, handling the Sun, Moon and GHA Aries. I had to jump through a few hoops to fit it all into 24k, but it worked admirably – worst landfall error 1/3 of a mile.
Later, I rewrote it in Classic VB and added the six navigational planets, and a star catalogue of the 57 navigational stars plus Polaris. Then I moved it into VB.net, and added a few more bells and whistles, just for the hell of it - running fixes, great circle routes etc.
I have now decided to put it into C#, and Xamarinate™ it for my Android tablet. Yesterday, I had a quick look through the code to see what gotchas might lie hidden and…
An eleven element array containing the relevant constants, and a loop:
For I = 0 to 10
X = X + array(I) * Tu^I
Next
Has now turned into
X = 0.40909280422233 _
- 0.02269378904316 * Tu _
- 0.00000751461206 * Tu * Tu _
+ 0.00969263751958 * Tu * Tu * Tu _
- 0.00024909726935 * Tu * Tu * Tu * Tu _
- 0.00121043431763 * Tu * Tu * Tu * Tu * Tu _
- 0.00018931974247 * Tu * Tu * Tu * Tu * Tu * Tu _
+ 0.00003451873409 * Tu * Tu * Tu * Tu * Tu * Tu * Tu _
+ 0.00013511757293 * Tu * Tu * Tu * Tu * Tu * Tu * Tu * Tu _
+ 0.00002807071214 * Tu * Tu * Tu * Tu * Tu * Tu * Tu * Tu * Tu _
+ 0.00001187793519 * Tu * Tu * Tu * Tu * Tu * Tu * Tu * Tu * Tu * Tu
This is just one of dozens of functions using exponentiation.
Please can I scream now?
P.S. Bonus points for identifying the function.
|
|
|
|
|
What is wrong with writing a pow() function ? Or use it from some exisiting library ?
|
|
|
|
|
pow() is a trigonometric function, and therefore rather slow - some of these functions run many times in a single calculation. I would only use it for fractional exponents, for which there is no other solution. As for using a different library, I have zero experience of Xamarin, so I am not sure how that would be handled. I am porting this code to get some idea of using Xamarin.
|
|
|
|
|
Rage wrote: What is wrong with writing a pow() function ?
Using a loop there is no need to write a pow() function:
Fac = Tu
X = array(0)
For I = 1 to 10
X = X + array(I) * Fac
Fac = Fac * Tu
Next
|
|
|
|
|
Elegant - I like it!
Now why didn't I think of that?
|
|
|
|
|
Thank you.
It is a common implementation for polynomial equations because it is much faster than using pow() .
|
|
|
|
|
No, thank you! This approach has now be stored away for future use.
Most of the stuff that I get paid for is LOB for SMEs - and you don't come across exponentiation. In any event, most clients specify VB because " My [insert relative of choice] did computers at school and can maintain it". Ha!
Just for the record, the function calculates the obliquity of the ecliptic for the given time, in radians.
Dim Tu As Double = (JulianDate - 2451545.0#) / 36525.0#
is the missing first line.
|
|
|
|
|
I must confess that I don't know much about astronomical navigation. So I would not got the first line.
I started my career (apprenticeship) in a company manufacturing yacht electronics including Gonio radio direction finders and selling LORAN-C navigators and have used those in the past sometimes. The first GPS system I ever saw was 1984 on a bridge of a brand new cargo ship. It was located in a 19" rack occupying more than 20 units.
|
|
|
|