Skip to main content
8 events
when toggle format what by license comment
Jan 25, 2023 at 16:15 comment added Barmar @EdMorton This is called "banker's rounding" and is common in most languages.
Jan 25, 2023 at 12:53 comment added Ed Morton sprintf("%.0f") rounds .5 to the nearest even number on many, but not all, systems so 1.5 would round to 2 but 2.5 would also round to 2 - just worth mentioning in case anyone thinks that .5 would always round up or down or that 2.5 would round to 3 (or 2) on all systems. See gnu.org/software/gawk/manual/gawk.html#Round-Function.
Jan 25, 2023 at 12:38 history edited Stéphane Chazelas CC BY-SA 4.0
added 6 characters in body
Jan 25, 2023 at 8:33 history edited Stéphane Chazelas CC BY-SA 4.0
added 179 characters in body
Jan 25, 2023 at 8:27 history edited Stéphane Chazelas CC BY-SA 4.0
added 179 characters in body
Jan 25, 2023 at 8:21 history edited Stéphane Chazelas CC BY-SA 4.0
added 257 characters in body
Jan 25, 2023 at 7:59 history edited Stéphane Chazelas CC BY-SA 4.0
added 91 characters in body
Jan 25, 2023 at 7:45 history answered Stéphane Chazelas CC BY-SA 4.0