🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Back To CS Basics. Fuck AI

#873
From: Leroy H
Date: Fri, 16 Oct 2026 03:26
89 lines
3303 bytes
It is amazing how knowledge of basic CS is absent in most
programmers, both professional and amateur alike.  While
"vibe coding" is all the rage, a silent disaster is also
creeping.

What GNU/Linux requires urgently is a Decimal Floating
Point library that implements IEEE754-2008, but mention this
to most programmers and one will receive only blank stares
and gaping mouths.

The only GNU/Linux project for IEEE754-2008 is closing
its doors:

<https://github.com/libdfp/libdfp/pull/238>

Disagree?

Compile and run the following C code (libdfp must be
installed) and check the results.  It merely adds
a small increment 10 million times:

[~]# ./fp-compare 10000000
Binary Expected: 100000.000000
Binary Got: 95680.945312

Decimal Expected: 100000.000000
Decimal Got: 100000.000000

Whew!  Using standard binary FP the result is in error
by TENS OF THOUSANDS!

GNU/Linux needs Decimal FP.

======================================
Begin C Code
(libdfp must be installed)
(link: https://github.com/libdfp/libdfp)
======================================

/*********************************************
gcc -std=gnu99 $CFLAGS -Wall -Wextra -I/usr/local/include/dfp -o fp-compare fp-compare.c -ldfp

./fp-compare 10000000

Compares an identical computation using both float and _Decimal32
variables.

**********************************************/

#define _GNU_SOURCE
#define __STDC_WANT_DEC_FP__
#include <fenv.h>
#include <math.h>
#include <stdlib.h>
#include <stdio.h>

int main(int argc, char **argv) {

_Decimal32 dec_meters, dec_inc, dec_iterations;
float bin_meters, bin_inc;
int i, iterations;

// set dec rounding mode to round half up
fe_dec_setround(FE_DEC_TONEARESTFROMZERO);

iterations = atoi(argv[1]);
dec_iterations = strtod32(argv[1],'\0');

dec_meters = 0.0DF;
bin_meters = 0.0;
dec_inc = 0.01DF;
bin_inc = 0.01;

for (i = 0; i < iterations; i++) {
 bin_meters = bin_meters + bin_inc;
 dec_meters = dec_meters + dec_inc;
}

fprintf(stdout, "Binary Expected: %f\n", bin_inc * (float)iterations);
fprintf(stdout, "Binary Got: %f\n\n", bin_meters);

fprintf(stdout, "Decimal Expected: %Hf\n", dec_inc * dec_iterations);
fprintf(stdout, "Decimal Got: %Hf\n", dec_meters);

}

================================
End C Code
================================
Technical Details
Message-ID: <18dee4b6cab427fa$865$2574533$802601b3@news.usenetexpress.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer04.iad!feed-me.highwinds-media.com!news.highwinds-media.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!news.usenetexpress.com!not-for-mail

Show Full Headers
Complete Article Headers
From: Leroy H <lh@somewhere.net>
Subject: Back To CS Basics. Fuck AI
Newsgroups: comp.os.linux.misc,comp.os.linux.advocacy
Followup-To: comp.os.linux.misc
Mime-Version: 1.0
User-Agent: Pan/0.165 (Kostiantynivka)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Lines: 89
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer04.iad!feed-me.highwinds-media.com!news.highwinds-media.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!news.usenetexpress.com!not-for-mail
Date: Fri, 16 Oct 2026 03:26:15 +0000
Nntp-Posting-Date: Fri, 16 Oct 2026 03:26:15 +0000
X-Complaints-To: abuse@usenetexpress.com
Organization: UsenetExpress - www.usenetexpress.com
Message-Id: <18dee4b6cab427fa$865$2574533$802601b3@news.usenetexpress.com>
X-Received-Bytes: 3043