Article View: comp.lang.c
Article #1123Re: .5 against 0.5f
From: Steven G. Kargl
Date: Thu, 29 Oct 2026 17:57
Date: Thu, 29 Oct 2026 17:57
43 lines
3249 bytes
3249 bytes
On Thu, 29 Oct 2026 11:56:38 -0400, James Kuyper wrote: > On 2026-10-28 21:50, Steven G. Kargl wrote: >> On Wed, 28 Oct 2026 17:59:19 -0700, Tim Rentsch wrote: >> >>> "Steven G. Kargl" <sgk@REMOVEtroutmask.apl.washington.edu> writes: >>> >>>> On Wed, 28 Oct 2026 16:39:00 -0700, Keith Thompson wrote: >>>> >>>>> (Also, you misspelled "ROFL", and you don't need parentheses on the >>>>> return statement, particularly if you dislike fluff.) >>>> >>>> Yeah, I was laugh too hard while typing ;-) >>>> >>>> Parentheses is a habit from BSD kernel source file style guide. >>> >>> Now is a good time to start unlearning that habit. >> >> Why? What harm do the parentheses cause? > > They can lead to people thinking that return is a function, even if they > nominally know better. What would you think of > > return (a=b).retval; > > You might never write such code, and might never read it either, but you > should have no trouble parsing it. Do you? Never written nor seen such a line of code. Of course, a random line of code taken out of context may have many interpretations or no interpretation at all. I likely know less than 25% of what C can do as I am primarily interested in only C23 7.12 and Annex F and G. I do find it interesting that in a newgroup purportedly concerned with discussions about the C programming language, I seem to have been the only person in this thread to show a complete self-contained piece of code so fir can see the consequences of not understanding floating point arithmetic. -- steve
Technical Details
Message-ID:
<11c01dq$3i9lv$1@dont-email.me>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<11bpvs7$1e6kc$2@dont-email.me> <11bqnvh$1np7s$1@dont-email.me> <11br5td$1to7l$1@dont-email.me> <11br792$1u7e5$1@dont-email.me> <11brgqf$21170$2@dont-email.me> <11brkco$21oj5$1@dont-email.me> <11bs4tj$26daj$1@dont-email.me> <11bs613$26knh$1@dont-email.me> <11bt7ff$2i0ag$1@dont-email.me> <11btm2a$2ojn1$2@kst.eternal-september.org> <11bttrp$2qvg6$1@dont-email.me> <11bu12l$2rgo2$4@kst.eternal-september.org> <11bu3kk$2svh8$1@dont-email.me> <868q3hmie0.fsf@linuxsc.com> <11bu8oi$2up7m$1@dont-email.me> <11bvqbn$3g0tj$1@dont-email.me>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: "Steven G. Kargl" <sgk@REMOVEtroutmask.apl.washington.edu> Newsgroups: comp.lang.c Subject: Re: .5 against 0.5f Date: Thu, 29 Oct 2026 17:57:15 -0000 (UTC) Organization: A noiseless patient Spider Lines: 43 Message-ID: <11c01dq$3i9lv$1@dont-email.me> References: <11bpvs7$1e6kc$2@dont-email.me> <11bqnvh$1np7s$1@dont-email.me> <11br5td$1to7l$1@dont-email.me> <11br792$1u7e5$1@dont-email.me> <11brgqf$21170$2@dont-email.me> <11brkco$21oj5$1@dont-email.me> <11bs4tj$26daj$1@dont-email.me> <11bs613$26knh$1@dont-email.me> <11bt7ff$2i0ag$1@dont-email.me> <11btm2a$2ojn1$2@kst.eternal-september.org> <11bttrp$2qvg6$1@dont-email.me> <11bu12l$2rgo2$4@kst.eternal-september.org> <11bu3kk$2svh8$1@dont-email.me> <868q3hmie0.fsf@linuxsc.com> <11bu8oi$2up7m$1@dont-email.me> <11bvqbn$3g0tj$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Thu, 29 Oct 2026 17:57:16 +0000 (UTC) Injection-Info: dont-email.me; logging-data="3745471"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18QWoMKXXbJ5fx1cP0pGnfU"; posting-host="2fbc5a448a494db3f6503e992b4305d2" User-Agent: Pan/0.164 (Kupiansk) Cancel-Lock: sha1:KeV4Alap5uf0uJSTqjmtGRtOO9Q= sha256:frIOj8cDxlWxMDbffVS4k5h8pBwTbSSdteICMsx9hGM= sha1:robrAGykkD8DVFmG1ndH4rIBiA0= sha256:C59MnxYWFxUZZB93sUhQFhqxXtd0XNgeagxxdJzj8cE=