Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #21827

Re: Decomposing a FLOAT

From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.c
Subject Re: Decomposing a FLOAT
Date 2012-06-04 12:20 -0700
Organization None to speak of
Message-ID <lnpq9eevec.fsf@nuthaus.mib.org> (permalink)
References (5 earlier) <pan.2012.06.02.19.41.09.107000@nowhere.com> <lnr4txfkhq.fsf@nuthaus.mib.org> <jqf676$9da$1@speranza.aioe.org> <ln396cf7oe.fsf@nuthaus.mib.org> <jqgn5f$ds7$1@speranza.aioe.org>

Show all headers | View raw


Raj Pashwar <raj121190@hotmail.NOSPAM.com> writes:
> On Sun, 03 Jun 2012 13:43:13 -0700, Keith Thompson wrote:
[...]
>> Out of curiosity, where exactly does this typedef (not "type-def")
>> appear?  Is it in a header for some particular application or library,
>> or is it really defined by your (operating) system?
>> 
>> FLOAT is a really bad name for a typedef.  Either it's a typedef for the
>> built-in type "float", in which case it's fairly useless, or it's a
>> typedef for something other than "float", in which case it's actively
>> misleading.
>> 
>> (The only reasonable justification I can think of is that FLOAT might be
>> used to implement a type in some other language.)
>
> Yes, it's in one of the headers.

Um, I asked "where exactly".

> I think the idea is: it gives flexibility to change between float (=small 
> size, low precision) or long double (=high size, high precision) or 
> double (=compromise) at a later stage, without needing to change all 
> definitions everywhere in code : only the typeDef needs changing.

That's a fine idea -- but FLOAT is a lousy name for it.

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
    Will write code for food.
"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 | Unroll thread


Thread

Decomposing a FLOAT Raj Pashwar <raj121190@hotmail.NOSPAM.com> - 2012-05-31 20:59 +0000
  Re: Decomposing a FLOAT "Steven G. Kargl" <sgk@REMOVEtroutmask.apl.washington.edu> - 2012-05-31 21:44 +0000
    Re: Decomposing a FLOAT Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-05-31 22:59 +0100
  Re: Decomposing a FLOAT Ike Naar <ike@iceland.freeshell.org> - 2012-05-31 22:04 +0000
  Re: Decomposing a FLOAT James Kuyper <jameskuyper@verizon.net> - 2012-05-31 18:57 -0400
    Re: Decomposing a FLOAT jgk@panix.com (Joe keane) - 2012-06-01 23:02 +0000
      Re: Decomposing a FLOAT Malcolm McLean <malcolm.mclean5@btinternet.com> - 2012-06-01 16:17 -0700
        Re: Decomposing a FLOAT James Kuyper <jameskuyper@verizon.net> - 2012-06-02 10:27 -0400
          Re: Decomposing a FLOAT Nobody <nobody@nowhere.com> - 2012-06-02 20:41 +0100
            Re: Decomposing a FLOAT Keith Thompson <kst-u@mib.org> - 2012-06-02 14:54 -0700
              Re: Decomposing a FLOAT Raj Pashwar <raj121190@hotmail.NOSPAM.com> - 2012-06-03 08:11 +0000
                Re: Decomposing a FLOAT Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-06-03 08:33 -0400
                Re: Decomposing a FLOAT Raj Pashwar <raj121190@hotmail.NOSPAM.com> - 2012-06-03 22:06 +0000
                Re: Decomposing a FLOAT Ian Collins <ian-news@hotmail.com> - 2012-06-04 10:28 +1200
                Re: Decomposing a FLOAT Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-06-03 19:46 -0400
                Re: Decomposing a FLOAT James Kuyper <jameskuyper@verizon.net> - 2012-06-03 08:51 -0400
                Re: Decomposing a FLOAT Malcolm McLean <malcolm.mclean5@btinternet.com> - 2012-06-03 07:48 -0700
                Re: Decomposing a FLOAT James Kuyper <jameskuyper@verizon.net> - 2012-06-03 16:17 -0400
                Re: Decomposing a FLOAT Keith Thompson <kst-u@mib.org> - 2012-06-03 13:43 -0700
                Re: Decomposing a FLOAT Raj Pashwar <raj121190@hotmail.NOSPAM.com> - 2012-06-03 22:06 +0000
                Re: Decomposing a FLOAT Ian Collins <ian-news@hotmail.com> - 2012-06-04 10:30 +1200
                Re: Decomposing a FLOAT James Kuyper <jameskuyper@verizon.net> - 2012-06-03 21:12 -0400
                Re: Decomposing a FLOAT Keith Thompson <kst-u@mib.org> - 2012-06-04 12:20 -0700
                Re: Decomposing a FLOAT Malcolm McLean <malcolm.mclean5@btinternet.com> - 2012-06-05 03:54 -0700
                Re: Decomposing a FLOAT James Kuyper <jameskuyper@verizon.net> - 2012-06-05 08:11 -0400
      Re: Decomposing a FLOAT gazelle@shell.xmission.com (Kenny McCormack) - 2012-06-02 00:03 +0000
        Re: Decomposing a FLOAT jgk@panix.com (Joe keane) - 2012-06-02 00:38 +0000

csiph-web