Angular service to properly do math without floating point errors