## JavaScript – Euclidean Algorithm

One of the things that you often have to learn early on in school after multiplication and division is how to find the GCD (Greatest Common Divisor) of two numbers. It is possible that you know the GCD as the GCF (Greatest Common Factor) or the HCF (Higest Common Factor). Read more…

## JavaScript – Heron’s Square Root Algorithm

One of the first things that many people learn in an introduction to Computer Sciences course is the algorithm for calculating the square root of a number. The algorithm, which is often attributed to Heron of Alexandria, is as follows: Formulate a guess. Multiply that guess by itself.  If the Read more…

## POW Answer – Fixing Compilable JavaScript Code

The following answers the Problem of the Week from May 14, 2012: At first glance, it may seem that the following would be the solution: Unfortunately, the above results in true being returned. In order to get false to be returned, you could do the following: Even though the result Read more…

## POW – Fixing Compilable JavaScript Code

Many JavaScript/JScript developers use Google Closure Compiler to compile their code. Even though this tool is a great way of minifying JavaScript code, believe it or not, it doesn’t always work (at least as of May 14, 2012). The following JavaScript code works fine when you run it without being Read more…

## POW Answer – 0.999999 Repeating Equals One?

The following answers the Problem of the Week from May 7, 2012: One of the simplest ways to prove that 0.999999 = 1 is by doing the following: 0.333333 = 1 / 3 3 × (0.333333) = 3 × (1 / 3) 0.999999 = 1 As shown above, since it Read more…

## POW Answer – Differences In Languages

This is the answer to the Problem of the Week that was posted on April 30. The desired answer is 0. The reason is because “11” in binary is actually equal to 3. Therefore 3 – 3 = 0. On the other hand, you could use the following table to Read more…

## POW – 0.99999 Repeating Equals One?

How can you prove or disprove that 1 = 0.999999…? The answer to this Problem of the Week can be found here.

## POW – Differences In Languages

Did you know that the language can at times dictate the way people view math? The following is a slight modification of a problem given to me by Matt Emschweiler: A children’s math problem was translated by two different people (a mathematician and a literature major) from two distinct ancient Read more…

## POW Answer – Party Balloons

This is the answer to last week’s Problem of the Week: One thing that I like to do when solving these types of problems is determining what percentage of the work each participant will do. The problem stated that Tasheera takes 16 seconds for each balloon, whereas Omar takes 18 Read more…

## POW – Party Balloons

A group of friends are preparing for a party. Tasheera and Omar are in charge of preparing the balloons. Tasheera takes eight seconds to inflate each balloon, three seconds to tie each, and a five second break in between each one. Omar takes ten seconds to inflate each balloon, five Read more…