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


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

floor()

Started byAndre <pas.mois@ailleur.be>
First post2012-08-01 14:34 +0200
Last post2012-08-03 21:11 -0400
Articles 8 on this page of 28 — 14 participants

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


Contents

  floor() Andre <pas.mois@ailleur.be> - 2012-08-01 14:34 +0200
    Re: floor() Xavier Roche <xroche@free.fr.NOSPAM.invalid> - 2012-08-01 14:38 +0200
      Re: floor() Andre <pas.mois@ailleur.be> - 2012-08-01 16:47 +0200
      Re: floor() Andre <pas.mois@ailleur.be> - 2012-08-01 17:49 +0200
        Re: floor() Ike Naar <ike@sverige.freeshell.org> - 2012-08-01 15:53 +0000
          Re: floor() falk@rahul.net (Edward A. Falk) - 2012-08-01 18:26 +0000
          Re: floor() Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-08-02 16:30 +0000
            Re: floor() Keith Thompson <kst-u@mib.org> - 2012-08-02 14:58 -0700
        Re: floor() "Heinrich Wolf" <invalid@invalid.invalid> - 2012-08-01 17:56 +0200
        Re: floor() Noob <root@127.0.0.1> - 2012-08-01 17:58 +0200
        Re: floor() Keith Thompson <kst-u@mib.org> - 2012-08-01 10:31 -0700
          Re: floor() Ben Pfaff <blp@cs.stanford.edu> - 2012-08-01 10:43 -0700
            Re: floor() James Kuyper <jameskuyper@verizon.net> - 2012-08-01 13:51 -0400
              Re: floor() Ben Pfaff <blp@cs.stanford.edu> - 2012-08-01 10:59 -0700
                Re: floor() Noob <root@127.0.0.1> - 2012-08-02 10:04 +0200
                Re: floor() Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-08-02 16:33 +0000
                Re: floor() Craig Franck <craiglfranck@gmail.com> - 2012-08-03 20:49 -0400
    Re: floor() Noob <root@127.0.0.1> - 2012-08-01 16:47 +0200
      Re: floor() Andre <pas.mois@ailleur.be> - 2012-08-01 16:48 +0200
    Re: floor() TheGunslinger <mikiesrunsbaal.sec@sbcglobal.net> - 2012-08-01 09:49 -0500
      Re: floor() Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-08-01 10:58 -0400
        Re: floor() TheGunslinger <mikiesrunsbaal.sec@sbcglobal.net> - 2012-08-01 10:02 -0500
          Re: floor() James Kuyper <jameskuyper@verizon.net> - 2012-08-01 11:10 -0400
          Re: floor() TheGunslinger <mikiesrunsbaal.sec@sbcglobal.net> - 2012-08-01 10:12 -0500
            Re: floor() pete <pfiland@mindspring.com> - 2012-08-01 12:04 -0400
            Re: floor() James Kuyper <jameskuyper@verizon.net> - 2012-08-01 12:04 -0400
            Re: floor() Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-08-01 13:07 -0400
            Re: floor() Craig Franck <craiglfranck@gmail.com> - 2012-08-03 21:11 -0400

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


#24058

FromEric Sosman <esosman@ieee-dot-org.invalid>
Date2012-08-01 10:58 -0400
Message-ID<jvbg6o$g1s$1@dont-email.me>
In reply to#24057
On 8/1/2012 10:49 AM, TheGunslinger wrote:
>
> I am assuming you are unfamiliar with some of the libraries.
>
> I would suggest a Google search on: C STL floor function

     First seven hits are for C++, eighth is for the mythical
language "C/C++", ninth is for C++, tenth is a pediatrician.

> I am guessing you haven't added this library which defines the floor
> function:
>
> #include <cmath>

     I'm confident you're trying to help, but you seem not to
have noticed that the question was about C, not about C++.  In
particular, there's no <cmath> header in C.

-- 
Eric Sosman
esosman@ieee-dot-org.invalid

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


#24059

FromTheGunslinger <mikiesrunsbaal.sec@sbcglobal.net>
Date2012-08-01 10:02 -0500
Message-ID<l5hi18tr9k2mmi0us8a6old851s8eve552@4ax.com>
In reply to#24058
On Wed, 01 Aug 2012 10:58:31 -0400, Eric Sosman
<esosman@ieee-dot-org.invalid> wrote:

>On 8/1/2012 10:49 AM, TheGunslinger wrote:
>>
>> I am assuming you are unfamiliar with some of the libraries.
>>
>> I would suggest a Google search on: C STL floor function
>
>     First seven hits are for C++, eighth is for the mythical
>language "C/C++", ninth is for C++, tenth is a pediatrician.
>
>> I am guessing you haven't added this library which defines the floor
>> function:
>>
>> #include <cmath>
>
>     I'm confident you're trying to help, but you seem not to
>have noticed that the question was about C, not about C++.  In
>particular, there's no <cmath> header in C.


With all due respect, you apparently did not notice this is a "C"
forum, and should have been posted in a "C++" forum then...

MJR

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


#24060

FromJames Kuyper <jameskuyper@verizon.net>
Date2012-08-01 11:10 -0400
Message-ID<501946C9.4090506@verizon.net>
In reply to#24059
On 08/01/2012 11:02 AM, TheGunslinger wrote:
> On Wed, 01 Aug 2012 10:58:31 -0400, Eric Sosman
> <esosman@ieee-dot-org.invalid> wrote:
> 
>> On 8/1/2012 10:49 AM, TheGunslinger wrote:
>>>
>>> I am assuming you are unfamiliar with some of the libraries.
>>>
>>> I would suggest a Google search on: C STL floor function
>>
>>     First seven hits are for C++, eighth is for the mythical
>> language "C/C++", ninth is for C++, tenth is a pediatrician.
>>
>>> I am guessing you haven't added this library which defines the floor
>>> function:
>>>
>>> #include <cmath>
>>
>>     I'm confident you're trying to help, but you seem not to
>> have noticed that the question was about C, not about C++.  In
>> particular, there's no <cmath> header in C.
> 
> 
> With all due respect, you apparently did not notice this is a "C"
> forum, and should have been posted in a "C++" forum then...

Why? The only C++ content in his message was either quoted from your
inappropriate response, or was part of his explanation of why your
response was inappropriate. Precisely because C++ would be on-topic in
such a forum, such a message would NOT be on-topic there.

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


#24061

FromTheGunslinger <mikiesrunsbaal.sec@sbcglobal.net>
Date2012-08-01 10:12 -0500
Message-ID<ufhi18d3cb39mugs2nvuqn4ic6u5pot1j8@4ax.com>
In reply to#24059
On Wed, 01 Aug 2012 10:02:01 -0500, TheGunslinger
<mikiesrunsbaal.sec@sbcglobal.net> wrote:

>On Wed, 01 Aug 2012 10:58:31 -0400, Eric Sosman
><esosman@ieee-dot-org.invalid> wrote:
>
>>On 8/1/2012 10:49 AM, TheGunslinger wrote:
>>>
>>> I am assuming you are unfamiliar with some of the libraries.
>>>
>>> I would suggest a Google search on: C STL floor function
>>
>>     First seven hits are for C++, eighth is for the mythical
>>language "C/C++", ninth is for C++, tenth is a pediatrician.
>>
>>> I am guessing you haven't added this library which defines the floor
>>> function:
>>>
>>> #include <cmath>
>>
>>     I'm confident you're trying to help, but you seem not to
>>have noticed that the question was about C, not about C++.  In
>>particular, there's no <cmath> header in C.
>
>
>With all due respect, you apparently did not notice this is a "C"
>forum, and should have been posted in a "C++" forum then...
>
>MJR

That said, I am fully aware that that this is a "C" forum, and as
indicated in my response, I searched with "C" as a parameter.

One of the bigger problems today is that many of the newer compilers
are not strictly "C" systems.

And the website I listed is a C programming support site.

So, if you have a problem with my response, perhaps you should really
take it up with the website referenced.

MJR

Disclaimer: Have a FLAME. Take it to somebody who cares! Here's your
sign... "I am stupid!" , Jeff Foxworthy

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


#24068

Frompete <pfiland@mindspring.com>
Date2012-08-01 12:04 -0400
Message-ID<50195386.1FF9@mindspring.com>
In reply to#24061
TheGunslinger wrote:
> 
> On Wed, 01 Aug 2012 10:02:01 -0500, TheGunslinger
> <mikiesrunsbaal.sec@sbcglobal.net> wrote:
> 
> >On Wed, 01 Aug 2012 10:58:31 -0400, Eric Sosman
> ><esosman@ieee-dot-org.invalid> wrote:
> >
> >>On 8/1/2012 10:49 AM, TheGunslinger wrote:
> >>>
> >>> I am assuming you are unfamiliar with some of the libraries.
> >>>
> >>> I would suggest a Google search on: C STL floor function
> >>
> >>     First seven hits are for C++, eighth is for the mythical
> >>language "C/C++", ninth is for C++, tenth is a pediatrician.
> >>
> >>> I am guessing you haven't added this library
> >>> which defines the floor
> >>> function:
> >>>
> >>> #include <cmath>
> >>
> >>     I'm confident you're trying to help, but you seem not to
> >>have noticed that the question was about C, not about C++.  In
> >>particular, there's no <cmath> header in C.
> >
> >
> >With all due respect, you apparently did not notice this is a "C"
> >forum, and should have been posted in a "C++" forum then...
> >
> >MJR
> 
> That said, I am fully aware that that this is a "C" forum, and as
> indicated in my response, I searched with "C" as a parameter.
> 
> One of the bigger problems today is that many of the newer compilers
> are not strictly "C" systems.
> 
> And the website I listed is a C programming support site.
> 
> So, if you have a problem with my response, perhaps you should really
> take it up with the website referenced.

You posted a C++ answer
to a C question 
in a C newsgroup.

The best part, 
in terms of entertainment value, 
is your claim that it is not your fault.

-- 
pete

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


#24069

FromJames Kuyper <jameskuyper@verizon.net>
Date2012-08-01 12:04 -0400
Message-ID<50195399.6060104@verizon.net>
In reply to#24061
On 08/01/2012 11:12 AM, TheGunslinger wrote:
> On Wed, 01 Aug 2012 10:02:01 -0500, TheGunslinger
> <mikiesrunsbaal.sec@sbcglobal.net> wrote:
> 
>> On Wed, 01 Aug 2012 10:58:31 -0400, Eric Sosman
>> <esosman@ieee-dot-org.invalid> wrote:
>>
>>> On 8/1/2012 10:49 AM, TheGunslinger wrote:
>>>>
>>>> I am assuming you are unfamiliar with some of the libraries.
>>>>
>>>> I would suggest a Google search on: C STL floor function
>>>
>>>     First seven hits are for C++, eighth is for the mythical
>>> language "C/C++", ninth is for C++, tenth is a pediatrician.
>>>
>>>> I am guessing you haven't added this library which defines the floor
>>>> function:
>>>>
>>>> #include <cmath>
>>>
>>>     I'm confident you're trying to help, but you seem not to
>>> have noticed that the question was about C, not about C++.  In
>>> particular, there's no <cmath> header in C.
>>
>>
>> With all due respect, you apparently did not notice this is a "C"
>> forum, and should have been posted in a "C++" forum then...
>>
>> MJR
> 
> That said, I am fully aware that that this is a "C" forum, and as
> indicated in my response, I searched with "C" as a parameter.

You may have been aware of it, but nothing you wrote in your response
reflected that awareness, other than the use of C in your recommended
search string. However, your use of STL in that same string negates
that. Since STL is commonly used as an abbreviation for the Standard
Template Library which eventually became a major part (but NOT the
entirety) of the C++ standard library, adding STL to the search
virtually guarantees exclusion of C-specific web sites.

...
> And the website I listed is a C programming support site.

No, it's a C and C++ programming site, which like many such sites, does
not do a good job of dealing with the differences between C and C++. In
particular, the particular page you cited documents exclusively the C++
version of the floor() function.

I checked, and most of the pages at that site for other standard library
functions document both the C and the C++ header file name, so it was
just bad luck that the page for floor() does not.

