Wrong value for auto-sum in query results
Options
I discovered that the sum of a single-precision floating point column isn't always being computed correctly by Linqpad (v...)
Here's a contrived case that reproduces the problem:
var data = new[] {
new { Val = 1.0E+07f },
new { Val = 0.1E+07f },
}
.Dump();
Console.WriteLine($"Expected sum: {data.Sum(c => c.Val)}");

Here's a contrived case that reproduces the problem:
var data = new[] {
new { Val = 1.0E+07f },
new { Val = 0.1E+07f },
}
.Dump();
Console.WriteLine($"Expected sum: {data.Sum(c => c.Val)}");

Comments
-
Forgot to mention, this is version 5.33.11 (AnyCPU)
-
Thanks - this is now fixed in 5.35.1.