export function add(a, b) {
  let aLen = (a + '').split('.')[1]?.length || 0;
  let bLen = (b + '').split('.')[1]?.length || 0;

  const powN = Math.pow(10, Math.max(aLen, bLen));

  return (a * powN + b * powN) / powN;
}

export function multiply(a, b) {
  let aLen = (a + '').split('.')[1]?.length || 0;
  let bLen = (b + '').split('.')[1]?.length || 0;

  const powA = Math.pow(10, aLen);
  const powB = Math.pow(10, bLen);

  return (a * powA * (b * powB)) / (powA * powB);
}
