Talk:Floor and ceiling functions

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Computer science (Rated C-class, Mid-importance)
WikiProject icon This article is within the scope of WikiProject Computer science, a collaborative effort to improve the coverage of Computer science related articles on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
C-Class article C  This article has been rated as C-Class on the project's quality scale.
 Mid  This article has been rated as Mid-importance on the project's importance scale.
 
WikiProject Mathematics (Rated B-class, Mid-importance)
WikiProject Mathematics
This article is within the scope of WikiProject Mathematics, a collaborative effort to improve the coverage of Mathematics on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Mathematics rating:
B Class
Mid Importance
 Field: Basics

Formula disrupts article flow[edit]

If m and n are coprime integers, then

1≤in-1 floor(im/n) = (m-1)(n-1)/2.

This identity doesn't in any way help understanding what the floor function is. Nor is it somthing special: there are probably dozens of identities involving the floor function. It disrupts the flow of the article. If you want to include it, please explain why you want to on this page before doing so and try to fit it in with the rest of the article. -- Arvindn 13:57 Dec 23, 2002 (UTC)

If there are dozens of identities involving the floor function, then they should all be listed in this article. Suppressing information certainly doesn't help the reader. But I agree with you that it was disrupting the flow of the article. AxelBoldt 03:14 Dec 24, 2002 (UTC)

same as truncation?[edit]

Isn't the floor function just a specific case of truncation? (i.e., truncating the number back to the decimal point)   –radiojon 02:14, 2005 Apr 20 (UTC)

Not over its entire domain -- floor(-2.3) is -3, however the truncation of -2.3 is -2. -- 20:47, 14 September 2005 (UTC)

Ceiling function[edit]

Why is the ceiling function here? It should be in its own article!! It's like having an article about males in the female article... Enochlau 14:30, 15 Jun 2005 (UTC)

Ceiling function redirects to this article. I think it's safe to say they're similar enough to warrant their current cohabitation. -- 20:47, 14 September 2005 (UTC)

Derivative[edit]

{ d \over dx } \lfloor x \rfloor = 0

With the exception of discontinuities. -- 20:47, 14 September 2005 (UTC)

Article name[edit]

The three functions discussed on the article page definitely should be in the same article, but the article name is slightly misleading. Can I suggest that whatever the collective term is for these functions be used? I'd move the page myself but I wouldn't know what to move it to. Neonumbers 02:13, 27 May 2006 (UTC)

Nitpick[edit]

"Continuous" is a dangerous word to use in computer science, since nothing is analogue. --VKokielov 05:18, 18 July 2006 (UTC)

Rename to rounding function[edit]

The following discussion is an archived debate of the proposal. Please do not modify it. Subsequent comments should be made in a new section on the talk page. No further edits should be made to this section.

The result of the debate was Move to Floor and ceiling functions Duja 09:47, 13 December 2006 (UTC)


  • I oppose. Rounding is something different than these: reducing the precision in the most accurate way possible. I could somewhat see including rounding here, but I would object to that too. Baccyak4H 03:47, 22 September 2006 (UTC)
    Update. After reading Omegatron's vote, I realized I was not clear with my intention. I oppose merging, under the condition that rounding functions becomes a category, not an article. Then floor, ceiling, round (others?) would be individual articles, with appropriate crosslinks. Under this organization, I would support a skeleton article on rounding functions which would read like a disambiguation page, with links to the specific functions. Although the Categories:rounding_functions page might fit this bill. Baccyak4H 14:13, 22 September 2006 (UTC)
    What are you going to put in ceiling function that's so unique from floor function that it deserves its own article? We don't have separate articles for sine, cosine, and tangent for the exact same reason. — Omegatron 22:45, 22 September 2006 (UTC)
    Well, I would argue maybe we should. Clearly most specifics written about floor/ceiling are specific to them only. The spirit may be similar, yes, but not the specifics (exception: derivatives, which are some Dirac delta type animal...). But I have made my case, as have you, and others. I accept the community's wisdom. And yes, there are a lot of other controversies in WP that are far more problematic. If the page is merged like the trig page, I still feel it can work well, although some cleanup/reorg might be needed. Baccyak4H 03:46, 23 September 2006 (UTC)
    I oppose the move too, for the same reason. Oleg Alexandrov (talk) 04:36, 22 September 2006 (UTC)
  • Support - Floor function is of course the wrong title for this article, which covers several rounding methods. — Omegatron 05:01, 22 September 2006 (UTC)

Discussion A better name could then be floor and ceiling functions.

The redlink rounding function should rather redirect to rounding. Note that floor and celing functions are very particular cases of rounding, namely rounding to integers. Oleg Alexandrov (talk) 15:22, 22 September 2006 (UTC)

Integer rounding functionOmegatron 22:45, 22 September 2006 (UTC)
That should be Integer rounding functions (plural). But I find that name to be too clumsy, and I think floor and ceiling functions better reflects what's in the article. Oleg Alexandrov (talk) 02:42, 23 September 2006 (UTC)
This somewhat reflects why individual pages would be a plus (see above). But given the choices presented, note that neither Integer rounding functions (plural) nor floor and ceiling functions could include rounding, as this is not necessarily "integer".
How about "Truncation functions"? I am not wed to this name, just wanted to see what everyone thought. Baccyak4H 03:53, 23 September 2006 (UTC)
Rounding 4.6 up to 5 is not truncation. — Omegatron 00:50, 25 September 2006 (UTC)
Very good point. Although now that you mention that, it seems "rounding functions" suffers from the same drawback, say, floor(4.6). I like neither now, but "rounding" does seem the lesser evil. Can we do better? Baccyak4H
  • Oppose/support. I oppose the suggested name, but I strongly support a rename of the article. Regarding the suggested name, as previously said, neither floor, nor ceiling is a rounding function. The only rouding function is round... You might call this article Integral conversion functions, but round should be included as well in that case. A good suggestion already made is simply Floor and ceiling functions, along with the relevant redirects from Floor function and Ceiling function. — Sagie 16:03, 17 October 2006 (UTC)
    I saw somewhere a redirect or reference to "discretization"; I would perhaps consider "discretization functions" as an alternate renaming. Advantage: covers all types of functions discussed. Disadvantage: ugly name. Comments? Baccyak4H 16:19, 17 October 2006 (UTC)
  • Comment - It would make much more sense to split to floor function and ceiling function. They are similar in functionality (both round) but are diametrically different. I found it, for a lack of a better word, "disturbing" that I was redirected to an article entitled "floor function" when I was looking for the ceiling function. The proposition of renaming the article also addresses the problem of having the ceiling and floor functions cohabitating the same article. Just as well combine war and peace. Cburnett 01:57, 12 November 2006 (UTC)
    No. War and peace are opposites. The floor and ceiling function are the same thing, but in different directions. I don't know how anyone could think they belong in different articles. Wikipedia articles are about a topic, not a word. — Omegatron 04:24, 10 December 2006 (UTC)
  • Strong oppose. Floor function should keep its status as a title, as Wolfram MathWorld uses it in their title. Also split the articles into ceiling function. Sr13 07:49, 21 November 2006 (UTC)
    This is Wikipedia, not Wolfram MathWorld. — Omegatron 14:56, 5 December 2006 (UTC)
  • Oppose The rounding function is something else, Floor(x+ .5) or similar. Splitting is probably unnecessary, since all this says about the ceiling function is its relationship to the floor function. Septentrionalis 21:14, 5 December 2006 (UTC)

Rename[edit]

No no no. Vote like this. Which titles do you like best for this article? Note that it currently covers the floor function, ceiling function, and int function.

Feel free to add additional names, if you support them; we don't need more choices nobody likes. Septentrionalis PMAnderson 16:38, 11 December 2006 (UTC)
Exactly. — Omegatron 16:41, 11 December 2006 (UTC)

Floor function[edit]

  1. Keep things simple. Septentrionalis PMAnderson 16:35, 11 December 2006 (UTC)
    I'd consider this "keeping things confusing", since the article is about three related functions. — Omegatron 16:41, 11 December 2006 (UTC)

Rounding functions[edit]

  1. Omegatron 04:23, 10 December 2006 (UTC)

Integer rounding functions[edit]

Floor and ceiling functions[edit]

  1. Omegatron 04:23, 10 December 2006 (UTC)
  2. GTBacchus(talk) 23:20, 10 December 2006 (UTC)
  3. - With redirects Patstuarttalk|edits 06:22, 11 December 2006 (UTC)
  4. Nothing really wrong with this; but it does need the redirects. Septentrionalis PMAnderson 16:37, 11 December 2006 (UTC)

Truncation functions[edit]

Integral conversion functions[edit]

Discretization functions[edit]

The above discussion is preserved as an archive of the debate. Please do not modify it. Subsequent comments should be made in a new section on this talk page. No further edits should be made to this section.

Error in function definition[edit]

Although the floor and ceiling functions are defined for all real values (of x), the definitions

    max { n [in] R : n <= x }

and

    min { n [in] R : n >= x }

do not restrict "n" to integral (integer) values. As defined in the article, the functions would always return the value x!

The necessary correction is to have n come from the set of integers, Z, rather than the set of real numbers, R:

    max { n [in] Z : n <= x }

and

    min { n [in] Z : n >= x }.  

StarboardSouthpaw (talk) 17:59, 16 June 2008 (UTC)

One formula is false[edit]

  • When x and n are positive numbers
 \left\lfloor \frac{n}{x} \right\rfloor \geq \frac{n}{x} - \frac{x-1}{x}

If n=9.5, x=5

 \left\lfloor \frac{n}{x} \right\rfloor = 1
 \frac{n}{x} - \frac{x-1}{x} = 1.9 - 0.8  = 1.1

Maksim-e (talk) 20:09, 29 July 2008 (UTC)

I've changed numbers to integers. Richard Pinch (talk) 19:45, 16 August 2008 (UTC)

ANSI C[edit]

I've commented out a description of truncation -- ANSI C does not prescribe a direction to round in. Richard Pinch (talk) 19:46, 16 August 2008 (UTC)

The C99 standard (section 6.3.1.4) requires truncation towards 0. McKay (talk) 22:52, 2 April 2009 (UTC)

Computer implementations[edit]

Needs more references -- I've tagged with refimprove. Richard Pinch (talk) 21:35, 26 August 2008 (UTC)

Fractional Part Cleanup[edit]

The current state of the article is a Frankenstein's Monster reflecting both a time when the fractional part function was defined in the introduction, and now, when it has been moved to the Applications section. For example, the sentence in which the fractional part function is first defined begins "As stated above, ..." I propose putting all the fractional part material in the Applications section, including the fractional part properties. Thoughts? DRE (talk) 21:26, 8 September 2009 (UTC)

Truncation merge[edit]

It was proposed, about 29 months ago, that Truncation be merged into this article. I think it's a good idea, but no discussion was actually opened. — Arthur Rubin (talk) 19:38, 12 March 2011 (UTC)

  • Weak disagree. They are slightly different concepts. But more problematic is the if the article should then be renamed to fit in all the concepts. With a third topic, would the article need to be renamed from Floor and ceiling functions to Floor, ceiling and truncation functions? +mt 22:52, 12 March 2011 (UTC)
  • Agree. Basically the entire truncation article could be folded into the truncation subsection of this article with minimal effort; the title of this article would not need to change. --Joel B. Lewis (talk) 00:46, 3 July 2011 (UTC)

Spreadsheets[edit]

Wikipedia is not a manual for Excel or other package. I propose to delete that section of the article. McKay (talk) 06:56, 5 September 2011 (UTC)

Inverse[edit]

What is the inverse function of these functions, if it even exists? Either way, this info should be added to the article. --93.141.51.184 (talk) 16:36, 22 January 2012 (UTC)

Since all of these functions are piecewise constant, none of them has an inverse function. Just look at the graph! --Joel B. Lewis (talk) 16:43, 22 January 2012 (UTC)

Naked assertion[edit]

"None of the formulas in this section is of any practical use."

Very entertaining statement, one that to some would make the section even more worthwhile. Too bad it is impossible to prove. Pressed to correct it, one might substitute the weaker but less objectionable, "Perhaps one day some formula in this section will become something other than a useless curiosity." 129.176.151.28 (talk) 06:02, 13 February 2013 (UTC)129.176.151.28 (talk) 17:18, 13 February 2013 (UTC)

It is absolutely true that none of the formulas is of any practical use. That statement is not contradicted by the assertion that some day someone may find a use for one of them, because it does not say "..and never will be of any practical use". However, it is very difficult to imagine any way that any such formula ever could be of any use. JamesBWatson (talk) 20:55, 15 February 2013 (UTC)
We have given this rather more discussion than it deserves but I stand by my assertion and suggest that you have a tough row to hoe in trying to contradict it. I would suggest that you adopt my position: keep the disputed statement; it's entertaining, quite likely correct, and in any event a harmless comment about something that is tangential to the thrust of the article.129.176.151.28 (talk) 00:31, 23 February 2013 (UTC)

I referenced the claim from a reliable source (Ribenboim) I think Crandall and Pomerance say pretty much the same thing - Virginia-American (talk) 12:16, 23 February 2013 (UTC)

Unlabelled Axes[edit]

Graphs with unlabelled axes are meaningless, so could someone please fix the three meaningless graphs in this article. Readers should not have to guess what the graphs are supposed to mean as they may guess wrongly!86.140.5.138 (talk) 13:55, 29 March 2014 (UTC)