|
Tue, May 06, 2008
![[Link]](http://geekblog.oneandoneis2.org/img/chain_link.gif)
It's a nice sunny day today. And has been for several days. And I had nothing to do.
So I put my new camping stuff into my rucksack and went for a walk.
Not intending to camp out, you understand. Just to check things like the weight and how easy it was to erect the tent.
I was out for a few hours. The ground was STILL thick mud, so I had to go off-path quite a bit. Into brambles. Wearing shorts.
And it was hot. I had a bottle of water, but it didn't last long. Eventually I stopped for lunch, and pitched my tent.
![[Tent] [Tent]](http://geekblog.oneandoneis2.org/media/blogs/new/tent1.jpg)
![[Tent] [Tent]](http://geekblog.oneandoneis2.org/media/blogs/new/tent2.jpg)
It's a pretty good bit of kit. Astonishingly light, well put-together, and fairly easy to put up. Roomy enough for even my 6'4" self to fit in, and with a space outside to leave my rucksack in.
Then I took it down, packed it back away, and walked another hour or so. All told, I was out nearly three hours. I bought two bottles of drink and an ice-cream while I was out there. They helped.
Overall conclusions:
The new camping stuff was worth the cost. It's light and tough and good at its job.
The Visor Buff is still the comfiest anti-sun headwear I've ever encountered: Keeps the sun out of your eyes and off your neck without any problem.
Espadrills are surprisingly good all-terrain footwear when it's hot.
Taylor's aftershave lotion is the best thing I've ever found to put on my skin. My ankles were scratched to Hell and itching like... something itchy. A liberal smearing of their stuff solved the problem. I guess it makes sense, really: If all you've got is dry skin, any oily gunk will make it feel better. But when it's being applied to freshly-shaved and possibly cut skin.. it's GOT to be good!
And I need a bigger water bottle before I start backpacking properly.
![[Link]](http://geekblog.oneandoneis2.org/img/chain_link.gif)
K&R 4.5: Add things like sin and pow to the calculator
Okay. So you just put in the math.h library and off you go. Right?
Apparently.. wrong.
It SAYS it works, but it gives me the wrong answers for the sin/cos/tan stuff.
1 s
0.84147098
2 s
0.90929743
3 s
0.14112001
Must have coded it wrong.. right?
So let's try something a bit simpler. A bit of code to calculate sin(0-10):
#include <stdio.h>
#include <math.h>
int main()
{
int i;
for (i = 0; i < 11; i++)
printf("sin %d = %f\n", i, sin(i));
return 0;
}
Result?
sin 0 = 0.000000 sin 1 = 0.841471 sin 2 = 0.909297 sin 3 = 0.141120 sin 4 = -0.756802 sin 5 = -0.958924 sin 6 = -0.279415 sin 7 = 0.656987 sin 8 = 0.989358 sin 9 = 0.412118 sin 10 = -0.544021
Same numbers that my calculator code gives me.
But not the same numbers that any other scientific calculator I try gives me.
What's going on??
| Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|
| << < | > >> | |||||
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 | |