🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.bugs.sys5
Article #254

using "cb" causes problems with floating-point numbers

#254
From: Mike Nemeth
Date: Tue, 11 Dec 1990 02:23
25 lines
960 bytes
% cat a.c
#include <stdio.h>
main() { float a; a = 10e-3; printf("a = %f\n", a); }
% cc -o a a.c
% ./a
a = 0.010000
% cb -s < a.c > b.c
% cat b.c
#include <stdio.h>
main()
{
	float a;

	a = 10e - 3;	/* <--- !!! */
	printf("a = %f\n", a);
}
% cc -o b b.c
% ./b
a = 7.000000
%

-- 
On the advice of council, I must respectfully decline to confirm any
of the above. Perhaps it was a glitch. Perhaps you are hallucinating.
   >-> Mike Nemeth     Vort Computing   ...calgary!vort!mike <-<
Technical Details
Message-ID: <1990Dec11.022300.313@vort.uucp>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!van-bc!ubc-cs!alberta!cpsc.ucalgary.ca!vort!mike

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!van-bc!ubc-cs!alberta!cpsc.ucalgary.ca!vort!mike
From: mike@vort.uucp (Mike Nemeth)
Newsgroups: comp.bugs.sys5,comp.unix.sysv386
Subject: using "cb" causes problems with floating-point numbers
Message-ID: <1990Dec11.022300.313@vort.uucp>
Date: 11 Dec 90 02:23:00 GMT
Distribution: na
Organization: VORT Computing, Calgary, Alberta, Canada
Lines: 25