'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var exponent = require('./exponent.js');

function precisionPrefix(step, value) {
  return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent.default(value) / 3))) * 3 - exponent.default(Math.abs(step)));
}

exports.default = precisionPrefix;
