Used BC Math Functions

Here`s my attempt to solve #6