Decimal with many decimal places

For some reason Decimal module rounds numbers with many decimal places, even though the precision is set to 28. For example, IO.inspect( returns #Decimal<3.659755555554529>. This is my Decimal context:
%Decimal.Context{ flags: [], precision: 28, rounding: :half_up, traps: [:invalid_operation, :division_by_zero] }

Hi @charliekelly. The issue isn’t that Decimal is rounding, it’s that the float is rounding itself prior to being passed to the function:

iex(1)> 3.65975555555452921
3.659755555554529 with a string containing all of the desired characters works as expected;


I suspect you may be on quite an old version of Decimal since with a float is deprecated. For example:

iex> 12.345
warning: passing float to is deprecated as floats have inherent inaccuracy. Use Decimal.from_float/1 or Decimal.cast/1 instead