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


Groups > comp.lang.c > #21599 > unrolled thread

Decomposing a FLOAT

Started byRaj Pashwar <raj121190@hotmail.NOSPAM.com>
First post2012-05-31 20:59 +0000
Last post2012-06-02 00:38 +0000
Articles 7 on this page of 27 — 12 participants

Back to article view | Back to comp.lang.c


Contents

  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

Page 2 of 2 — ← Prev page 1 [2]


#21775

FromIan Collins <ian-news@hotmail.com>
Date2012-06-04 10:30 +1200
Message-ID<a326r9F5maU2@mid.individual.net>
In reply to#21771
On 06/ 4/12 10:06 AM, Raj Pashwar wrote:
> On Sun, 03 Jun 2012 13:43:13 -0700, Keith Thompson wrote:
>
>> Raj Pashwar<raj121190@hotmail.NOSPAM.com>  writes:
>>> On Sat, 02 Jun 2012 14:54:09 -0700, Keith Thompson wrote:
>> [...]
>>>> Whatever the OP meant, I hope he understands by now that referring to
>>>> the type "float" as "FLOAT" is not a good idea.
>>>
>>> Yes, thanks :-)
>>>
>>> In fact John Kupyer was right : on my system FLOAT is a type-def for
>>> long double.
>>
>> (James Kuyper)
>>
>> 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.
>
> 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.

You miss the point completely.  The technique is common, it is the name 
you have chosen that's bad.

-- 
Ian Collins

[toc] | [prev] | [next] | [standalone]


#21792

FromJames Kuyper <jameskuyper@verizon.net>
Date2012-06-03 21:12 -0400
Message-ID<jqh22r$6hn$1@dont-email.me>
In reply to#21771
On 06/03/2012 06:06 PM, Raj Pashwar wrote:
> 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?
...
> Yes, it's in one of the headers.

I think that when he asked  "where exactly", he was looking for an
answer more specific than "yes".
Is it a header for some particular application - if so, which one?
Is it a header for a library - if so, which one?
Is it a header for your operating system - if so, which one?
-- 
James Kuyper

[toc] | [prev] | [next] | [standalone]


#21827

FromKeith Thompson <kst-u@mib.org>
Date2012-06-04 12:20 -0700
Message-ID<lnpq9eevec.fsf@nuthaus.mib.org>
In reply to#21771
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"

[toc] | [prev] | [next] | [standalone]


#21864

FromMalcolm McLean <malcolm.mclean5@btinternet.com>
Date2012-06-05 03:54 -0700
Message-ID<6af587a9-154e-44ee-a363-f546817a881f@googlegroups.com>
In reply to#21827
בתאריך יום שני, 4 ביוני 2012 20:20:43 UTC+1, מאת Keith Thompson:
> 
> That's a fine idea -- but FLOAT is a lousy name for it.
> 
REAL would be better.
However not all programmers know what that means.

[toc] | [prev] | [next] | [standalone]


#21866

FromJames Kuyper <jameskuyper@verizon.net>
Date2012-06-05 08:11 -0400
Message-ID<jqkt13$dt7$1@dont-email.me>
In reply to#21864
On 06/05/2012 06:54 AM, Malcolm McLean wrote:
> בתאריך יום שני, 4 ביוני 2012 20:20:43 UTC+1, מאת Keith Thompson:
>>
>> That's a fine idea -- but FLOAT is a lousy name for it.
>>
> REAL would be better.
> However not all programmers know what that means.

A typedef like that is always intended for use in a specific context; it
should not mean "the floating point type that should be used in all
contexts". It should mean something like "the floating point type to be
used when working with this particular library", and the name should
contain at least a hint of the correct context; neither "FLOAT" nor
"REAL" does so.
-- 
James Kuyper

[toc] | [prev] | [next] | [standalone]


#21638

Fromgazelle@shell.xmission.com (Kenny McCormack)
Date2012-06-02 00:03 +0000
Message-ID<jqbl91$as2$1@news.xmission.com>
In reply to#21636
In article <jqbhmm$j0$1@reader1.panix.com>, Joe keane <jgk@panix.com> wrote:
>In article <4FC7F751.8080500@verizon.net>,
>James Kuyper  <jameskuyper@verizon.net> wrote:
>>C doesn't have FLOAT, it does have float, and it is NOT nit-picking to
>>point it out because C is case-sensitive.
>
>damn
>
>cut the guy a break
>
>sometimes i think this newsgroup is 'comp.lang.nitprick'
>
>he asked the question in English
>
>just as a guess English not his native language
>
>is kind of rude

Welcome to CLC.  We hope you enjoy your stay...

-- 
They say compassion is a virtue, but I don't have the time!

    - David Byrne -

[toc] | [prev] | [next] | [standalone]


#21639

Fromjgk@panix.com (Joe keane)
Date2012-06-02 00:38 +0000
Message-ID<jqbnac$3a6$1@reader1.panix.com>
In reply to#21638
In article <jqbl91$as2$1@news.xmission.com>,
Kenny McCormack <gazelle@shell.xmission.com> wrote:
>Welcome to CLC.  We hope you enjoy your stay...

i listened to Pind Floyd a lot of times

i still don't think

i had a lot of cowerkers 
who has English is not perfect

the other hand
my speaking to them in their native language is somewhere between
impossible or more impossible, probably the latter

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | comp.lang.c


csiph-web