Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"You shouldn't make my toaster angry." -- Household security explained in "Johnny Quest"


devel / comp.lang.c / Re: Can this program be improved?

SubjectAuthor
* Can this program be improved?Manu Raju
+* Re: Can this program be improved?Andrey Tarasevich
|+- Re: Can this program be improved?David Brown
|+- Re: Can this program be improved?Tim Rentsch
|+- Re: Can this program be improved?Manfred
|+* Re: Can this program be improved?Manu Raju
||`* Re: Can this program be improved?Lew Pitcher
|| `* Re: Can this program be improved?Manu Raju
||  +- Re: Can this program be improved?Bart
||  +- Re: Can this program be improved?Richard Damon
||  `- Re: Can this program be improved?Lew Pitcher
|`* Re: Can this program be improved?Guillaume
| `* Re: Can this program be improved?Bart
|  +* Re: Can this program be improved?Andrey Tarasevich
|  |+* Re: Can this program be improved?James Kuyper
|  ||`* Re: Can this program be improved?Andrey Tarasevich
|  || `- Re: Can this program be improved?David Brown
|  |`* Re: Can this program be improved?Bart
|  | `- Re: Can this program be improved?Bart
|  `* Re: Can this program be improved?Keith Thompson
|   +* Re: Can this program be improved?Bart
|   |+* Re: Can this program be improved?Scott Lurndal
|   ||+- Re: Can this program be improved?Keith Thompson
|   ||`* Re: Can this program be improved?Kaz Kylheku
|   || `* Re: Can this program be improved?Bart
|   ||  `* Re: Can this program be improved?Kaz Kylheku
|   ||   `- Re: Can this program be improved?Bart
|   |`* Re: Can this program be improved?Keith Thompson
|   | +* Re: Can this program be improved?Kaz Kylheku
|   | |`* Re: Can this program be improved?Keith Thompson
|   | | `- Re: Can this program be improved?Kaz Kylheku
|   | `* Re: Can this program be improved?Bart
|   |  +- Re: Can this program be improved?Malcolm McLean
|   |  `* Re: Can this program be improved?Manfred
|   |   `* Re: Can this program be improved?Bart
|   |    +- Re: Can this program be improved?Manfred
|   |    `* Re: Can this program be improved?James Kuyper
|   |     `* Re: Can this program be improved?Bart
|   |      +- Re: Can this program be improved?james...@alumni.caltech.edu
|   |      `* Re: Can this program be improved?Keith Thompson
|   |       `* Re: Can this program be improved?Bart
|   |        `* Re: Can this program be improved?Keith Thompson
|   |         +* Re: Can this program be improved?Malcolm McLean
|   |         |`* Re: Can this program be improved?Keith Thompson
|   |         | `* Re: Can this program be improved?Malcolm McLean
|   |         |  +* Re: Can this program be improved?Keith Thompson
|   |         |  |`* Re: Can this program be improved?Malcolm McLean
|   |         |  | +- Re: Can this program be improved?Scott Lurndal
|   |         |  | `* Re: Can this program be improved?Keith Thompson
|   |         |  |  +* Re: Can this program be improved?Malcolm McLean
|   |         |  |  |+* Re: Can this program be improved?Kenny McCormack
|   |         |  |  ||`* Re: Can this program be improved?Malcolm McLean
|   |         |  |  || `- Re: Can this program be improved?Kenny McCormack
|   |         |  |  |+- Re: Can this program be improved?David Brown
|   |         |  |  |`* Re: Can this program be improved?Keith Thompson
|   |         |  |  | `* Re: Can this program be improved?Malcolm McLean
|   |         |  |  |  +- Re: Can this program be improved?Öö Tiib
|   |         |  |  |  +* Re: Can this program be improved?Mateusz Viste
|   |         |  |  |  |`* Re: Can this program be improved?Guillaume
|   |         |  |  |  | +* Re: Can this program be improved?Malcolm McLean
|   |         |  |  |  | |`* Re: Can this program be improved?Keith Thompson
|   |         |  |  |  | | +* Re: Can this program be improved?Malcolm McLean
|   |         |  |  |  | | |`* Re: Can this program be improved?Keith Thompson
|   |         |  |  |  | | | `- Re: Can this program be improved?Malcolm McLean
|   |         |  |  |  | | `- Re: Can this program be improved?Scott Lurndal
|   |         |  |  |  | `* Re: Can this program be improved?Bart
|   |         |  |  |  |  `* Re: Can this program be improved?Malcolm McLean
|   |         |  |  |  |   +* Re: Can this program be improved?Scott Lurndal
|   |         |  |  |  |   |`* Re: Can this program be improved?Malcolm McLean
|   |         |  |  |  |   | `- Re: Can this program be improved?Guillaume
|   |         |  |  |  |   `* Re: Can this program be improved?Bart
|   |         |  |  |  |    +- Re: Can this program be improved?Scott Lurndal
|   |         |  |  |  |    `- Re: Can this program be improved?Manfred
|   |         |  |  |  `* Re: Can this program be improved?David Brown
|   |         |  |  |   `* Re: Can this program be improved?Malcolm McLean
|   |         |  |  |    +* Re: Can this program be improved?David Brown
|   |         |  |  |    |`* Re: Can this program be improved?Malcolm McLean
|   |         |  |  |    | `* Re: Can this program be improved?David Brown
|   |         |  |  |    |  `- Re: Can this program be improved?Kenny McCormack
|   |         |  |  |    `- Re: Can this program be improved?Kenny McCormack
|   |         |  |  `- Re: Can this program be improved?Kenny McCormack
|   |         |  `* Re: Can this program be improved?Mateusz Viste
|   |         |   `* Re: Can this program be improved?Malcolm McLean
|   |         |    `* Re: Can this program be improved?David Brown
|   |         |     `* Re: Can this program be improved?Malcolm McLean
|   |         |      +* Re: Can this program be improved?Mateusz Viste
|   |         |      |+- Re: Can this program be improved?Bart
|   |         |      |`* Re: Can this program be improved?Malcolm McLean
|   |         |      | `* Re: Can this program be improved?Mateusz Viste
|   |         |      |  `- Re: Can this program be improved?Malcolm McLean
|   |         |      `* Re: Can this program be improved?Scott Lurndal
|   |         |       `- Re: Can this program be improved?Kenny McCormack
|   |         `- Re: Can this program be improved?Bart
|   `- Re: Can this program be improved?Kaz Kylheku
+* Re: Can this program be improved?Bart
|`- Re: Can this program be improved?Manu Raju
+* Re: Can this program be improved?Lew Pitcher
|+* Re: Can this program be improved?Öö Tiib
||+* Re: Can this program be improved?Lew Pitcher
|||`- Re: Can this program be improved?Öö Tiib
||`* Re: Can this program be improved?Chris M. Thomasson
|+* Re: Can this program be improved?Stefan Ram
|+- Re: Can this program be improved?Andrey Tarasevich
|`- Re: Can this program be improved?Manu Raju
+* Re: Can this program be improved?Tim Rentsch
+* Re: Can this program be improved?Malcolm McLean
`- Re: Can this program be improved?Lew Pitcher

Pages:12345
Re: Can this program be improved?

<sqvdhd$rup$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19807&group=comp.lang.c#19807

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (Bart)
Newsgroups: comp.lang.c
Subject: Re: Can this program be improved?
Date: Mon, 3 Jan 2022 17:59:09 +0000
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <sqvdhd$rup$1@dont-email.me>
References: <sq63mi$gom$1@dont-email.me> <sq6b3t$ce5$1@dont-email.me>
<sqi3p9$1bia$1@gioia.aioe.org> <sqi72e$q7e$1@dont-email.me>
<87sfub2g2t.fsf@nosuchdomain.example.com> <sqiprq$1kk$1@dont-email.me>
<87o84z2bsi.fsf@nosuchdomain.example.com> <sqj0mf$532$1@dont-email.me>
<sqkphm$p3g$1@gioia.aioe.org> <sqlpcn$3fa$1@dont-email.me>
<sqo2re$fdi$1@dont-email.me> <sqo5gl$tbl$1@dont-email.me>
<87v8z41efe.fsf@nosuchdomain.example.com> <sqo8mt$cmr$1@dont-email.me>
<87r19s13w2.fsf@nosuchdomain.example.com>
<9cca58b2-8310-45bb-98ac-4b71dc267a90n@googlegroups.com>
<87k0fj12r3.fsf@nosuchdomain.example.com>
<0858a55c-fdd7-4aa8-9c56-0ec3b04840f4n@googlegroups.com>
<squbob$2fh$1@gioia.aioe.org>
<89fa58c3-9456-4420-92a4-2595e517a450n@googlegroups.com>
<sqv7se$ath$1@dont-email.me>
<44a5e6a9-6aee-441e-95e5-43290f663353n@googlegroups.com>
<sqvci5$rqr$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 3 Jan 2022 17:59:09 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="26b793bf8e5a6d3d9dfe41f80f76bfa1";
logging-data="28633"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Xbyi5j0mX/08ivQgGOdUDZjDQx532UEY="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.4.1
Cancel-Lock: sha1:IeBUicJnrd6NBEF9c0E1cxQza44=
In-Reply-To: <sqvci5$rqr$1@gioia.aioe.org>
 by: Bart - Mon, 3 Jan 2022 17:59 UTC

On 03/01/2022 17:42, Mateusz Viste wrote:
> 2022-01-03 at 08:48 -0800, Malcolm McLean wrote:
>> The point is that hyperinfaltion is not just some remote theoretical
>> possibility. It could easily happen, given current policy. So
>> programmers need to be aware of this possibility and be prepared for
>> it.
>
> I believe you are very much mistaken. Programmers need not to worry
> about life, they only need to fullfill project requirements. THESE may
> or may not take into account real-life scenarios like the one you keep
> mentioning. Drafting project requirements is not a subject that matches
> this group's activity.

Unless it involves local accounting practices in rounding monetary amounts!

Meanwhile, float and double can represent monetary units up to about
1e38 or 1e308, but not to the nearest dollar or even cent when the sums
get big enough.

Re: Can this program be improved?

<P0HAJ.143568$7D4.141171@fx37.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19809&group=comp.lang.c#19809

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!newsreader4.netcologne.de!news.netcologne.de!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx37.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: Can this program be improved?
Newsgroups: comp.lang.c
References: <sq63mi$gom$1@dont-email.me> <87v8z41efe.fsf@nosuchdomain.example.com> <sqo8mt$cmr$1@dont-email.me> <87r19s13w2.fsf@nosuchdomain.example.com> <9cca58b2-8310-45bb-98ac-4b71dc267a90n@googlegroups.com> <87k0fj12r3.fsf@nosuchdomain.example.com> <0858a55c-fdd7-4aa8-9c56-0ec3b04840f4n@googlegroups.com> <squbob$2fh$1@gioia.aioe.org> <89fa58c3-9456-4420-92a4-2595e517a450n@googlegroups.com> <sqv7se$ath$1@dont-email.me> <44a5e6a9-6aee-441e-95e5-43290f663353n@googlegroups.com>
Lines: 12
Message-ID: <P0HAJ.143568$7D4.141171@fx37.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Mon, 03 Jan 2022 18:13:03 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Mon, 03 Jan 2022 18:13:03 GMT
X-Received-Bytes: 1560
 by: Scott Lurndal - Mon, 3 Jan 2022 18:13 UTC

Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
>On Monday, 3 January 2022 at 16:22:49 UTC, David Brown wrote:
>ted to know that hyperinflation has occurred).
>>
>> But please drop the politics. If you want to discuss fiscal policy in
>> some country, I am sure there are newsgroups suited to that

>The point is that hyperinfaltion is not just

No, the point is that this is not the proper venue for your political/economic
views. Please stop.

Re: Can this program be improved?

<7a1326dd-8d77-4c9c-997d-1004974f80b6n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19811&group=comp.lang.c#19811

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:ac8:5ec1:: with SMTP id s1mr41772931qtx.584.1641236978760;
Mon, 03 Jan 2022 11:09:38 -0800 (PST)
X-Received: by 2002:a05:620a:199f:: with SMTP id bm31mr31827993qkb.450.1641236978615;
Mon, 03 Jan 2022 11:09:38 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Mon, 3 Jan 2022 11:09:38 -0800 (PST)
In-Reply-To: <sqvci5$rqr$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23a8:400a:5601:3496:91dd:b83d:676c;
posting-account=Dz2zqgkAAADlK5MFu78bw3ab-BRFV4Qn
NNTP-Posting-Host: 2a00:23a8:400a:5601:3496:91dd:b83d:676c
References: <sq63mi$gom$1@dont-email.me> <sq6b3t$ce5$1@dont-email.me>
<sqi3p9$1bia$1@gioia.aioe.org> <sqi72e$q7e$1@dont-email.me>
<87sfub2g2t.fsf@nosuchdomain.example.com> <sqiprq$1kk$1@dont-email.me>
<87o84z2bsi.fsf@nosuchdomain.example.com> <sqj0mf$532$1@dont-email.me>
<sqkphm$p3g$1@gioia.aioe.org> <sqlpcn$3fa$1@dont-email.me>
<sqo2re$fdi$1@dont-email.me> <sqo5gl$tbl$1@dont-email.me> <87v8z41efe.fsf@nosuchdomain.example.com>
<sqo8mt$cmr$1@dont-email.me> <87r19s13w2.fsf@nosuchdomain.example.com>
<9cca58b2-8310-45bb-98ac-4b71dc267a90n@googlegroups.com> <87k0fj12r3.fsf@nosuchdomain.example.com>
<0858a55c-fdd7-4aa8-9c56-0ec3b04840f4n@googlegroups.com> <squbob$2fh$1@gioia.aioe.org>
<89fa58c3-9456-4420-92a4-2595e517a450n@googlegroups.com> <sqv7se$ath$1@dont-email.me>
<44a5e6a9-6aee-441e-95e5-43290f663353n@googlegroups.com> <sqvci5$rqr$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7a1326dd-8d77-4c9c-997d-1004974f80b6n@googlegroups.com>
Subject: Re: Can this program be improved?
From: malcolm....@gmail.com (Malcolm McLean)
Injection-Date: Mon, 03 Jan 2022 19:09:38 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 17
 by: Malcolm McLean - Mon, 3 Jan 2022 19:09 UTC

On Monday, 3 January 2022 at 17:42:40 UTC, Mateusz Viste wrote:
> 2022-01-03 at 08:48 -0800, Malcolm McLean wrote:
> > The point is that hyperinfaltion is not just some remote theoretical
> > possibility. It could easily happen, given current policy. So
> > programmers need to be aware of this possibility and be prepared for
> > it.
> I believe you are very much mistaken. Programmers need not to worry
> about life, they only need to fullfill project requirements. THESE may
> or may not take into account real-life scenarios like the one you keep
> mentioning. Drafting project requirements is not a subject that matches
> this group's activity.
>
You can take the view that you are just a code monkey. So if the instructions
say store the date as two digits, you store the date as two digits, and let other
people worry what happens when the date rolls round to year 2000.

But many programmers don't work in that type of environment.

Re: Can this program be improved?

<sqvivg$1db2$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19812&group=comp.lang.c#19812

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!aioe.org!299gYy2nqWB43X4cCBV6zg.user.46.165.242.75.POSTED!not-for-mail
From: mate...@xyz.invalid (Mateusz Viste)
Newsgroups: comp.lang.c
Subject: Re: Can this program be improved?
Date: Mon, 3 Jan 2022 20:32:00 +0100
Organization: . . .
Message-ID: <sqvivg$1db2$1@gioia.aioe.org>
References: <sq63mi$gom$1@dont-email.me>
<sq6b3t$ce5$1@dont-email.me>
<sqi3p9$1bia$1@gioia.aioe.org>
<sqi72e$q7e$1@dont-email.me>
<87sfub2g2t.fsf@nosuchdomain.example.com>
<sqiprq$1kk$1@dont-email.me>
<87o84z2bsi.fsf@nosuchdomain.example.com>
<sqj0mf$532$1@dont-email.me>
<sqkphm$p3g$1@gioia.aioe.org>
<sqlpcn$3fa$1@dont-email.me>
<sqo2re$fdi$1@dont-email.me>
<sqo5gl$tbl$1@dont-email.me>
<87v8z41efe.fsf@nosuchdomain.example.com>
<sqo8mt$cmr$1@dont-email.me>
<87r19s13w2.fsf@nosuchdomain.example.com>
<9cca58b2-8310-45bb-98ac-4b71dc267a90n@googlegroups.com>
<87k0fj12r3.fsf@nosuchdomain.example.com>
<0858a55c-fdd7-4aa8-9c56-0ec3b04840f4n@googlegroups.com>
<squbob$2fh$1@gioia.aioe.org>
<89fa58c3-9456-4420-92a4-2595e517a450n@googlegroups.com>
<sqv7se$ath$1@dont-email.me>
<44a5e6a9-6aee-441e-95e5-43290f663353n@googlegroups.com>
<sqvci5$rqr$1@gioia.aioe.org>
<7a1326dd-8d77-4c9c-997d-1004974f80b6n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="46434"; posting-host="299gYy2nqWB43X4cCBV6zg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Notice: Filtered by postfilter v. 0.9.2
 by: Mateusz Viste - Mon, 3 Jan 2022 19:32 UTC

2022-01-03 at 11:09 -0800, Malcolm McLean wrote:
> But many programmers don't work in that type of environment.

You mean these programmers that code up a financial application that
looses dollars here and there if the sums' too big, instead of
failing with a clear error message? Yes, I know the type. I try to
avoid having them in my teams.

Mateusz

Re: Can this program be improved?

<a7587ac1-8e4a-4f51-86db-e600bda698ebn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19814&group=comp.lang.c#19814

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:620a:38f:: with SMTP id q15mr32106227qkm.527.1641239932025;
Mon, 03 Jan 2022 11:58:52 -0800 (PST)
X-Received: by 2002:a05:622a:48e:: with SMTP id p14mr40714590qtx.553.1641239931884;
Mon, 03 Jan 2022 11:58:51 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Mon, 3 Jan 2022 11:58:51 -0800 (PST)
In-Reply-To: <sqvivg$1db2$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23a8:400a:5601:3496:91dd:b83d:676c;
posting-account=Dz2zqgkAAADlK5MFu78bw3ab-BRFV4Qn
NNTP-Posting-Host: 2a00:23a8:400a:5601:3496:91dd:b83d:676c
References: <sq63mi$gom$1@dont-email.me> <sq6b3t$ce5$1@dont-email.me>
<sqi3p9$1bia$1@gioia.aioe.org> <sqi72e$q7e$1@dont-email.me>
<87sfub2g2t.fsf@nosuchdomain.example.com> <sqiprq$1kk$1@dont-email.me>
<87o84z2bsi.fsf@nosuchdomain.example.com> <sqj0mf$532$1@dont-email.me>
<sqkphm$p3g$1@gioia.aioe.org> <sqlpcn$3fa$1@dont-email.me>
<sqo2re$fdi$1@dont-email.me> <sqo5gl$tbl$1@dont-email.me> <87v8z41efe.fsf@nosuchdomain.example.com>
<sqo8mt$cmr$1@dont-email.me> <87r19s13w2.fsf@nosuchdomain.example.com>
<9cca58b2-8310-45bb-98ac-4b71dc267a90n@googlegroups.com> <87k0fj12r3.fsf@nosuchdomain.example.com>
<0858a55c-fdd7-4aa8-9c56-0ec3b04840f4n@googlegroups.com> <squbob$2fh$1@gioia.aioe.org>
<89fa58c3-9456-4420-92a4-2595e517a450n@googlegroups.com> <sqv7se$ath$1@dont-email.me>
<44a5e6a9-6aee-441e-95e5-43290f663353n@googlegroups.com> <sqvci5$rqr$1@gioia.aioe.org>
<7a1326dd-8d77-4c9c-997d-1004974f80b6n@googlegroups.com> <sqvivg$1db2$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a7587ac1-8e4a-4f51-86db-e600bda698ebn@googlegroups.com>
Subject: Re: Can this program be improved?
From: malcolm....@gmail.com (Malcolm McLean)
Injection-Date: Mon, 03 Jan 2022 19:58:52 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 14
 by: Malcolm McLean - Mon, 3 Jan 2022 19:58 UTC

On Monday, 3 January 2022 at 19:32:12 UTC, Mateusz Viste wrote:
> 2022-01-03 at 11:09 -0800, Malcolm McLean wrote:
> > But many programmers don't work in that type of environment.
> You mean these programmers that code up a financial application that
> looses dollars here and there if the sums' too big, instead of
> failing with a clear error message? Yes, I know the type. I try to
> avoid having them in my teams.
>
I don't code programs that deal with amounts of money.

But I'd be extremely concerned about this. Basically you're taking the system
down if inflation creates a numeric overflow. That might be OK in some
situations, but for others, it could be a disaster. You buy a burger, and suddenly
all the tills go down because the day's takings have exceeded 63 bits. Not
a good look.

Re: Can this program be improved?

<sqvkte$2mc5d$1@news.xmission.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19815&group=comp.lang.c#19815

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gaze...@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.lang.c
Subject: Re: Can this program be improved?
Date: Mon, 3 Jan 2022 20:05:03 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <sqvkte$2mc5d$1@news.xmission.com>
References: <sq63mi$gom$1@dont-email.me> <sqv7se$ath$1@dont-email.me> <44a5e6a9-6aee-441e-95e5-43290f663353n@googlegroups.com> <P0HAJ.143568$7D4.141171@fx37.iad>
Injection-Date: Mon, 3 Jan 2022 20:05:03 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="2830509"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Mon, 3 Jan 2022 20:05 UTC

In article <P0HAJ.143568$7D4.141171@fx37.iad>,
Scott Lurndal <slp53@pacbell.net> wrote:
>Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
>>On Monday, 3 January 2022 at 16:22:49 UTC, David Brown wrote:
>>ted to know that hyperinflation has occurred).
>>>
>>> But please drop the politics. If you want to discuss fiscal policy in
>>> some country, I am sure there are newsgroups suited to that
>
>>The point is that hyperinfaltion is not just
>
>No, the point is that this is not the proper venue for your political/economic
>views. Please stop.
>

Why does it hurt you so much to see Malcolm's posts here?
Why is it so important - why is your little psyche so damaged - that you
feel the need to comment?

The motto of Usenet is: If you don't like something, just ignore it.
Pretend it didn't happen. It's the only way to keep your sanity.

P.S. And, you're about to do a "I know what I am, but what are you?"
routine at me, can it. This is a legitimate inquiry. I really want to
know how you got to be so damaged.

--
The motto of the GOP "base": You can't *be* a billionaire, but at least you
can vote like one.

Re: Can this program be improved?

<8735m41lwy.fsf@nosuchdomain.example.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19817&group=comp.lang.c#19817

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: Can this program be improved?
Date: Mon, 03 Jan 2022 14:42:21 -0800
Organization: None to speak of
Lines: 13
Message-ID: <8735m41lwy.fsf@nosuchdomain.example.com>
References: <sq63mi$gom$1@dont-email.me> <sq6b3t$ce5$1@dont-email.me>
<sqi3p9$1bia$1@gioia.aioe.org> <sqi72e$q7e$1@dont-email.me>
<87sfub2g2t.fsf@nosuchdomain.example.com> <sqiprq$1kk$1@dont-email.me>
<87o84z2bsi.fsf@nosuchdomain.example.com> <sqj0mf$532$1@dont-email.me>
<sqkphm$p3g$1@gioia.aioe.org> <sqlpcn$3fa$1@dont-email.me>
<sqo2re$fdi$1@dont-email.me> <sqo5gl$tbl$1@dont-email.me>
<87v8z41efe.fsf@nosuchdomain.example.com> <sqo8mt$cmr$1@dont-email.me>
<87r19s13w2.fsf@nosuchdomain.example.com>
<9cca58b2-8310-45bb-98ac-4b71dc267a90n@googlegroups.com>
<87k0fj12r3.fsf@nosuchdomain.example.com>
<0858a55c-fdd7-4aa8-9c56-0ec3b04840f4n@googlegroups.com>
<87bl0t1l05.fsf@nosuchdomain.example.com>
<f96e4ea3-3c52-4869-99c6-c0806621b40cn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: reader02.eternal-september.org; posting-host="4d837f920a8f89855f8c32a3a315cdd6";
logging-data="3238"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18JilXpN36ewy1lWwTbVwKE"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:e5aem/qp7QYB8yrk7/l3UXVOgb4=
sha1:K4yOyPEETFudL7VeoqQQi1n8BV4=
 by: Keith Thompson - Mon, 3 Jan 2022 22:42 UTC

Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
> On Monday, 3 January 2022 at 04:49:56 UTC, Keith Thompson wrote:
[...]
>> I won't discuss politics here.
>>
> When hamburgers [more politics]

Malcolm, knock it off.

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Philips
void Void(void) { Void(); } /* The recursive call of the void */

Re: Can this program be improved?

<b2918a53-acd6-4c46-9b58-6ac578bc055cn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19818&group=comp.lang.c#19818

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a37:b7c3:: with SMTP id h186mr31428164qkf.691.1641250361050;
Mon, 03 Jan 2022 14:52:41 -0800 (PST)
X-Received: by 2002:a37:5f04:: with SMTP id t4mr34170728qkb.190.1641250360926;
Mon, 03 Jan 2022 14:52:40 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Mon, 3 Jan 2022 14:52:40 -0800 (PST)
In-Reply-To: <8735m41lwy.fsf@nosuchdomain.example.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23a8:400a:5601:3496:91dd:b83d:676c;
posting-account=Dz2zqgkAAADlK5MFu78bw3ab-BRFV4Qn
NNTP-Posting-Host: 2a00:23a8:400a:5601:3496:91dd:b83d:676c
References: <sq63mi$gom$1@dont-email.me> <sq6b3t$ce5$1@dont-email.me>
<sqi3p9$1bia$1@gioia.aioe.org> <sqi72e$q7e$1@dont-email.me>
<87sfub2g2t.fsf@nosuchdomain.example.com> <sqiprq$1kk$1@dont-email.me>
<87o84z2bsi.fsf@nosuchdomain.example.com> <sqj0mf$532$1@dont-email.me>
<sqkphm$p3g$1@gioia.aioe.org> <sqlpcn$3fa$1@dont-email.me>
<sqo2re$fdi$1@dont-email.me> <sqo5gl$tbl$1@dont-email.me> <87v8z41efe.fsf@nosuchdomain.example.com>
<sqo8mt$cmr$1@dont-email.me> <87r19s13w2.fsf@nosuchdomain.example.com>
<9cca58b2-8310-45bb-98ac-4b71dc267a90n@googlegroups.com> <87k0fj12r3.fsf@nosuchdomain.example.com>
<0858a55c-fdd7-4aa8-9c56-0ec3b04840f4n@googlegroups.com> <87bl0t1l05.fsf@nosuchdomain.example.com>
<f96e4ea3-3c52-4869-99c6-c0806621b40cn@googlegroups.com> <8735m41lwy.fsf@nosuchdomain.example.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b2918a53-acd6-4c46-9b58-6ac578bc055cn@googlegroups.com>
Subject: Re: Can this program be improved?
From: malcolm....@gmail.com (Malcolm McLean)
Injection-Date: Mon, 03 Jan 2022 22:52:41 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 13
 by: Malcolm McLean - Mon, 3 Jan 2022 22:52 UTC

On Monday, 3 January 2022 at 22:42:32 UTC, Keith Thompson wrote:
> Malcolm McLean <malcolm.ar...@gmail.com> writes:
> > On Monday, 3 January 2022 at 04:49:56 UTC, Keith Thompson wrote:
> [...]
> >> I won't discuss politics here.
> >>
> > When hamburgers [more politics]
>
> Malcolm, knock it off.
>
Don't you see that that if you are discussing the representation of monetary
values, there are a few obvious things to consider? Whether they are real or
discrete is one. Another is range. What's the maximum value that we might
need to represent?

Re: Can this program be improved?

<sqvuqp$2mftp$1@news.xmission.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19819&group=comp.lang.c#19819

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gaze...@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.lang.c
Subject: Re: Can this program be improved?
Date: Mon, 3 Jan 2022 22:54:17 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <sqvuqp$2mftp$1@news.xmission.com>
References: <sq63mi$gom$1@dont-email.me> <87bl0t1l05.fsf@nosuchdomain.example.com> <f96e4ea3-3c52-4869-99c6-c0806621b40cn@googlegroups.com> <8735m41lwy.fsf@nosuchdomain.example.com>
Injection-Date: Mon, 3 Jan 2022 22:54:17 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="2834361"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Mon, 3 Jan 2022 22:54 UTC

In article <8735m41lwy.fsf@nosuchdomain.example.com>,
Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
>Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
>> On Monday, 3 January 2022 at 04:49:56 UTC, Keith Thompson wrote:
>[...]
>>> I won't discuss politics here.
>>>
>> When hamburgers [more politics]
>
>Malcolm, knock it off.

Keith...

Why so butt-hurt?

--
The randomly chosen signature file that would have appeared here is more than 4
lines long. As such, it violates one or more Usenet RFCs. In order to remain
in compliance with said RFCs, the actual sig can be found at the following URL:
http://user.xmission.com/~gazelle/Sigs/GodDelusion

Re: Can this program be improved?

<sqvv2q$2mftp$2@news.xmission.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19820&group=comp.lang.c#19820

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gaze...@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.lang.c
Subject: Re: Can this program be improved?
Date: Mon, 3 Jan 2022 22:58:34 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <sqvv2q$2mftp$2@news.xmission.com>
References: <sq63mi$gom$1@dont-email.me> <f96e4ea3-3c52-4869-99c6-c0806621b40cn@googlegroups.com> <8735m41lwy.fsf@nosuchdomain.example.com> <b2918a53-acd6-4c46-9b58-6ac578bc055cn@googlegroups.com>
Injection-Date: Mon, 3 Jan 2022 22:58:34 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="2834361"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Mon, 3 Jan 2022 22:58 UTC

In article <b2918a53-acd6-4c46-9b58-6ac578bc055cn@googlegroups.com>,
Malcolm McLean <malcolm.arthur.mclean@gmail.com> wrote:
>On Monday, 3 January 2022 at 22:42:32 UTC, Keith Thompson wrote:
>> Malcolm McLean <malcolm.ar...@gmail.com> writes:
>> > On Monday, 3 January 2022 at 04:49:56 UTC, Keith Thompson wrote:
>> [...]
>> >> I won't discuss politics here.
>> >>
>> > When hamburgers [more politics]
>>
>> Malcolm, knock it off.
>>
>Don't you see that that if you are discussing the representation of monetary
>values, there are a few obvious things to consider? Whether they are real or
>discrete is one. Another is range. What's the maximum value that we might
>need to represent?

Malcolm, ...

You probably would have been fine - and the Not-Cs would have just ignored
you - if you just hadn't used the B-word (*) in your first post in the
sub-thread. Unfortunately, this is an error from which you cannot recover.

(*) Biden

--
12% of Americans think that Joan of Arc was Noah's wife.

Re: Can this program be improved?

<sr007f$9oh$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19821&group=comp.lang.c#19821

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: Can this program be improved?
Date: Tue, 4 Jan 2022 00:18:06 +0100
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <sr007f$9oh$1@dont-email.me>
References: <sq63mi$gom$1@dont-email.me> <sq6b3t$ce5$1@dont-email.me>
<sqi3p9$1bia$1@gioia.aioe.org> <sqi72e$q7e$1@dont-email.me>
<87sfub2g2t.fsf@nosuchdomain.example.com> <sqiprq$1kk$1@dont-email.me>
<87o84z2bsi.fsf@nosuchdomain.example.com> <sqj0mf$532$1@dont-email.me>
<sqkphm$p3g$1@gioia.aioe.org> <sqlpcn$3fa$1@dont-email.me>
<sqo2re$fdi$1@dont-email.me> <sqo5gl$tbl$1@dont-email.me>
<87v8z41efe.fsf@nosuchdomain.example.com> <sqo8mt$cmr$1@dont-email.me>
<87r19s13w2.fsf@nosuchdomain.example.com>
<9cca58b2-8310-45bb-98ac-4b71dc267a90n@googlegroups.com>
<87k0fj12r3.fsf@nosuchdomain.example.com>
<0858a55c-fdd7-4aa8-9c56-0ec3b04840f4n@googlegroups.com>
<87bl0t1l05.fsf@nosuchdomain.example.com>
<f96e4ea3-3c52-4869-99c6-c0806621b40cn@googlegroups.com>
<8735m41lwy.fsf@nosuchdomain.example.com>
<b2918a53-acd6-4c46-9b58-6ac578bc055cn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 3 Jan 2022 23:18:07 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="e594315125adaab6d2a69711ab88b029";
logging-data="10001"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+zJhQuTO7TXETTIeHmTF2Vp/kihKryiuo="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:EbY6vOY943MyTLOOPb9g7xTtnXQ=
In-Reply-To: <b2918a53-acd6-4c46-9b58-6ac578bc055cn@googlegroups.com>
Content-Language: en-GB
 by: David Brown - Mon, 3 Jan 2022 23:18 UTC

On 03/01/2022 23:52, Malcolm McLean wrote:
> On Monday, 3 January 2022 at 22:42:32 UTC, Keith Thompson wrote:
>> Malcolm McLean <malcolm.ar...@gmail.com> writes:
>>> On Monday, 3 January 2022 at 04:49:56 UTC, Keith Thompson wrote:
>> [...]
>>>> I won't discuss politics here.
>>>>
>>> When hamburgers [more politics]
>>
>> Malcolm, knock it off.
>>
> Don't you see that that if you are discussing the representation of monetary
> values, there are a few obvious things to consider? Whether they are real or
> discrete is one. Another is range. What's the maximum value that we might
> need to represent?
>

You can discuss that without the politics. It is enough to note that
some countries have suffered hyperinflation so severe that 64-bit
integers would not be sufficient for currency, and leave it there. Let
those that are interested in the history (and that includes me) look it
up or discuss it elsewhere. Incorrect historical claims and wild
political conspiracy theories are of no use or interest here. Is it so
difficult for you to appreciate the difference?

Re: Can this program be improved?

<87y23wz9l9.fsf@nosuchdomain.example.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19822&group=comp.lang.c#19822

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: Can this program be improved?
Date: Mon, 03 Jan 2022 15:24:34 -0800
Organization: None to speak of
Lines: 28
Message-ID: <87y23wz9l9.fsf@nosuchdomain.example.com>
References: <sq63mi$gom$1@dont-email.me> <sqi3p9$1bia$1@gioia.aioe.org>
<sqi72e$q7e$1@dont-email.me> <87sfub2g2t.fsf@nosuchdomain.example.com>
<sqiprq$1kk$1@dont-email.me> <87o84z2bsi.fsf@nosuchdomain.example.com>
<sqj0mf$532$1@dont-email.me> <sqkphm$p3g$1@gioia.aioe.org>
<sqlpcn$3fa$1@dont-email.me> <sqo2re$fdi$1@dont-email.me>
<sqo5gl$tbl$1@dont-email.me> <87v8z41efe.fsf@nosuchdomain.example.com>
<sqo8mt$cmr$1@dont-email.me> <87r19s13w2.fsf@nosuchdomain.example.com>
<9cca58b2-8310-45bb-98ac-4b71dc267a90n@googlegroups.com>
<87k0fj12r3.fsf@nosuchdomain.example.com>
<0858a55c-fdd7-4aa8-9c56-0ec3b04840f4n@googlegroups.com>
<87bl0t1l05.fsf@nosuchdomain.example.com>
<f96e4ea3-3c52-4869-99c6-c0806621b40cn@googlegroups.com>
<8735m41lwy.fsf@nosuchdomain.example.com>
<b2918a53-acd6-4c46-9b58-6ac578bc055cn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: reader02.eternal-september.org; posting-host="b7c4ed9c2183a3b080a530a749104d95";
logging-data="2466"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19JVPjl2FKYIx2METixnvaD"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:wUUtme/1gzg0iZt/cPEAbG9L+eA=
sha1:BXJN+BwiJrJrAI4jTQoaLnFP/yA=
 by: Keith Thompson - Mon, 3 Jan 2022 23:24 UTC

Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
> On Monday, 3 January 2022 at 22:42:32 UTC, Keith Thompson wrote:
>> Malcolm McLean <malcolm.ar...@gmail.com> writes:
>> > On Monday, 3 January 2022 at 04:49:56 UTC, Keith Thompson wrote:
>> [...]
>> >> I won't discuss politics here.
>> >>
>> > When hamburgers [more politics]
>>
>> Malcolm, knock it off.
>>
> Don't you see that that if you are discussing the representation of monetary
> values, there are a few obvious things to consider? Whether they are real or
> discrete is one. Another is range. What's the maximum value that we might
> need to represent?

Of course I see that. And if you want to talk about how hyperinflation
and/or extremely large quantities might affect financial calculations.
If you assume an upper bound on a quantity, it's best to make that
assumption explicit.

It's your assertions that specific currently proposed policies will lead
to hyperinflation that are off-topic and annoying.

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Philips
void Void(void) { Void(); } /* The recursive call of the void */

Re: Can this program be improved?

<ff338dd2-a4fe-4b06-8b4a-e3622b666c9en@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19823&group=comp.lang.c#19823

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:6214:2aab:: with SMTP id js11mr43160006qvb.54.1641253419898;
Mon, 03 Jan 2022 15:43:39 -0800 (PST)
X-Received: by 2002:a05:6214:f27:: with SMTP id iw7mr43330841qvb.6.1641253419798;
Mon, 03 Jan 2022 15:43:39 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Mon, 3 Jan 2022 15:43:39 -0800 (PST)
In-Reply-To: <87y23wz9l9.fsf@nosuchdomain.example.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23a8:400a:5601:b145:3941:46c4:ac5e;
posting-account=Dz2zqgkAAADlK5MFu78bw3ab-BRFV4Qn
NNTP-Posting-Host: 2a00:23a8:400a:5601:b145:3941:46c4:ac5e
References: <sq63mi$gom$1@dont-email.me> <sqi3p9$1bia$1@gioia.aioe.org>
<sqi72e$q7e$1@dont-email.me> <87sfub2g2t.fsf@nosuchdomain.example.com>
<sqiprq$1kk$1@dont-email.me> <87o84z2bsi.fsf@nosuchdomain.example.com>
<sqj0mf$532$1@dont-email.me> <sqkphm$p3g$1@gioia.aioe.org>
<sqlpcn$3fa$1@dont-email.me> <sqo2re$fdi$1@dont-email.me> <sqo5gl$tbl$1@dont-email.me>
<87v8z41efe.fsf@nosuchdomain.example.com> <sqo8mt$cmr$1@dont-email.me>
<87r19s13w2.fsf@nosuchdomain.example.com> <9cca58b2-8310-45bb-98ac-4b71dc267a90n@googlegroups.com>
<87k0fj12r3.fsf@nosuchdomain.example.com> <0858a55c-fdd7-4aa8-9c56-0ec3b04840f4n@googlegroups.com>
<87bl0t1l05.fsf@nosuchdomain.example.com> <f96e4ea3-3c52-4869-99c6-c0806621b40cn@googlegroups.com>
<8735m41lwy.fsf@nosuchdomain.example.com> <b2918a53-acd6-4c46-9b58-6ac578bc055cn@googlegroups.com>
<87y23wz9l9.fsf@nosuchdomain.example.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ff338dd2-a4fe-4b06-8b4a-e3622b666c9en@googlegroups.com>
Subject: Re: Can this program be improved?
From: malcolm....@gmail.com (Malcolm McLean)
Injection-Date: Mon, 03 Jan 2022 23:43:39 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 49
 by: Malcolm McLean - Mon, 3 Jan 2022 23:43 UTC

On Monday, 3 January 2022 at 23:24:46 UTC, Keith Thompson wrote:
> Malcolm McLean <malcolm.ar...@gmail.com> writes:
> > On Monday, 3 January 2022 at 22:42:32 UTC, Keith Thompson wrote:
> >> Malcolm McLean <malcolm.ar...@gmail.com> writes:
> >> > On Monday, 3 January 2022 at 04:49:56 UTC, Keith Thompson wrote:
> >> [...]
> >> >> I won't discuss politics here.
> >> >>
> >> > When hamburgers [more politics]
> >>
> >> Malcolm, knock it off.
> >>
> > Don't you see that that if you are discussing the representation of monetary
> > values, there are a few obvious things to consider? Whether they are real or
> > discrete is one. Another is range. What's the maximum value that we might
> > need to represent?
> Of course I see that. And if you want to talk about how hyperinflation
> and/or extremely large quantities might affect financial calculations.
> If you assume an upper bound on a quantity, it's best to make that
> assumption explicit.
>
Maybe not. If we assume that a hamburger costs about a dollar in today's money,
in Weimar Germany the mark got up to 4 trillion to the dollar before being
abandoned. So clearly we need to plan for a burger costing at least 4 trillion
dollars. But how high could it go? Very hard to answer. But a double will handle
values of up to 10^308. It's hard to see even hyperinflation getting that high
before the monetary system totally collapses. So we're probably safe as far
as range is concerned with a double.
A double also has 53 bits of precision. that allows values of up to about 10^16
to be represented exactly. That's 10^14 is we store values in cents. So is that
enough? That's a much harder call. If you are dealing with hamburger joints,
then you can have quite a bit of inflation before you fail to be able to represent
as many hamburgers as you could reasonably sell. Then you start dropping
cents. But by the time you start dropping cents, the cent will be a notional unit
of currency. All the coins will have been melted down for metal. So is 53 bits
enough? I don't write programs that deal withh amounts of money, so I don't
really know.
However if I had to choose a C type, I'd probably go for integer representation
of amounts in cents, using a double.
>
> It's your assertions that specific currently proposed policies will lead
> to hyperinflation that are off-topic and annoying.
>
As far as C programmers are concerned, the question is, is hyperinflation
something that happened in Weimar Germany back in the olden days,
and could never happen in the modern US. Or is it a real and present
danger. Is this something we should be thinking about?

If you ask some qualified people, I think you'll find that they are extremely
worried.

Re: Can this program be improved?

<e147a8dd-97fe-445b-86f2-fe23a9a10642n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19824&group=comp.lang.c#19824

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:6214:d05:: with SMTP id 5mr44157210qvh.46.1641273556057;
Mon, 03 Jan 2022 21:19:16 -0800 (PST)
X-Received: by 2002:ac8:5b90:: with SMTP id a16mr43440527qta.300.1641273555921;
Mon, 03 Jan 2022 21:19:15 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Mon, 3 Jan 2022 21:19:15 -0800 (PST)
In-Reply-To: <ff338dd2-a4fe-4b06-8b4a-e3622b666c9en@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=94.246.251.164; posting-account=pysjKgkAAACLegAdYDFznkqjgx_7vlUK
NNTP-Posting-Host: 94.246.251.164
References: <sq63mi$gom$1@dont-email.me> <sqi3p9$1bia$1@gioia.aioe.org>
<sqi72e$q7e$1@dont-email.me> <87sfub2g2t.fsf@nosuchdomain.example.com>
<sqiprq$1kk$1@dont-email.me> <87o84z2bsi.fsf@nosuchdomain.example.com>
<sqj0mf$532$1@dont-email.me> <sqkphm$p3g$1@gioia.aioe.org>
<sqlpcn$3fa$1@dont-email.me> <sqo2re$fdi$1@dont-email.me> <sqo5gl$tbl$1@dont-email.me>
<87v8z41efe.fsf@nosuchdomain.example.com> <sqo8mt$cmr$1@dont-email.me>
<87r19s13w2.fsf@nosuchdomain.example.com> <9cca58b2-8310-45bb-98ac-4b71dc267a90n@googlegroups.com>
<87k0fj12r3.fsf@nosuchdomain.example.com> <0858a55c-fdd7-4aa8-9c56-0ec3b04840f4n@googlegroups.com>
<87bl0t1l05.fsf@nosuchdomain.example.com> <f96e4ea3-3c52-4869-99c6-c0806621b40cn@googlegroups.com>
<8735m41lwy.fsf@nosuchdomain.example.com> <b2918a53-acd6-4c46-9b58-6ac578bc055cn@googlegroups.com>
<87y23wz9l9.fsf@nosuchdomain.example.com> <ff338dd2-a4fe-4b06-8b4a-e3622b666c9en@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e147a8dd-97fe-445b-86f2-fe23a9a10642n@googlegroups.com>
Subject: Re: Can this program be improved?
From: oot...@hot.ee (Öö Tiib)
Injection-Date: Tue, 04 Jan 2022 05:19:16 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 72
 by: Öö Tiib - Tue, 4 Jan 2022 05:19 UTC

On Tuesday, 4 January 2022 at 01:43:46 UTC+2, Malcolm McLean wrote:
> On Monday, 3 January 2022 at 23:24:46 UTC, Keith Thompson wrote:
> > Malcolm McLean <malcolm.ar...@gmail.com> writes:
> > > On Monday, 3 January 2022 at 22:42:32 UTC, Keith Thompson wrote:
> > >> Malcolm McLean <malcolm.ar...@gmail.com> writes:
> > >> > On Monday, 3 January 2022 at 04:49:56 UTC, Keith Thompson wrote:
> > >> [...]
> > >> >> I won't discuss politics here.
> > >> >>
> > >> > When hamburgers [more politics]
> > >>
> > >> Malcolm, knock it off.
> > >>
> > > Don't you see that that if you are discussing the representation of monetary
> > > values, there are a few obvious things to consider? Whether they are real or
> > > discrete is one. Another is range. What's the maximum value that we might
> > > need to represent?
> > Of course I see that. And if you want to talk about how hyperinflation
> > and/or extremely large quantities might affect financial calculations.
> > If you assume an upper bound on a quantity, it's best to make that
> > assumption explicit.
> >
> Maybe not. If we assume that a hamburger costs about a dollar in today's money,
> in Weimar Germany the mark got up to 4 trillion to the dollar before being
> abandoned. So clearly we need to plan for a burger costing at least 4 trillion
> dollars. But how high could it go? Very hard to answer. But a double will handle
> values of up to 10^308. It's hard to see even hyperinflation getting that high
> before the monetary system totally collapses. So we're probably safe as far
> as range is concerned with a double.
> A double also has 53 bits of precision. that allows values of up to about 10^16
> to be represented exactly. That's 10^14 is we store values in cents. So is that
> enough? That's a much harder call. If you are dealing with hamburger joints,
> then you can have quite a bit of inflation before you fail to be able to represent
> as many hamburgers as you could reasonably sell. Then you start dropping
> cents. But by the time you start dropping cents, the cent will be a notional unit
> of currency. All the coins will have been melted down for metal. So is 53 bits
> enough? I don't write programs that deal withh amounts of money, so I don't
> really know.
> However if I had to choose a C type, I'd probably go for integer representation
> of amounts in cents, using a double.
> >
> > It's your assertions that specific currently proposed policies will lead
> > to hyperinflation that are off-topic and annoying.
> >
> As far as C programmers are concerned, the question is, is hyperinflation
> something that happened in Weimar Germany back in the olden days,
> and could never happen in the modern US. Or is it a real and present
> danger. Is this something we should be thinking about?
>
> If you ask some qualified people, I think you'll find that they are extremely
> worried.

In every successful project where I've participated several things about its
data and functionality were illogical. Properties of records were misplaced,
not belonging to that record, having inadequate value ranges, duplicated
but not synchronized in other records, some crucial information was missing
and had to be figured by strange heuristics and so on. Modules did things
that these were not supposed to do or left things not done these were
supposed to do. Often such issues were known and cursed at but left
there and sometimes even some new such weirdness were added.

It is not because engineers participating deserved to be called code monkeys.
Infallible people are available nowhere. So perfect is worst enemy of good.
Who tries to make perfect things with usual fallible people right away
gets nothing done. Meanwhile software that is made good enough for
subset of its purposes will be used and improved over time. So it brings
profit right now.

One day part of that profit can be invested back to inevitable huge work
of replacing the Euros in it to German Goldens or whatever and it will be
done. Who can predict if there will be need for it and when and what will
it cost? It will be stuck in inability to proceed:
<https://en.wikipedia.org/wiki/Analysis_paralysis> No profit.

Re: Can this program be improved?

<sr1058$1thv$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19827&group=comp.lang.c#19827

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!aioe.org!299gYy2nqWB43X4cCBV6zg.user.46.165.242.75.POSTED!not-for-mail
From: mate...@xyz.invalid (Mateusz Viste)
Newsgroups: comp.lang.c
Subject: Re: Can this program be improved?
Date: Tue, 4 Jan 2022 09:23:04 +0100
Organization: . . .
Message-ID: <sr1058$1thv$1@gioia.aioe.org>
References: <sq63mi$gom$1@dont-email.me>
<sqi3p9$1bia$1@gioia.aioe.org>
<sqi72e$q7e$1@dont-email.me>
<87sfub2g2t.fsf@nosuchdomain.example.com>
<sqiprq$1kk$1@dont-email.me>
<87o84z2bsi.fsf@nosuchdomain.example.com>
<sqj0mf$532$1@dont-email.me>
<sqkphm$p3g$1@gioia.aioe.org>
<sqlpcn$3fa$1@dont-email.me>
<sqo2re$fdi$1@dont-email.me>
<sqo5gl$tbl$1@dont-email.me>
<87v8z41efe.fsf@nosuchdomain.example.com>
<sqo8mt$cmr$1@dont-email.me>
<87r19s13w2.fsf@nosuchdomain.example.com>
<9cca58b2-8310-45bb-98ac-4b71dc267a90n@googlegroups.com>
<87k0fj12r3.fsf@nosuchdomain.example.com>
<0858a55c-fdd7-4aa8-9c56-0ec3b04840f4n@googlegroups.com>
<87bl0t1l05.fsf@nosuchdomain.example.com>
<f96e4ea3-3c52-4869-99c6-c0806621b40cn@googlegroups.com>
<8735m41lwy.fsf@nosuchdomain.example.com>
<b2918a53-acd6-4c46-9b58-6ac578bc055cn@googlegroups.com>
<87y23wz9l9.fsf@nosuchdomain.example.com>
<ff338dd2-a4fe-4b06-8b4a-e3622b666c9en@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="63039"; posting-host="299gYy2nqWB43X4cCBV6zg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Notice: Filtered by postfilter v. 0.9.2
 by: Mateusz Viste - Tue, 4 Jan 2022 08:23 UTC

2022-01-03 at 15:43 -0800, Malcolm McLean wrote:
> will have been melted down for metal. So is 53 bits enough? I don't
> write programs that deal withh amounts of money, so I don't really
> know. However if I had to choose a C type, I'd probably go for
> integer representation of amounts in cents, using a double.

A double is nice to represent not-100%-precise fractional units,
it really does not have its place in any kind of financial
program, esp. if the goal is storing cents anyway.

A probably sane approach could be not to store the numbers at
all, but rely entirely on the database engine for handling and storing
them, while the C program would only process strings. The rationale
here would be that if the database cannot store the numbers properly,
then you are screwed anyway. Also, you could upgrade/fix the database
in the future without having to touch the program.
PostgreSQL has a nice "numeric" type that could be well suited for the
job at hand.

Alternatively, use uint64_t or _uint128_t if you really have to crunch
the numbers yourself. These types are proper integers that have well
defined boundaries and are easy to manipulate.

In any case, introducing doubles in such system will lead to entirely
new classes of problems, since even doing seemingly trivial math with
doubles can easily become a man-hour consuming trap.

> As far as C programmers are concerned, the question is, is
> hyperinflation something that happened in Weimar Germany back in the
> olden days, and could never happen in the modern US.

Again, not something that "C programmers" should be concerned with.
Unless you mean some kind of indie programmer that is at the same time
a financial expert, businessman and salesman, ie. a one-man-do-it-all
startup guy. But this guy won't have time for drafting apocalyptic
scenarios in his program, he will have to deliver something basic yet
efficient and appealing and sell it quickly if he wants to survive. Any
other scenario will include specifications written by someone that
knows what he's doing, ie. a domain expert.

Mateusz

Re: Can this program be improved?

<sr10lv$i2t$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19828&group=comp.lang.c#19828

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: Can this program be improved?
Date: Tue, 4 Jan 2022 09:31:58 +0100
Organization: A noiseless patient Spider
Lines: 87
Message-ID: <sr10lv$i2t$1@dont-email.me>
References: <sq63mi$gom$1@dont-email.me> <sqi3p9$1bia$1@gioia.aioe.org>
<sqi72e$q7e$1@dont-email.me> <87sfub2g2t.fsf@nosuchdomain.example.com>
<sqiprq$1kk$1@dont-email.me> <87o84z2bsi.fsf@nosuchdomain.example.com>
<sqj0mf$532$1@dont-email.me> <sqkphm$p3g$1@gioia.aioe.org>
<sqlpcn$3fa$1@dont-email.me> <sqo2re$fdi$1@dont-email.me>
<sqo5gl$tbl$1@dont-email.me> <87v8z41efe.fsf@nosuchdomain.example.com>
<sqo8mt$cmr$1@dont-email.me> <87r19s13w2.fsf@nosuchdomain.example.com>
<9cca58b2-8310-45bb-98ac-4b71dc267a90n@googlegroups.com>
<87k0fj12r3.fsf@nosuchdomain.example.com>
<0858a55c-fdd7-4aa8-9c56-0ec3b04840f4n@googlegroups.com>
<87bl0t1l05.fsf@nosuchdomain.example.com>
<f96e4ea3-3c52-4869-99c6-c0806621b40cn@googlegroups.com>
<8735m41lwy.fsf@nosuchdomain.example.com>
<b2918a53-acd6-4c46-9b58-6ac578bc055cn@googlegroups.com>
<87y23wz9l9.fsf@nosuchdomain.example.com>
<ff338dd2-a4fe-4b06-8b4a-e3622b666c9en@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 4 Jan 2022 08:31:59 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="fc87d414cbeeeed4e72dfea558807b05";
logging-data="18525"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/uqdXspc4tno4EaiWKOdnJHRuXbSRet8U="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:F7fE5kQzOuP4NFHyL3Tf5hXDyhk=
In-Reply-To: <ff338dd2-a4fe-4b06-8b4a-e3622b666c9en@googlegroups.com>
Content-Language: en-GB
 by: David Brown - Tue, 4 Jan 2022 08:31 UTC

On 04/01/2022 00:43, Malcolm McLean wrote:
> On Monday, 3 January 2022 at 23:24:46 UTC, Keith Thompson wrote:
>> Malcolm McLean <malcolm.ar...@gmail.com> writes:
>>> On Monday, 3 January 2022 at 22:42:32 UTC, Keith Thompson wrote:
>>>> Malcolm McLean <malcolm.ar...@gmail.com> writes:
>>>>> On Monday, 3 January 2022 at 04:49:56 UTC, Keith Thompson wrote:
>>>> [...]
>>>>>> I won't discuss politics here.
>>>>>>
>>>>> When hamburgers [more politics]
>>>>
>>>> Malcolm, knock it off.
>>>>
>>> Don't you see that that if you are discussing the representation of monetary
>>> values, there are a few obvious things to consider? Whether they are real or
>>> discrete is one. Another is range. What's the maximum value that we might
>>> need to represent?
>> Of course I see that. And if you want to talk about how hyperinflation
>> and/or extremely large quantities might affect financial calculations.
>> If you assume an upper bound on a quantity, it's best to make that
>> assumption explicit.
>>
> Maybe not. If we assume that a hamburger costs about a dollar in today's money,
> in Weimar Germany the mark got up to 4 trillion to the dollar before being
> abandoned. So clearly we need to plan for a burger costing at least 4 trillion
> dollars. But how high could it go? Very hard to answer. But a double will handle
> values of up to 10^308. It's hard to see even hyperinflation getting that high
> before the monetary system totally collapses. So we're probably safe as far
> as range is concerned with a double.
> A double also has 53 bits of precision. that allows values of up to about 10^16
> to be represented exactly. That's 10^14 is we store values in cents. So is that
> enough? That's a much harder call. If you are dealing with hamburger joints,
> then you can have quite a bit of inflation before you fail to be able to represent
> as many hamburgers as you could reasonably sell. Then you start dropping
> cents. But by the time you start dropping cents, the cent will be a notional unit
> of currency. All the coins will have been melted down for metal. So is 53 bits
> enough? I don't write programs that deal withh amounts of money, so I don't
> really know.
> However if I had to choose a C type, I'd probably go for integer representation
> of amounts in cents, using a double.

If you are writing a simple example or test program, use whatever type
suits. If you are writing a single-purpose or single-user program, use
whatever type suits. These would be integer types if you want to store
integer cents (or pennies, or whatever), or doubles if you want to make
it easy to do interest rate calculations. This will be fine to tell you
the values involved - and the real legal tracking of money will be done
by banks and accountants using software that follows the required rules.

If you are writing a serious program, you find the rules for the
jurisdictions that are relevant. You don't make guesses based on vague
memories of school-time history classes or think "cents is good enough".
In some places, the rules involved are much more demanding - I know
that for some currencies, you need to track six digits after the decimal
point.

>>
>> It's your assertions that specific currently proposed policies will lead
>> to hyperinflation that are off-topic and annoying.
>>
> As far as C programmers are concerned, the question is, is hyperinflation
> something that happened in Weimar Germany back in the olden days,
> and could never happen in the modern US. Or is it a real and present
> danger. Is this something we should be thinking about?
>

No, it is not something you need to think about as a C programmer. You
write the code you need - and for an example program like the OP's, it
doesn't need any connection to reality. On the other hand, if you want
to write serious financial software, you follow the rules required - you
don't invent them.

> If you ask some qualified people, I think you'll find that they are extremely
> worried.
>

Could modern economies spiral into hyperinflation? Of course it is
possible. We've seen it before, worse and more recently than the Weimar
Republic. If you want to learn about and discuss this, find an
appropriate place to do so rather than mixing limited historical points
with paranoid conspiracy theories in a programming group. Or perhaps
find a qualified person and ask them, to put your mind at ease. Just be
sure to look for that qualified person in an appropriate place - not
comp.lang.c, and not some Facebook post by your Auntie's neighbour's
friend whose dad is a janitor in a bank so he should know.

Re: Can this program be improved?

<2a287c23-ad75-45e8-befc-a8fdcdf19853n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19830&group=comp.lang.c#19830

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:6214:2349:: with SMTP id hu9mr74587qvb.93.1641288658832;
Tue, 04 Jan 2022 01:30:58 -0800 (PST)
X-Received: by 2002:a37:6113:: with SMTP id v19mr34622024qkb.333.1641288658694;
Tue, 04 Jan 2022 01:30:58 -0800 (PST)
Path: i2pn2.org!rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Tue, 4 Jan 2022 01:30:58 -0800 (PST)
In-Reply-To: <sr10lv$i2t$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23a8:400a:5601:61ce:ca02:706e:9e9a;
posting-account=Dz2zqgkAAADlK5MFu78bw3ab-BRFV4Qn
NNTP-Posting-Host: 2a00:23a8:400a:5601:61ce:ca02:706e:9e9a
References: <sq63mi$gom$1@dont-email.me> <sqi3p9$1bia$1@gioia.aioe.org>
<sqi72e$q7e$1@dont-email.me> <87sfub2g2t.fsf@nosuchdomain.example.com>
<sqiprq$1kk$1@dont-email.me> <87o84z2bsi.fsf@nosuchdomain.example.com>
<sqj0mf$532$1@dont-email.me> <sqkphm$p3g$1@gioia.aioe.org>
<sqlpcn$3fa$1@dont-email.me> <sqo2re$fdi$1@dont-email.me> <sqo5gl$tbl$1@dont-email.me>
<87v8z41efe.fsf@nosuchdomain.example.com> <sqo8mt$cmr$1@dont-email.me>
<87r19s13w2.fsf@nosuchdomain.example.com> <9cca58b2-8310-45bb-98ac-4b71dc267a90n@googlegroups.com>
<87k0fj12r3.fsf@nosuchdomain.example.com> <0858a55c-fdd7-4aa8-9c56-0ec3b04840f4n@googlegroups.com>
<87bl0t1l05.fsf@nosuchdomain.example.com> <f96e4ea3-3c52-4869-99c6-c0806621b40cn@googlegroups.com>
<8735m41lwy.fsf@nosuchdomain.example.com> <b2918a53-acd6-4c46-9b58-6ac578bc055cn@googlegroups.com>
<87y23wz9l9.fsf@nosuchdomain.example.com> <ff338dd2-a4fe-4b06-8b4a-e3622b666c9en@googlegroups.com>
<sr10lv$i2t$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2a287c23-ad75-45e8-befc-a8fdcdf19853n@googlegroups.com>
Subject: Re: Can this program be improved?
From: malcolm....@gmail.com (Malcolm McLean)
Injection-Date: Tue, 04 Jan 2022 09:30:58 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 40
 by: Malcolm McLean - Tue, 4 Jan 2022 09:30 UTC

On Tuesday, 4 January 2022 at 08:32:11 UTC, David Brown wrote:
> On 04/01/2022 00:43, Malcolm McLean wrote:
>
> > As far as C programmers are concerned, the question is, is hyperinflation
> > something that happened in Weimar Germany back in the olden days,
> > and could never happen in the modern US. Or is it a real and present
> > danger. Is this something we should be thinking about?
> >
> No, it is not something you need to think about as a C programmer. You
> write the code you need - and for an example program like the OP's, it
> doesn't need any connection to reality. On the other hand, if you want
> to write serious financial software, you follow the rules required - you
> don't invent them.
>
So you are also thinking like a code monkey. A code monkey is not a "bad
programmer". It's a model of development in which the programmer is as
far as possible de-skilled. So if the instructions say "store the date as
two digits", he is meant to store the date as two digits. It's not his job to
raise the question of what happens when we roll over to year 2000 with
his superiors. He's just the coder.
> > If you ask some qualified people, I think you'll find that they are extremely
> > worried.
> >
> Could modern economies spiral into hyperinflation? Of course it is
> possible. We've seen it before, worse and more recently than the Weimar
> Republic. If you want to learn about and discuss this, find an
> appropriate place to do so rather than mixing limited historical points
> with paranoid conspiracy theories in a programming group. Or perhaps
> find a qualified person and ask them, to put your mind at ease. Just be
> sure to look for that qualified person in an appropriate place - not
> comp.lang.c, and not some Facebook post by your Auntie's neighbour's
> friend whose dad is a janitor in a bank so he should know.
>
A conspiracy theory alleges that there is some secret plot to, in this
case, hyperinflate the currency. You don't have to believe that. Policy
that is a matter of public record is enough. We've seen hyperinflation in
places like Zimbabwe and Venuzuela, but not in an advanced, major
Western economy since Weimar. The partial exception is Israel in the
1980s, but it didn't have a hard currency at the time in the 1980s
(I believe). However that is going too far off topic.

Re: Can this program be improved?

<9f5ceaf1-e9b6-4c0c-82c8-bfd437049565n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19832&group=comp.lang.c#19832

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:6214:400e:: with SMTP id kd14mr46263867qvb.68.1641299236234;
Tue, 04 Jan 2022 04:27:16 -0800 (PST)
X-Received: by 2002:ac8:59cc:: with SMTP id f12mr45241242qtf.580.1641299236093;
Tue, 04 Jan 2022 04:27:16 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Tue, 4 Jan 2022 04:27:15 -0800 (PST)
In-Reply-To: <sqvv2q$2mftp$2@news.xmission.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23a8:400a:5601:1c55:7c30:ff94:4dab;
posting-account=Dz2zqgkAAADlK5MFu78bw3ab-BRFV4Qn
NNTP-Posting-Host: 2a00:23a8:400a:5601:1c55:7c30:ff94:4dab
References: <sq63mi$gom$1@dont-email.me> <f96e4ea3-3c52-4869-99c6-c0806621b40cn@googlegroups.com>
<8735m41lwy.fsf@nosuchdomain.example.com> <b2918a53-acd6-4c46-9b58-6ac578bc055cn@googlegroups.com>
<sqvv2q$2mftp$2@news.xmission.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9f5ceaf1-e9b6-4c0c-82c8-bfd437049565n@googlegroups.com>
Subject: Re: Can this program be improved?
From: malcolm....@gmail.com (Malcolm McLean)
Injection-Date: Tue, 04 Jan 2022 12:27:16 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 25
 by: Malcolm McLean - Tue, 4 Jan 2022 12:27 UTC

On Monday, 3 January 2022 at 22:58:43 UTC, Kenny McCormack wrote:
> In article <b2918a53-acd6-4c46...@googlegroups.com>,
> Malcolm McLean <malcolm.ar...@gmail.com> wrote:
> >On Monday, 3 January 2022 at 22:42:32 UTC, Keith Thompson wrote:
> >> Malcolm McLean <malcolm.ar...@gmail.com> writes:
> >> > On Monday, 3 January 2022 at 04:49:56 UTC, Keith Thompson wrote:
> >> [...]
> >> >> I won't discuss politics here.
> >> >>
> >> > When hamburgers [more politics]
> >>
> >> Malcolm, knock it off.
> >>
> >Don't you see that that if you are discussing the representation of monetary
> >values, there are a few obvious things to consider? Whether they are real or
> >discrete is one. Another is range. What's the maximum value that we might
> >need to represent?
> Malcolm, ...
>
> You probably would have been fine - and the Not-Cs would have just ignored
> you - if you just hadn't used the B-word (*) in your first post in the
> sub-thread. Unfortunately, this is an error from which you cannot recover.
>
> (*) Biden
>
The poor man. Imagine mention of your name causing such angst.

Re: Can this program be improved?

<sr1ime$2na2l$1@news.xmission.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19833&group=comp.lang.c#19833

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gaze...@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.lang.c
Subject: Re: Can this program be improved?
Date: Tue, 4 Jan 2022 13:39:26 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <sr1ime$2na2l$1@news.xmission.com>
References: <sq63mi$gom$1@dont-email.me> <b2918a53-acd6-4c46-9b58-6ac578bc055cn@googlegroups.com> <sqvv2q$2mftp$2@news.xmission.com> <9f5ceaf1-e9b6-4c0c-82c8-bfd437049565n@googlegroups.com>
Injection-Date: Tue, 4 Jan 2022 13:39:26 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="2861141"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Tue, 4 Jan 2022 13:39 UTC

In article <9f5ceaf1-e9b6-4c0c-82c8-bfd437049565n@googlegroups.com>,
Malcolm McLean <malcolm.arthur.mclean@gmail.com> wrote:
....
>The poor man. Imagine mention of his name causing such angst.

You're talking about poor Keith, right?

Yes, Keith has his, shall we say, issues...

--

Prayer has no place in the public schools, just like facts
have no place in organized religion.
-- Superintendent Chalmers

Re: Can this program be improved?

<sr1jk6$j9s$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19834&group=comp.lang.c#19834

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: Can this program be improved?
Date: Tue, 4 Jan 2022 14:55:17 +0100
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <sr1jk6$j9s$1@dont-email.me>
References: <sq63mi$gom$1@dont-email.me> <sqi72e$q7e$1@dont-email.me>
<87sfub2g2t.fsf@nosuchdomain.example.com> <sqiprq$1kk$1@dont-email.me>
<87o84z2bsi.fsf@nosuchdomain.example.com> <sqj0mf$532$1@dont-email.me>
<sqkphm$p3g$1@gioia.aioe.org> <sqlpcn$3fa$1@dont-email.me>
<sqo2re$fdi$1@dont-email.me> <sqo5gl$tbl$1@dont-email.me>
<87v8z41efe.fsf@nosuchdomain.example.com> <sqo8mt$cmr$1@dont-email.me>
<87r19s13w2.fsf@nosuchdomain.example.com>
<9cca58b2-8310-45bb-98ac-4b71dc267a90n@googlegroups.com>
<87k0fj12r3.fsf@nosuchdomain.example.com>
<0858a55c-fdd7-4aa8-9c56-0ec3b04840f4n@googlegroups.com>
<87bl0t1l05.fsf@nosuchdomain.example.com>
<f96e4ea3-3c52-4869-99c6-c0806621b40cn@googlegroups.com>
<8735m41lwy.fsf@nosuchdomain.example.com>
<b2918a53-acd6-4c46-9b58-6ac578bc055cn@googlegroups.com>
<87y23wz9l9.fsf@nosuchdomain.example.com>
<ff338dd2-a4fe-4b06-8b4a-e3622b666c9en@googlegroups.com>
<sr10lv$i2t$1@dont-email.me>
<2a287c23-ad75-45e8-befc-a8fdcdf19853n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 4 Jan 2022 13:55:18 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="fc87d414cbeeeed4e72dfea558807b05";
logging-data="19772"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+EUJvxA9bPmXeOfaSAjDZX7ozwD7ipO/Q="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:SJ0jjOY03vCyUjWoJmWcn01ZmJk=
In-Reply-To: <2a287c23-ad75-45e8-befc-a8fdcdf19853n@googlegroups.com>
Content-Language: en-GB
 by: David Brown - Tue, 4 Jan 2022 13:55 UTC

On 04/01/2022 10:30, Malcolm McLean wrote:

There is a wise saying - when you are in a hole, stop digging. You are
giving bad advice, justifying it with outlandish and unrealistic
political gibberish and your own misunderstandings of what people do in
the world of software development.

If you were employed as a programmer and asked to develop software that
complied with the fiscal laws of a country, but decided to implement it
in a different way because of your fairyland political ideas, you'd be
out of a job.

If that's the way /you/ want to live, that's up to you. But please stop
suggesting such attitudes to others that might be new to the programming
world and misunderstand your postings as good advice.

> However that is going too far off topic.
>

So let that be an end of this thread, now that you have pulled it so far
away from anything related to C, to the OP's questions, or to any
on-topic diversions that came out of the thread.

Re: Can this program be improved?

<423486e6-52bf-46ec-81c8-38d9b778903fn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19835&group=comp.lang.c#19835

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:6214:21a6:: with SMTP id t6mr46525328qvc.24.1641306067005;
Tue, 04 Jan 2022 06:21:07 -0800 (PST)
X-Received: by 2002:a05:620a:4628:: with SMTP id br40mr35447252qkb.519.1641306066747;
Tue, 04 Jan 2022 06:21:06 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Tue, 4 Jan 2022 06:21:06 -0800 (PST)
In-Reply-To: <sr1jk6$j9s$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23a8:400a:5601:1c55:7c30:ff94:4dab;
posting-account=Dz2zqgkAAADlK5MFu78bw3ab-BRFV4Qn
NNTP-Posting-Host: 2a00:23a8:400a:5601:1c55:7c30:ff94:4dab
References: <sq63mi$gom$1@dont-email.me> <sqi72e$q7e$1@dont-email.me>
<87sfub2g2t.fsf@nosuchdomain.example.com> <sqiprq$1kk$1@dont-email.me>
<87o84z2bsi.fsf@nosuchdomain.example.com> <sqj0mf$532$1@dont-email.me>
<sqkphm$p3g$1@gioia.aioe.org> <sqlpcn$3fa$1@dont-email.me>
<sqo2re$fdi$1@dont-email.me> <sqo5gl$tbl$1@dont-email.me> <87v8z41efe.fsf@nosuchdomain.example.com>
<sqo8mt$cmr$1@dont-email.me> <87r19s13w2.fsf@nosuchdomain.example.com>
<9cca58b2-8310-45bb-98ac-4b71dc267a90n@googlegroups.com> <87k0fj12r3.fsf@nosuchdomain.example.com>
<0858a55c-fdd7-4aa8-9c56-0ec3b04840f4n@googlegroups.com> <87bl0t1l05.fsf@nosuchdomain.example.com>
<f96e4ea3-3c52-4869-99c6-c0806621b40cn@googlegroups.com> <8735m41lwy.fsf@nosuchdomain.example.com>
<b2918a53-acd6-4c46-9b58-6ac578bc055cn@googlegroups.com> <87y23wz9l9.fsf@nosuchdomain.example.com>
<ff338dd2-a4fe-4b06-8b4a-e3622b666c9en@googlegroups.com> <sr10lv$i2t$1@dont-email.me>
<2a287c23-ad75-45e8-befc-a8fdcdf19853n@googlegroups.com> <sr1jk6$j9s$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <423486e6-52bf-46ec-81c8-38d9b778903fn@googlegroups.com>
Subject: Re: Can this program be improved?
From: malcolm....@gmail.com (Malcolm McLean)
Injection-Date: Tue, 04 Jan 2022 14:21:07 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 44
 by: Malcolm McLean - Tue, 4 Jan 2022 14:21 UTC

On Tuesday, 4 January 2022 at 13:55:29 UTC, David Brown wrote:
> On 04/01/2022 10:30, Malcolm McLean wrote:
>
> There is a wise saying - when you are in a hole, stop digging. You are
> giving bad advice, justifying it with outlandish and unrealistic
> political gibberish and your own misunderstandings of what people do in
> the world of software development.
>
> If you were employed as a programmer and asked to develop software that
> complied with the fiscal laws of a country, but decided to implement it
> in a different way because of your fairyland political ideas, you'd be
> out of a job.
>
The code monkey asks what the instructions are, and follows them. That's
because he's a low level person with limited responsibilities.
The software engineer looks at the instructions, and asks if they will
fulfil the requirement of the project, or if there is some problem with them.
In this case, whether the representation he has been asked to use for
monetary values will cope with hyperinflation.
What action he then takes depends on the status of the instructions, who
issued them, if there is a standard procedure for raising defect reports,
and, crucially, whether he believes that the scenario in which the instructions
will fail is a likely one and of importance to the project, or very far-fetched.

Engineering requires intelligence.
>
> If that's the way /you/ want to live, that's up to you. But please stop
> suggesting such attitudes to others that might be new to the programming
> world and misunderstand your postings as good advice.
>
Some people are happy with your model of development. It does have something
to be said for it. But it's not a professional attitude.
>
> > However that is going too far off topic.
> >
> So let that be an end of this thread, now that you have pulled it so far
> away from anything related to C, to the OP's questions, or to any
> on-topic diversions that came out of the thread.
>
I've kept very closely related to C at all times. Most useful programs deal with
things in the outside world. So if you are writing a C program which isn't
something that is purely computational, you need to discuss that thing.
In this case we are discussing money and how to represent it.

Keith leapt on the "B word" for his own reasons.

Re: Can this program be improved?

<sr1nkf$2nc7j$1@news.xmission.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19836&group=comp.lang.c#19836

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gaze...@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.lang.c
Subject: Re: Can this program be improved?
Date: Tue, 4 Jan 2022 15:03:43 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <sr1nkf$2nc7j$1@news.xmission.com>
References: <sq63mi$gom$1@dont-email.me> <ff338dd2-a4fe-4b06-8b4a-e3622b666c9en@googlegroups.com> <sr10lv$i2t$1@dont-email.me> <2a287c23-ad75-45e8-befc-a8fdcdf19853n@googlegroups.com>
Injection-Date: Tue, 4 Jan 2022 15:03:43 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="2863347"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Tue, 4 Jan 2022 15:03 UTC

In article <2a287c23-ad75-45e8-befc-a8fdcdf19853n@googlegroups.com>,
Malcolm McLean <malcolm.arthur.mclean@gmail.com> wrote:
....
>A conspiracy theory alleges that there is some secret plot to, in this
>case, hyperinflate the currency. You don't have to believe that. Policy
>that is a matter of public record is enough. We've seen hyperinflation in
>places like Zimbabwe and Venuzuela, but not in an advanced, major Western
>economy since Weimar. The partial exception is Israel in the 1980s, but
>it didn't have a hard currency at the time in the 1980s (I believe).
>However that is going too far off topic.

In the 21st century, the term "conspiracy theory" has lost all meaning -
not that it really had any in the first place.

In the 21st century, it just means "Any political idea that I don't like".

That is the sense in which the other idiot (the one to whom you were
responding) meant it.

--
This is the GOP's problem. When you're at the beginning of the year
and you've got nine Democrats running for the nomination, maybe one or
two of them are Dennis Kucinich. When you have nine Republicans, seven
or eight of them are Michelle Bachmann.

Re: Can this program be improved?

<sr1qat$60c$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19838&group=comp.lang.c#19838

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: Can this program be improved?
Date: Tue, 4 Jan 2022 16:49:48 +0100
Organization: A noiseless patient Spider
Lines: 7
Message-ID: <sr1qat$60c$1@dont-email.me>
References: <sq63mi$gom$1@dont-email.me> <sqiprq$1kk$1@dont-email.me>
<87o84z2bsi.fsf@nosuchdomain.example.com> <sqj0mf$532$1@dont-email.me>
<sqkphm$p3g$1@gioia.aioe.org> <sqlpcn$3fa$1@dont-email.me>
<sqo2re$fdi$1@dont-email.me> <sqo5gl$tbl$1@dont-email.me>
<87v8z41efe.fsf@nosuchdomain.example.com> <sqo8mt$cmr$1@dont-email.me>
<87r19s13w2.fsf@nosuchdomain.example.com>
<9cca58b2-8310-45bb-98ac-4b71dc267a90n@googlegroups.com>
<87k0fj12r3.fsf@nosuchdomain.example.com>
<0858a55c-fdd7-4aa8-9c56-0ec3b04840f4n@googlegroups.com>
<87bl0t1l05.fsf@nosuchdomain.example.com>
<f96e4ea3-3c52-4869-99c6-c0806621b40cn@googlegroups.com>
<8735m41lwy.fsf@nosuchdomain.example.com>
<b2918a53-acd6-4c46-9b58-6ac578bc055cn@googlegroups.com>
<87y23wz9l9.fsf@nosuchdomain.example.com>
<ff338dd2-a4fe-4b06-8b4a-e3622b666c9en@googlegroups.com>
<sr10lv$i2t$1@dont-email.me>
<2a287c23-ad75-45e8-befc-a8fdcdf19853n@googlegroups.com>
<sr1jk6$j9s$1@dont-email.me>
<423486e6-52bf-46ec-81c8-38d9b778903fn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 4 Jan 2022 15:49:49 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="fc87d414cbeeeed4e72dfea558807b05";
logging-data="6156"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19sDW4AGK6o4cDu9iL8/HORTB9hBzRXZR8="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:DNEsYkUpOjabrj162jY7ezJziXo=
In-Reply-To: <423486e6-52bf-46ec-81c8-38d9b778903fn@googlegroups.com>
Content-Language: en-GB
 by: David Brown - Tue, 4 Jan 2022 15:49 UTC

On 04/01/2022 15:21, Malcolm McLean wrote:

<snip>

You've moved beyond off-topic posts into bad excuses and poorly-veiled
insults. Please leave it. If you feel there is something worth
discussing, my email address is valid.

Re: Can this program be improved?

<sr1qob$2ndji$1@news.xmission.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19840&group=comp.lang.c#19840

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gaze...@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.lang.c
Subject: Re: Can this program be improved?
Date: Tue, 4 Jan 2022 15:56:59 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <sr1qob$2ndji$1@news.xmission.com>
References: <sq63mi$gom$1@dont-email.me> <sr1jk6$j9s$1@dont-email.me> <423486e6-52bf-46ec-81c8-38d9b778903fn@googlegroups.com> <sr1qat$60c$1@dont-email.me>
Injection-Date: Tue, 4 Jan 2022 15:56:59 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="2864754"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Tue, 4 Jan 2022 15:56 UTC

In article <sr1qat$60c$1@dont-email.me>,
David Brown <david.brown@hesbynett.no> wrote:
>On 04/01/2022 15:21, Malcolm McLean wrote:
>
><snip>
>
>You've moved beyond off-topic posts into bad excuses and poorly-veiled
>insults. Please leave it. If you feel there is something worth
>discussing, my email address is valid.

Why you so butt-hurt by this?

--
The randomly chosen signature file that would have appeared here is more than 4
lines long. As such, it violates one or more Usenet RFCs. In order to remain
in compliance with said RFCs, the actual sig can be found at the following URL:
http://user.xmission.com/~gazelle/Sigs/Mandela

Re: Can this program be improved?

<sr1vgu$u1j$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19842&group=comp.lang.c#19842

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!aioe.org!UgLt14+w9tVHe1BtIa3HDQ.user.46.165.242.75.POSTED!not-for-mail
From: mess...@bottle.org (Guillaume)
Newsgroups: comp.lang.c
Subject: Re: Can this program be improved?
Date: Tue, 4 Jan 2022 18:18:15 +0100
Organization: Aioe.org NNTP Server
Message-ID: <sr1vgu$u1j$1@gioia.aioe.org>
References: <sq63mi$gom$1@dont-email.me> <sqi3p9$1bia$1@gioia.aioe.org>
<sqi72e$q7e$1@dont-email.me> <87sfub2g2t.fsf@nosuchdomain.example.com>
<sqiprq$1kk$1@dont-email.me> <87o84z2bsi.fsf@nosuchdomain.example.com>
<sqj0mf$532$1@dont-email.me> <sqkphm$p3g$1@gioia.aioe.org>
<sqlpcn$3fa$1@dont-email.me> <sqo2re$fdi$1@dont-email.me>
<sqo5gl$tbl$1@dont-email.me> <87v8z41efe.fsf@nosuchdomain.example.com>
<sqo8mt$cmr$1@dont-email.me> <87r19s13w2.fsf@nosuchdomain.example.com>
<9cca58b2-8310-45bb-98ac-4b71dc267a90n@googlegroups.com>
<87k0fj12r3.fsf@nosuchdomain.example.com>
<0858a55c-fdd7-4aa8-9c56-0ec3b04840f4n@googlegroups.com>
<87bl0t1l05.fsf@nosuchdomain.example.com>
<f96e4ea3-3c52-4869-99c6-c0806621b40cn@googlegroups.com>
<8735m41lwy.fsf@nosuchdomain.example.com>
<b2918a53-acd6-4c46-9b58-6ac578bc055cn@googlegroups.com>
<87y23wz9l9.fsf@nosuchdomain.example.com>
<ff338dd2-a4fe-4b06-8b4a-e3622b666c9en@googlegroups.com>
<sr1058$1thv$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="30771"; posting-host="UgLt14+w9tVHe1BtIa3HDQ.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.4.1
Content-Language: fr
X-Notice: Filtered by postfilter v. 0.9.2
 by: Guillaume - Tue, 4 Jan 2022 17:18 UTC

Le 04/01/2022 à 09:23, Mateusz Viste a écrit :
> 2022-01-03 at 15:43 -0800, Malcolm McLean wrote:
>> will have been melted down for metal. So is 53 bits enough? I don't
>> write programs that deal withh amounts of money, so I don't really
>> know. However if I had to choose a C type, I'd probably go for
>> integer representation of amounts in cents, using a double.
>
> A double is nice to represent not-100%-precise fractional units,
> it really does not have its place in any kind of financial
> program, esp. if the goal is storing cents anyway.

Absolutely. Using FP for financial calculations is for people who don't
know arithmetics. Maybe teaching some math (again) to CS students would
help, here? :)

At the very least, if you absolutely want to use FP for this, at least
use decimal FP. Although it can still have precision issues due to its
floating point nature, at least rounding will not yield gross errors.

And if you're OK with using integers, but are afraid fixed-size ones (at
least 64 bits) could be an unacceptable limit down the road, just use
arbitrary precision arithmetic. And you don't need to hand-implement
that, unless it's your thing. GNU GMP is great.

One of the many problems with FP can be easily shown. Apart from the
usual unability to represent some numbers exactly, they also have an
inherent problem when, for instance, adding very small numbers to very
large ones.

Of course if all you do is writing "toy programs", use whatever. But
somehow, if this is a student work, I would have a problem with calling
student exercises "toy programs". That would certainly give them the
wrong idea about how to do things properly. If they once used FP for
financial operations, even on a small exercise, how can you know they
won't do the same later on at work when having to write code dealing
with financial calculations?

Pages:12345
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor