Jump to content

Talk:Nearest integer function

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Macrakis (talk | contribs) at 14:04, 5 May 2016. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
WikiProject iconComputer science Redirect‑class Low‑importance
WikiProject iconThis redirect 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.
RedirectThis redirect does not require a rating on Wikipedia's content assessment scale.
LowThis redirect has been rated as Low-importance on the project's importance scale.
Things you can help WikiProject Computer science with:

WikiProject iconMathematics Redirect‑class Low‑priority
WikiProject iconThis redirect 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.
RedirectThis redirect does not require a rating on Wikipedia's content assessment scale.
LowThis redirect has been rated as Low-priority on the project's priority scale.

Don't agree with the definition

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

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

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?

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

[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

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