Timeline for Convert float array to lower or higher integer, find sum(integers) == round(sum(floats)), reducible to subset sum?
Current License: CC BY-SA 4.0
3 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 6, 2023 at 13:03 | comment | added | user16034 | @gnasher729: the question does not say "minimize the sum of the rounding errors", hence my comment. | |
Feb 6, 2023 at 12:58 | comment | added | gnasher729 | You'll have to round up one of the numbers. To minimise the sum of the rounding errors, you will round up 0.4 to 1. | |
Feb 5, 2023 at 19:21 | history | answered | user16034 | CC BY-SA 4.0 |