Hi everyone, do primitives from Kotlin/Native translate correctly to iOS at the moment? I am trying to build a prototype framework and the values set in the framework are not the same that the view is showing.
02/14/2018, 7:22 AM
Yes, Ruckus is correct, not all numbers could be represented in binary exponential form exactly, so depending on precision you output them, you could see small difference
02/14/2018, 3:11 PM
@olonho, and @Ruckus Is there a way to specify how and where to round the numbers so that the value remains the same between the different platforms which I am targeting?
02/14/2018, 3:25 PM
It is an string output issue, not actual representation, just use formatting with smaller number of digits after dot
02/14/2018, 3:30 PM
String formatting is the way to go for final output. If you need to manage rounding during calculation, you'll need some sort of BigDecimal representation, or use integers scaled up (for many money values, you can do all calculations in cents/kopek/etc.)