Changed test to "assertAlmostEqual()" and added some test cases.