Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #126449
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: What happened to short float? |
| Date | 2018-02-08 10:18 -0800 |
| Organization | None to speak of |
| Message-ID | <lnpo5fxs3o.fsf@kst-u.example.com> (permalink) |
| References | (2 earlier) <p52ngk$evf$1@dont-email.me> <fdr6e4Fp1fcU1@mid.individual.net> <20180208012936.09fa549ce0fe0785da7cf560@gmail.com> <lnk1voz46u.fsf@kst-u.example.com> <ca738dea-8d44-4650-8a25-d67d44bdff2c@googlegroups.com> |
jameskuyper@verizon.net writes:
> On Wednesday, February 7, 2018 at 8:00:05 PM UTC-5, Keith Thompson wrote:
>> GOTHIER Nathan <nathan.gothier@gmail.com> writes:
>> > On Mon, 5 Feb 2018 08:55:00 -0500
>> > Tim Prince <tprince@intelretiree.com> wrote:
>> >> On 2/2/2018 5:08 PM, jacobnavia wrote:
>> >> Perhaps there is little more to say. The format has little attraction
>> >> for portable code, as many platforms can't implement it efficiently.
>> >
>> > Any IEEE 754 compliant hardware that supports the float type (aka single
>> > precision float) would be able to support the short float type (i.e.
>> > less or equal to single precision float).
>>
>> Wouldn't you need extra code to convert between 16-bit and 32-bit
>> formats? For normal values you'd need to do some bit-twiddling.
>> Special values like infinities, NaNs, subnormals, and so forth might
>> require some extra work (I haven't looked into the details).
>
> I'd expect that the characteristics of a new short float type would be
> specified in the same way as they are for float, double, and long
> double. The requirements in 5.2.4.2.2 on the numeric characteristics of
> floating point types set either maximum values, or minimum values, or
> minimums on the magnitude of the values - so there's nothing preventing
> float, for instance, from being an 80-bit floating point type. The same
> would therefore also be true of short float. I'd expect at least some
> implementations targeting a platform with no hardware support for a
> 16-bit type to use a 32-bit floating point type for short float.
>
> I've just reviewed the proposal, and it doesn't go into such details.
N2016 4.1 does say:
Or, the platform may choose to not take any advantages of short
float and represent it using float in both memory and registers.
("using the same representation as float" would be more precise.)
My comments still apply, but only to implementations that implement
short float as a 16-bit type (more generally as a type narrower than
float).
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar
Re: What happened to short float? jacobnavia <jacob@jacob.remcomp.fr> - 2018-02-02 23:08 +0100
Re: What happened to short float? Jakob Bohm <jb-usenet@wisemo.com> - 2018-02-05 07:57 +0100
Re: What happened to short float? jameskuyper@verizon.net - 2018-02-05 05:31 -0800
Re: What happened to short float? Tim Prince <tprince@intelretiree.com> - 2018-02-05 08:55 -0500
Re: What happened to short float? jacobnavia <jacob@jacob.remcomp.fr> - 2018-02-05 15:46 +0100
Re: What happened to short float? GOTHIER Nathan <nathan.gothier@gmail.com> - 2018-02-08 01:29 +0100
Re: What happened to short float? Keith Thompson <kst-u@mib.org> - 2018-02-07 16:59 -0800
Re: What happened to short float? Philipp Klaus Krause <pkk@spth.de> - 2018-02-08 09:08 +0100
Re: What happened to short float? Keith Thompson <kst-u@mib.org> - 2018-02-08 09:27 -0800
Re: What happened to short float? GOTHIER Nathan <nathan.gothier@gmail.com> - 2018-02-08 09:54 +0100
Re: What happened to short float? Keith Thompson <kst-u@mib.org> - 2018-02-08 10:13 -0800
Re: What happened to short float? jameskuyper@verizon.net - 2018-02-08 06:36 -0800
Re: What happened to short float? GOTHIER Nathan <nathan.gothier@gmail.com> - 2018-02-08 17:04 +0100
Re: What happened to short float? jameskuyper@verizon.net - 2018-02-08 08:56 -0800
Re: What happened to short float? scott@slp53.sl.home (Scott Lurndal) - 2018-02-08 17:23 +0000
Re: What happened to short float? GOTHIER Nathan <nathan.gothier@gmail.com> - 2018-02-08 18:52 +0100
Re: What happened to short float? jameskuyper@verizon.net - 2018-02-08 11:27 -0800
Re: What happened to short float? GOTHIER Nathan <nathan.gothier@gmail.com> - 2018-02-08 22:58 +0100
Re: What happened to short float? Keith Thompson <kst-u@mib.org> - 2018-02-08 10:18 -0800
Re: What happened to short float? Jakob Bohm <jb-usenet@wisemo.com> - 2018-02-08 18:59 +0100
Re: What happened to short float? Robert Wessel <robertwessel2@yahoo.com> - 2018-02-08 16:22 -0600
Re: What happened to short float? Jakob Bohm <jb-usenet@wisemo.com> - 2018-02-09 15:01 +0100
csiph-web