You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var l1 =newFloat32List.fromList([1.11, 2.11]);
var s1 = l1.join(',');
print(s1); // prints 1.1100000143051147,2.109999895095825var l2 =newFloat32List.fromList([1.25, 2.25]);
var s2 = l2.join(',');
print(s2); // prints 1.25,2.25
Why results are so different? Why 1.25 is printed as 1.25 but 1.11 as 1.1100000143051147?
Dart SDK version: 2.10.0-59.0.dev (dev) (Tue Aug 25 18:05:44 2020 -0700) on "windows_x64"
The text was updated successfully, but these errors were encountered:
Floating point numbers can only represent fractional powers of 2 like 1/2, 1/4, 3/8, 999/1024 exactly.
1.11 as a floating point number is not exactly 1.11.
Please rewrite these tests with only numbers like 12.625 or 0.03125, or include an inaccuracy factor of about 1/100000, or whatever is needed.
Also the Float32x4 reciprocal square root and reciprocal tests are failing.
The error given by the hardware reciprocal square root approximation is only within 1/1000 of the correct answer, not 1/10000.
The intel doc says:
Compute the approximate reciprocal square root of the lower single-precision (32-bit) floating-point element in a, store the result in the lower element of dst, and copy the upper 3 packed elements from a to the upper elements of dst. The maximum relative error for this approximation is less than 1.5*2^-12.
Why results are so different? Why
1.25
is printed as1.25
but1.11
as1.1100000143051147
?Dart SDK version: 2.10.0-59.0.dev (dev) (Tue Aug 25 18:05:44 2020 -0700) on "windows_x64"
The text was updated successfully, but these errors were encountered: