Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #16280
| Newsgroups | comp.programming |
|---|---|
| Date | 2023-01-09 16:33 -0800 |
| References | (4 earlier) <tnclg3$2of9o$2@dont-email.me> <tncob5$1oat$1@gioia.aioe.org> <tncpgk$2of9h$7@dont-email.me> <tncqs4$uoe$1@gioia.aioe.org> <tncquh$vj3$1@gioia.aioe.org> |
| Message-ID | <42fc040f-d485-4119-b70a-8fc346eca49bn@googlegroups.com> (permalink) |
| Subject | Re: Another little puzzle |
| From | Y A <angel00000100000@mail.ee> |
Look this ↓ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀🌞⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ 🛩 ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀🌧️🌧️🌧️⠀⠀🌧️🌧️⠀⠀⠀⠀⠀⠀🌧️🌧️🌧️⠀⠀🌧️🌧️🌧️🌧️⠀⠀🌧️🌧️⠀⠀⠀🌧️🌧️🌧️⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀🕊️ ⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀🌴⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀🍄 ⠀⠀⠀⠀ 🌼⠀⠀⠀⠀ 🌻 🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫 How do You rate this on 1....10 scale ? On Wednesday, December 14, 2022 at 5:43:18 PM UTC+2, Dmitry A. Kazakov wrote: > On 2022-12-14 16:41, Dmitry A. Kazakov wrote: > > On 2022-12-14 16:18, Richard Heathfield wrote: > > > >>> BTW, averaging floats is a nasty problem too. A naive implementation > >>> quickly loses precision. > >> > >> We're dealing with 'o'clock' and "HH:MM", and nowadays we have 64-bit > >> integer types and there are even 128-bit integers mooching around > >> looking for a reason to exist. You'd have to average a hell of a lot > >> of times even to /need/ floats, let alone lose significant precision. > > > > I never suggested float for averaging time stamps, I pointed out that > > averaging is not a simple problem. E.g. try this one: > > > > function Average (X : Float; N : Positive) return Float is > > Sum : Float := 0.0; > > begin > > for Index in 1..N loop > > Sum := Sum + X; > > end loop; > > return Sum / Float (N); > > end Average; > > > > The function does naive averaging. For simplicity it just sums up the > > same number X N times and divides by N. > > > > Average (1.0, 17_000_000) = 0.986895 > > Average (1.0, 100_000_000) = 0.167772 > > Average (1.0, 200_000_000) = 0.838861 > 0.0838861 > > The error is obviously systematic. > -- > Regards, > Dmitry A. Kazakov > http://www.dmitry-kazakov.de
Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar
Re: Another little puzzle "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2022-12-14 14:06 +0100
Re: Another little puzzle Richard Heathfield <rjh@cpax.org.uk> - 2022-12-14 13:10 +0000
Re: Another little puzzle "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2022-12-14 14:35 +0100
Re: Another little puzzle Richard Heathfield <rjh@cpax.org.uk> - 2022-12-14 14:10 +0000
Re: Another little puzzle "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2022-12-14 15:58 +0100
Re: Another little puzzle Richard Heathfield <rjh@cpax.org.uk> - 2022-12-14 15:18 +0000
Re: Another little puzzle "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2022-12-14 16:41 +0100
Re: Another little puzzle "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2022-12-14 16:43 +0100
Re: Another little puzzle Y A <angel00000100000@mail.ee> - 2023-01-09 16:33 -0800
Re: Another little puzzle Richard Heathfield <rjh@cpax.org.uk> - 2022-12-14 16:13 +0000
Re: Another little puzzle V <angleeeeeeee@mail.ee> - 2023-05-10 11:16 -0700
Re: Another little puzzle Ǝ <angel0000000001000000000000@mail.ee> - 2022-12-30 05:59 -0800
csiph-web