From 15932b947ba63493a8280ad3d326109ff7eb202b Mon Sep 17 00:00:00 2001 From: Kip Cole Date: Tue, 21 Mar 2023 17:36:01 +0800 Subject: [PATCH] Fix format from power --- lib/cldr/unit/prefix.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cldr/unit/prefix.ex b/lib/cldr/unit/prefix.ex index 4b32e1e..362b15d 100644 --- a/lib/cldr/unit/prefix.ex +++ b/lib/cldr/unit/prefix.ex @@ -35,10 +35,10 @@ defmodule Cldr.Unit.Prefix do @si_power_prefixes @si_factors |> Enum.map(fn {prefix, factor} when is_integer(factor) -> - {prefix, Cldr.Math.log10(factor)} + {prefix, Cldr.Math.log10(factor) |> round()} {prefix, %Decimal{} = factor} -> - {prefix, Decimal.to_integer(Cldr.Math.log10(factor))} + {prefix, Decimal.to_integer(Cldr.Math.log10(factor)) |> Decimal.round()} end) |> Map.new()