🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.linux.advocacy
Article #878

Re: Back To CS Basics. Fuck AI

#878
From: Charlie Gibbs
Date: Fri, 16 Oct 2026 18:10
39 lines
2564 bytes
On 2026-10-16, Leroy H <lh@somewhere.net> wrote:

> On Fri, 16 Oct 2026 17:10:18 GMT, Jan Panteltje wrote:
>
>> I have written financial software in C.
>> What is the problem?
>
> That depends on the scale.
>
> For most situations, the currency amounts are enough that the
> C double type, with 16 decimal digits of precision, can handle
> the simple processing without error.

Now that 64-bit ints are available, you could use them
in many situations.

> (C also has a 128-bit long double type but ordinary processors
> have no hardware for this type.  On GNU/Linux the long double
> is usually defined as 80-bits.)
>
> But for large currency amounts and more complex processing,
> 16 decimal digits may not be enough.  That's why decimal floating
> point is recommended or even required by law.
>
> What is needed is HARDWARE decimal FP.  IBM has always had decimal
> FP hardware in its mainframes

FSVO "always".  But the original 360 had packed decimal, which
can work with up to 31 decimal digits.  I wrote a lot of business
software in those days; I can count the number of times I've used
floating point on the fingers of one hand.  For basic accounting,
integer pennies are enough.  Add a few guard digits if you must.
To quote the old commercial, it "takes the worry out of being close".

-- 
/~\  Charlie Gibbs                  |  In this world there are
\ /  <cgibbs@kltpzyxm.invalid>      |  two kinds of people:
 X   I'm really at ac.dekanfrus     |  1. Those who can extrapolate
/ \  if you read it the right way.  |  from incomplete data.
Technical Details
Message-ID: <2MtAS.183747$iS_f.119536@fx06.iad>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx06.iad.POSTED!not-for-mail
References: <18dee4b6cab427fa$865$2574533$802601b3@news.usenetexpress.com> <11atgth$3e59h$1@dont-email.me> <18df0ea174d534e0$1613$2650862$802601b3@news.usenetexpress.com> <11atlpr$3g55c$1@dont-email.me> <18df1430054d96d0$1624$2650862$802601b3@news.usenetexpress.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx06.iad.POSTED!not-for-mail
Newsgroups: comp.os.linux.misc,comp.os.linux.advocacy
From: Charlie Gibbs <cgibbs@kltpzyxm.invalid>
Subject: Re: Back To CS Basics. Fuck AI
References: <18dee4b6cab427fa$865$2574533$802601b3@news.usenetexpress.com>
 <11atgth$3e59h$1@dont-email.me>
 <18df0ea174d534e0$1613$2650862$802601b3@news.usenetexpress.com>
 <11atlpr$3g55c$1@dont-email.me>
 <18df1430054d96d0$1624$2650862$802601b3@news.usenetexpress.com>
User-Agent: slrn/1.0.3 (Linux)
Lines: 39
Message-ID: <2MtAS.183747$iS_f.119536@fx06.iad>
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Fri, 16 Oct 2026 18:10:06 UTC
Date: Fri, 16 Oct 2026 18:10:06 GMT
X-Received-Bytes: 2292