Fix for #123868

Edge case rounding error corrected in line 56.
Also removed spaces throughout for style consistency.