diff --git a/solidity/test/BancorFormula.js b/solidity/test/BancorFormula.js
index <HASH>..<HASH> 100644
--- a/solidity/test/BancorFormula.js
+++ b/solidity/test/BancorFormula.js
@@ -48,4 +48,19 @@ contract('BancorFormula', () => {
             assert(retVal.lessThan(maxVal), `Result of function fixedExp(${maxExp.plus(1)}, ${precision}) indicates that maxExpArray[${precision}] is wrong`);
         });
     }
+
+    for (let n = 1; n <= 255; n++) {
+        let val1 = web3.toBigNumber(2).toPower(n);
+        let val2 = web3.toBigNumber(2).toPower(n).plus(1);
+        let val3 = web3.toBigNumber(2).toPower(n+1).minus(1);
+
+        it('Verify function floorLog2 legal input', async () => {
+            let retVal1 = await formula.testFloorLog2.call(val1);
+            let retVal2 = await formula.testFloorLog2.call(val2);
+            let retVal3 = await formula.testFloorLog2.call(val3);
+            assert(retVal1.equals(web3.toBigNumber(n)), `Result of function floorLog2(${val1}) is wrong`);
+            assert(retVal2.equals(web3.toBigNumber(n)), `Result of function floorLog2(${val2}) is wrong`);
+            assert(retVal3.equals(web3.toBigNumber(n)), `Result of function floorLog2(${val3}) is wrong`);
+        });
+    }
 });
Update the BancorFormula JS test.