From 96e5b67cd580bb9fc43b5d3e48836d66f85dedd1 Mon Sep 17 00:00:00 2001 From: Erik Arvidsson Date: Thu, 25 Jun 2015 16:43:10 -0400 Subject: [PATCH] Fix issue with math_precision.js It was missing vars which was causing issues with our test harness since we run all the files in strict mode. --- harness/math_precision.js | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/harness/math_precision.js b/harness/math_precision.js index 805b344b72..fd6ed1d0a3 100644 --- a/harness/math_precision.js +++ b/harness/math_precision.js @@ -1,13 +1,11 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -function getPrecision(num) -{ - //TODO: Create a table of prec's, - // because using Math for testing Math isn't that correct. - - log2num = Math.log(Math.abs(num))/Math.LN2; - pernum = Math.ceil(log2num); - return(2 * Math.pow(2, -52 + pernum)); - //return(0); -} +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +function getPrecision(num) { + //TODO: Create a table of prec's, + // because using Math for testing Math isn't that correct. + + var log2num = Math.log(Math.abs(num)) / Math.LN2; + var pernum = Math.ceil(log2num); + return 2 * Math.pow(2, -52 + pernum); +}