var f = 1.23;
var l = Uint8List(4);
l.buffer.asByteData().setFloat32(0, f);
var v = l.buffer.asByteData().getFloat32(0);
print("f: $f, v: $v");
Output: f: 1.23, v: 1.2300000190734863
I thought this might be a bug because float32 supports 8 digit fraction but the fraction continues after 8 digit (I mean this part: 190734863), but float should not support(?) those values. So, If I read a float32 I should not be getting float64.
I am not sure if this is a bug
Output: f: 1.23, v: 1.2300000190734863
I thought this might be a bug because float32 supports 8 digit fraction but the fraction continues after 8 digit (I mean this part:
190734863
), but float should not support(?) those values. So, If I read afloat32
I should not be getting float64.