Tweet

wPrime uses a recursive call of Newton's method for estimating functions, with f(x)=x2-k, where k is the number we're sqrting, until Sgn(f(x)/f'(x)) does not equal that of the previous iteration, starting with an estimation of k/2. It then uses an iterative calling of the estimation method a set amount of times to increase the accuracy of the results. It then confirms that n(k)2=k to ensure the calculation was correct. It repeats this for all numbers from 1 to the requested maximum.

Our aim was to make a perfectly threaded benchmark, such that it would consistantly use 100% of the CPU while in use. This is achieved by using CPUz to detect the CPU count and use exactly that many processing threads to avoid any performance losses due to multiple threads running on any single physical thread. Each thread is designed to do 1/n of the work, where n is the number of threads. For example, if you're calculating 16 roots on 4 CPU's, each CPU will calculate 4 roots. Some might argue that this style of threading is unrealistic in real-time performance, but in fact is quite indicative of performance in several real world tasks such as F@H which allows you to run several instances of the work at any one time.

## Hardware Information

wPrime retreives most hardware information thanks to CPUz. It retreives CPU information such as clock speed, code name, cache size, voltage, etc. It retreives the motherboard model and the amount, speed and timings of your memory.

## Name

So what's 'Prime' got to do with square roots? Well nothing, initially I had planned a Prime number calculator but no logical pattern for each prime number is known so it's difficult to confirm accuracy of the results. Square roots however, have a logical and simple reverse (the square).