Loki's blog

  • Home
  • maloki.net
  • First Impressions on Windows 7 Beta

    • 12 Jan 2009
    • 1 Response
    •  views
    • Microsoft OS Technology geek
    • Edit
    • Delete
    • Tags
    • Autopost
    Public Beta Release Last January 9, 2009, Microsoft released the Windows 7 Beta to the public. I don't think Microsoft expected much demand since the servers were facing technical difficulties. The put down the site to ensure a better download experience. The link to the ISO was shared by some helpful users and still worked. However, potential testers (including me) couldn't get a product key that would get past the 30-day limit. Fortunately, Microsoft more than made up for their overloaded servers by extending the key distribution until January 24. If you're interested, you can download the ISO, get a key and test Windows 7 yourself until it stops working on August 1, 2009. (By this time, maybe there will be another beta version / new key distribution...) To Test or Not I tried to resist beta testing Windows 7 but in the end, Windows 7 beta won. I finished downloading the Windows 7 x64 ISO (about 3.3 GB) & just got my product key yesterday morning (Sunday) and started testing shortly after. After a day of use, here's what I noticed, plus my comments/suggestions. I've tried to link to as much screenshots that I've taken to show what I mean.

    Read the rest of this post »

    • Tweet
  • Inverse Square Root

    • 5 Jan 2009
    • 0 Responses
    •  views
    • Programming Share Technical Technology gaming geek
    • Edit
    • Delete
    • Tags
    • Autopost

    I just bumped into a clever little code snippet used to find the inverse square root:

    float InvSqrt(float x) {
        float xhalf = 0.5f * x;
        int i = *(int*)&x;   // store floating-point bits in integer
        i = 0x5f3759d5 - (i >> 1);  // initial guess for Newton's method
        x = *(float*)&i;  // convert new bits into float
        x = x*(1.5f - xhalf*x*x);  // One round of Newton's method
        return x;
    }

    [ taken with comments from Kalid Azad @ BetterExpalined.com: Understanding Quake’s Fast Inverse Square Root. ]

    Ok, it does not get the exact value but you get a good enough estimate, FAST!

    There are two important things to note here:

    • Newton’s method (also known as the Newton-Raphson method)
    • The ‘magic number’: 0x5f3759d5, an optimized first guess

    For a better explanation, I suggest reading Kalid Azad’s article and the paper by Charles McEniry.

    Wait a minute, so why is this useful?

    In graphics programming, this can be used to normalize vectors quickly. If you noticed the title on the first link, it’s used in the Quake 3 engine. So does that mean the legendary John Carmack wrote this code? If you’re interested, you can read the Origin of Quake3’s Fast InvSqrt() at Beyond3D.

    What did I learn?

    I usually forget one thing: there are times when speed trumps accuracy. A close quick estimate would be better and there are a number of optimations that can be made. Much thanks goes to Doc Mana who first introduced me to the Newton-Raphson method & how to apply it on code. 

    • Tweet
  • Is it rape if...

    • 27 Jun 2008
    • 0 Responses
    •  views
    • geek star wars
    • Edit
    • Delete
    • Tags
    • Autopost
    Is it rape if you used the Force? Even if you used Force Persuasion to do it? It is consensual after all.... In the wiki entry, Force Persuasion (aka the Jedi Mind Trick) influences the actions of the "weak-minded" so that means that you're bending them rather than forcing them. In the end, they become willing. Rape? I think not. Real? Yup!...in the fictional universe of Star Wars. Too bad. But in consolation, there's this. :D
    • Tweet
  • About

    26-year old Filipino game developer and gamer who loves food, especially cookies. Mmmm, Cookies!

    28432 Views
  • Archive

    • 2012 (3)
      • May (3)
    • 2011 (1)
      • May (1)
    • 2010 (1)
      • September (1)
    • 2009 (8)
      • July (1)
      • May (1)
      • April (2)
      • January (4)
    • 2008 (17)
      • December (1)
      • November (3)
      • September (3)
      • July (6)
      • June (1)
      • April (1)
      • January (2)
    • 2007 (24)
      • November (2)
      • October (2)
      • September (3)
      • August (4)
      • July (6)
      • June (2)
      • May (2)
      • March (2)
      • February (1)
    • 2006 (10)
      • November (3)
      • March (1)
      • February (2)
      • January (4)
    • 2005 (5)
      • December (1)
      • November (2)
      • March (1)
      • January (1)
    • 2004 (3)
      • November (2)
      • October (1)

    Get Updates

    Subscribe via RSS
    Twitter
  • Other blogs

    • Photography
    • Singularity
    • Hungry
    • Tumblog

    maloki.net

    • Home
    • Projects
    • Contact