Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

Jump to content

Talk:Nearest integer function

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
Latest comment: 6 years ago by Macrakis in topic Merge into Rounding

Don't agree with the definition

[edit]

I'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)Reply

Agreed. In fortran 95 the standard is to round up. 90.185.194.71 (talk) 13:41, 29 December 2011 (UTC)Reply

Notation

[edit]

I 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)Reply

Graph

[edit]

The 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)Reply

The image is quite terrible. I'm removing it. -71.195.18.33 (talk) 18:14, 13 October 2009 (UTC)Reply

Nearest even integer?

[edit]

I'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)Reply

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)Reply
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)Reply
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)Reply

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)Reply

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)Reply

Merge into Rounding

[edit]

This should clearly be merged into the Rounding article. --Macrakis (talk) 14:04, 5 May 2016 (UTC)Reply

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)Reply
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)Reply
I also agree on the merge. Vincent Lefèvre (talk) 00:02, 19 April 2019 (UTC)Reply
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)Reply