This has been discussed a few times before, have a search on the mailing
list.  Basically, this is how floats are implemented in the processor
and and Julia uses them like that (as almost all other programming
languages do).  If that is a problem, then there are other number types.

On Thu, 2015-09-03 at 09:45, Michael Borregaard <[email protected]> wrote:
> Hi,
> in the Julia documentation, I fell over this strange behaviour:
>
> julia> 1.1 + 0.1
> 1.2000000000000002
>
> I understand that this may make sense in the context of how floating 
> numbers are implemented inside Julia - but I cannot think of a single 
> situation in which the user would want this behaviour.
> Can someone explain what is going on, and why this is not a bug?
>
> Thanks,
> Michael

Reply via email to