fixed rounding error bug. approxEqual must be rewritten for better consistency