Skip to content

Commit

Permalink
Fix format from power
Browse files Browse the repository at this point in the history
  • Loading branch information
kipcole9 committed Mar 21, 2023
1 parent 8cc3f55 commit 15932b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/cldr/unit/prefix.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 15932b9

Please sign in to comment.