Talk:Nearest integer function
This is the talk page for discussing improvements to the Nearest integer function redirect. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google (books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
This redirect does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||||||||||||||||
|
Don't agree with the definition
editI'm not sure I agree with the idea that we always round to an even number. I think it is more common, natural and useful to round up in the event of a half-integer. 137.205.139.149 22:46, 13 January 2007 (UTC)
- Agreed. In fortran 95 the standard is to round up. 90.185.194.71 (talk) 13:41, 29 December 2011 (UTC)
Notation
editI see that the MathWorld site uses [x] but this is quite unusual: [x] has more often been used for integer part in the past. One notation that I have seen often is , although for some reason I find this faintly disturbing. More old-fashioned is . I'll find some references. Richard Pinch (talk) 19:05, 16 August 2008 (UTC)
Graph
editThe graph shown is a bit confusing, in that the point on the x-axis crossed by the y-axis is -0.5 rather than 0, and there are no other x-axis labels. It's hard to see the primary difference from the floor function, this way. --67.242.12.135 (talk) 11:05, 26 August 2008 (UTC)
- The image is quite terrible. I'm removing it. -71.195.18.33 (talk) 18:14, 13 October 2009 (UTC)
Nearest even integer?
editI've never seen the convention that the round function rounds half-integers to the nearest even integer -- is there any citation for this being "usual"? --Joel B. Lewis (talk) 00:55, 3 July 2011 (UTC)
- It is in the IEEE 754 floating point standard implemented on practically every computer, see rounding for various alternatives. Dmcq (talk) 02:28, 3 July 2011 (UTC)
- Thanks. I think it's misleading to say that this is "usually" done when the preceding sentence sets the context as mathematics, rather than computer science. Do you have any objection if I reword along the following lines? "To avoid ambiguity when operating on half-integers, a rounding rule must be chosen. On most computer implementations, the selected rule is to round half-integers to the nearest even integer -- for example, ..... (This is in accordance with the IEEE 754 floating point standards.)" Joel B. Lewis (talk) 02:55, 3 July 2011 (UTC)
- I've not actually ever come across a need to answer the question in a mathematical context, a single point is a set of measure zero. Perhaps you mean statistics or accounting or children rounding sums or something like that? I've no objection to you expanding the article. Dmcq (talk) 03:22, 3 July 2011 (UTC)
error in article
edit[4.5] = 5 and [2.5] = 3. The article lists [4.5] = 4 and [2.5] = 2, which is totally wrong. That is not how rounding works. — Preceding unsigned comment added by 98.169.179.61 (talk) 04:36, 19 July 2011 (UTC)
- It depends what the rounding does. This is the standard round half to even rounding used in IEEE floating point implementations. Dmcq (talk) 13:20, 19 July 2011 (UTC)
This should clearly be merged into the Rounding article. --Macrakis (talk) 14:04, 5 May 2016 (UTC)
- I agree. The Rounding article seems of higher quality and more extensive. This one could go. Olli Niemitalo (talk) 07:41, 29 March 2019 (UTC)
- I also see little value to having a stand-alone article on one particular rounding method. I have added merge tags to both articles in the hopes of attracting someone who wants to do the actual work involved :). --JBL (talk) 22:17, 18 April 2019 (UTC)
- I also agree on the merge. Vincent Lefèvre (talk) 00:02, 19 April 2019 (UTC)
- Redirect done. There was nothing here that wasn't covered in the Rounding article more completely and more correctly. --Macrakis (talk) 20:28, 15 November 2019 (UTC)
- I also agree on the merge. Vincent Lefèvre (talk) 00:02, 19 April 2019 (UTC)
- I also see little value to having a stand-alone article on one particular rounding method. I have added merge tags to both articles in the hopes of attracting someone who wants to do the actual work involved :). --JBL (talk) 22:17, 18 April 2019 (UTC)