Is it me or Blynk. I have a “ labeled value” of 8.250 which following /pin.#/ shoul format to 8.3 but does format to 8.2 instead. Is this a know bug? It appears not to be limited to labeled values. Thus the rounding off appears to be odd in general. Is this known and on the list of updates?
Do you have some code that can reliably replicate this issue?
Rounding 8.250 to 8.2 is correct according to IEEE 754 specification (default rule is “round to nearest, ties to even”), which is used in such case in iOS app.
A see that Android uses a bit different rounding mode, so we’ll take a look to sync both platforms here .
Thanks for the report!
I have been a numbers guy for decades and never realised that there was a published standard for rounding and that it’s the exact opposite of “the norm”.
Indeed, it’s being used on IOS. Was not aware about the Standard to which indeed it complies. Assume no further code needed.
Thanks
Sometimes 8.250 rounds to 8.2 and not 8.3… skool lied to me
Maybe you finished school before the 1985 “standard” was published?
Yeah, the world is much more complicated than school says. But we will move iOS to “round to nearest, ties away from zero” rounding algorithm, just to make it a bit simpler
Not tellin