Double represents values in binary floating point system.
So, every programming language may show the same results.
One way would be showing the result with proper rounding.
Another might be using Decimal instead of Double.
But which would be better depends on your use case.
Topic:
Programming Languages
SubTopic:
Swift
Tags: