Path: csiph.com!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.std.c Subject: Re: short float Date: Wed, 09 Dec 2020 13:09:51 -0800 Organization: None to speak of Lines: 32 Message-ID: <87eejyeleo.fsf@nosuchdomain.example.com> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="f016ac0a3d65355605abd8d495a1e07a"; logging-data="20973"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18t1+Rr2pKdlRJ38/u6Qqvo" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cancel-Lock: sha1:p0Bow3hArvLEjffgjptMMLthRos= sha1:A/YdU/KW088Ubo9I+3TqN3tm5XA= Xref: csiph.com comp.std.c:6194 Dave Brower writes: > On Monday, October 28, 2019 at 3:58:08 AM UTC-7, Philipp Klaus Krause wrote: >> While the idea of a short float was viewed favorably by the comitee a >> few years ago, in London, the authors never followed up with a detailed >> proposal. >> >> I'd like to see short float in C, not just because a lot of hardware >> supports it, but also as a relatively efficient floating-point type for >> devices that don't have hardware support for floating-point at all: >> >> http://www.colecovision.eu/stuff/proposal-short-float.html > > Just stumbled on this. If there are OpenGL unsigned floats, why not > have 'unsigned short float' as a thing, with 'short float' as a signed > type? > > (Yes, I know it's a year later). This: https://www.khronos.org/opengl/wiki/Data_Type_(GLSL) does not indicate that OpenGL has unsigned floats. I found a reference to 10- and 11-bit unsigned floating-point types, but I get the impression that they're not language-defined types. https://www.oreilly.com/library/view/opengl-programming-guide/9780132748445/app07lev1sec3.html C would not be able to support a type whose size is not a multiple of CHAR_BIT (bit fields notwithstanding). -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com Working, but not speaking, for Philips Healthcare void Void(void) { Void(); } /* The recursive call of the void */