Brad Fitzpatrick (brad) wrote,
Brad Fitzpatrick
brad

Mathematica? I wish.

I feel so dirty. (I'll explain in a second)

I don't own or know how to use any high-end mathematics software. I once had R skillz, but they've been fading over the past year or so.

So, when it came time to find the average value of the function sin(wt)cos(wt+pi/8), what do I do?

use constant PI => 3.14159;
use constant PHI => PI / 8;
for ($t=0; $t<PI*20; $t+=0.01) {
  $val = sin($t)*cos($t+PHI);
  $points++; $sum += $val;
}
printf "avg = %.4f\n", ($sum/$points);
I got the answer correct (and 3 other similiar problems), but this is totally the wrong way to do it.

I really wish I were good at math ... I used to be a lot better, but I'm forgetting so much. There are so many things I wish I were good at, but it's a matter of time.

I want to learn German more. I bought a whole pack of "learn German" CD-ROMs .... I should spend more time working with those.

*sigh*

Tags: lang
Subscribe

  • Contributing to Open Source projects

    Prior to joining Google I always joked that Google was the black hole that swallowed up open source programmers. I'd see awesome, productive hackers…

  • Realtime LiveJournal -> Buzz

    If you've seen all my "test" posts over the past few days, you probably knew I was up to something. Indeed.... If you add your LiveJournal to your…

  • Announcing "Squeezer" for Android

    Open sourced as promised earlier... Squeezer! Control your SqueezeCenter (aka SlimServer) and all your synchronized SqueezeBoxes, receivers,…

  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 21 comments

  • Contributing to Open Source projects

    Prior to joining Google I always joked that Google was the black hole that swallowed up open source programmers. I'd see awesome, productive hackers…

  • Realtime LiveJournal -> Buzz

    If you've seen all my "test" posts over the past few days, you probably knew I was up to something. Indeed.... If you add your LiveJournal to your…

  • Announcing "Squeezer" for Android

    Open sourced as promised earlier... Squeezer! Control your SqueezeCenter (aka SlimServer) and all your synchronized SqueezeBoxes, receivers,…