> So, if you have a problem with my response, perhaps you should really
> take it up with the website referenced.

The last paragraph of your original message was written entirely by you.
Neither of the mistakes in that paragraph was the responsibility of
anyone other than yourself, and that paragraph could not have been
written by someone who was, as you claim to have been, 'fully aware that
this is a "C" forum'.

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


#24071

FromEric Sosman <esosman@ieee-dot-org.invalid>
Date2012-08-01 13:07 -0400
Message-ID<jvbnnn$c2$1@dont-email.me>
In reply to#24061
On 8/1/2012 11:12 AM, TheGunslinger wrote:
>
> That said, I am fully aware that that this is a "C" forum, and as
> indicated in my response, I searched with "C" as a parameter.

     Then why did you offer a C++ answer?  (As it happens, even
if the O.P. had been using C++ your answer would not have helped;
his problem was not with compilation, but with linking.)

> One of the bigger problems today is that many of the newer compilers
> are not strictly "C" systems.

     Not sure what you mean by this, or why it would matter.  If
Compiler X conforms imperfectly to the C Standard, does it then
make sense to answer as if for COBOL?

> And the website I listed is a C programming support site.

     No; the web site's *title* says its about C.  But the site
itself is not!  Here's the code from the page you linked to:

	//Example will output 5.9 rounded down
	#include <cmath>
	#include <iostream>
	
	using namespace std;
	
	int main()
	{
	  cout<<"5.9 rounded down: "<<floor(5.9);
	}

> So, if you have a problem with my response, perhaps you should really
> take it up with the website referenced.

     First, it wasn't very smart of you to offer a link to a
poor-quality web site.  (The site may have other fine qualities,
but for the question at hand its quality is poor.)  Second, your
own text in the body of your own message -- something you can't
blame on a web site -- was a C++ answer, not applicable to C.

> Disclaimer: Have a FLAME. Take it to somebody who cares! Here's your
> sign... "I am stupid!" , Jeff Foxworthy

     Earlier I wrote that I thought you were trying to be helpful.
I'm starting to doubt myself.

-- 
Eric Sosman
esosman@ieee-dot-org.invalid

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


#24185

FromCraig Franck <craiglfranck@gmail.com>
Date2012-08-03 21:11 -0400
Message-ID<A-udnW2AXOhY64HNnZ2dnUVZ_t6dnZ2d@giganews.com>
In reply to#24061
On 8/1/2012 11:12 AM, TheGunslinger wrote:
> On Wed, 01 Aug 2012 10:02:01 -0500, TheGunslinger
> <mikiesrunsbaal.sec@sbcglobal.net> wrote:
>
>> On Wed, 01 Aug 2012 10:58:31 -0400, Eric Sosman
>> <esosman@ieee-dot-org.invalid> wrote:
>>
>>> On 8/1/2012 10:49 AM, TheGunslinger wrote:
>>>>
>>>> I am assuming you are unfamiliar with some of the libraries.
>>>>
>>>> I would suggest a Google search on: C STL floor function
>>>
>>>      First seven hits are for C++, eighth is for the mythical
>>> language "C/C++", ninth is for C++, tenth is a pediatrician.
>>>
>>>> I am guessing you haven't added this library which defines the floor
>>>> function:
>>>>
>>>> #include <cmath>
>>>
>>>      I'm confident you're trying to help, but you seem not to
>>> have noticed that the question was about C, not about C++.  In
>>> particular, there's no <cmath> header in C.
>>
>>
>> With all due respect, you apparently did not notice this is a "C"
>> forum, and should have been posted in a "C++" forum then...
>>
>> MJR
>
> That said, I am fully aware that that this is a "C" forum, and as
> indicated in my response, I searched with "C" as a parameter.
>
> One of the bigger problems today is that many of the newer compilers
> are not strictly "C" systems.

Any system worth using will have some mechanism for distinguishing
exactly what it is trying to compile.

Also, for instructional purposes, including C++ features in "C"
programs invites confusion.

Craig

[toc] | [prev] | [standalone]


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

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


csiph-web