September 19, 2006 – 17:12
I just finished implementing the Verhoeff checksum algorithm in PHP, you can download it as verhoeff.zip. Yes, mathematically it’s a bit more elaborate than other checksum algorithms, but with look-up tables it’s fairly simple and lightweight.
The implementation provides two functions calcsum($number) and checksum($number). The first one return a check digit for the decimal number used as argument, just append the returned digit to the number and you got yourself a checkable number. The second function checks the number (including the appended check digit) used as argument, the number is only valid if the function return zero.
I noticed a small bug due to a misplace modulus (simple PHP syntax typo), the verhoeff.php is now updated, tested and in working order. The bug only affected the calculation of check digits, not the check function.
September 18, 2006 – 18:38
I’m currently working on an article that make use of some math notation. Normally, in such cases, when you need something out of the ordinary that can’t easily be marked up as XHTML you render an image (yes, I know about MathML). It’s quite easy to render beautiful math formulae off-line. But making the round-trip out of WordPress can also be quite annoying, especially if you do a lot of tweaking and I normally do a lot of tweaking.
Read the full story
There’re some news going on in the world of physics that’s facinating, explainable and may break new ground. What making it more newsworthy is the author of the work, a 27 years old broadcasting tutor who only spent 6 moth in college. But after all Albert Eintein was only a patent clerk when he did most of his groundbreaking work, and got published when he was 26. The same is true for Newton altough he didn’t publish Principia until decades later. And there are numerous other examples in science where the most important ideas are concieved at a young age, especially in mathematics.
Read the full story