Author: Lars Hellström <Lars.Hellstrom@residenset.net>
Author: Richard Suchenwirth <richard.suchenwirth-bauersachs@siemens.com>
State: Rejected
Type: Project
Vote: Done
Created: 03-Nov-2006
Post-History:
Keywords: Tcl,number,cast,rename
Tcl-Version: 8.5
Abstract
It is proposed that the expr function entier() introduced by [237] is renamed to entire().
Rationale
This appears to be a typo. Even though American English differs from British English in that many words which in the latter end in "-re" are spelt "-er", this is not one of these. Neither Merriam-Webster Online nor dictionary.com recognises "entier", whereas both list "entire". A Google search for "entier" reports 61400000 pages, but if one narrows it down to pages in English the count drops to 943000, and even then most of these are in fact written in French. Within the first 60 matches, only 3 show "entier" occurring in English text, and in all these cases it is part of a trademark/product name.
Googling for "entier function" shows however that it is a concept discussed in English texts. entier() was one of the standard functions in Algol 60.
Alternatives
While the term "entire" meaning "whole" is known in mathematics, it is rarely applied to numbers. The typical thing to be entire is instead a function http://planetmath.org/encyclopedia/Entire.html , and that is quite unrelated to integers. Better names could be:
whole ("whole number" sounds a bit childish, but unlike "entire number", it would probably be recognised as meaning "integer")
integer (this is the proper name for the concept in question)
It could also be argued that the function is rather silly, since "coercing to integer" (which seems to be the same as truncation, i.e., rounding towards zero) is mathematically a rather useless operation. More useful operations are rounding to the nearest integer (available as round), floor (rounding downwards), and ceiling (rounding upwards), since these admit tight inequalities that do not depend on the sign of the number. Currently the two latter have to be had by combining round and floor/ceil, whereas separate functions ifloor and iceil would have been more appropriate. Getting them would however require actually implementing something new.
Implementation
This TIP can be implemented by applying the following command prefix to the contents of the files of the Tcl source tree:
string map {entier entire Entier Entire}
(It may of course be more convenient to use the search and replace functionality of a text editor.) Grepping indicates that the only C file affected would be generic/tclBasic.c**, the only Tcl files affected would be _tests/expr.test and tests/info.test, and the only documentation file affected would be doc/mathfunc.n.
Copyright
This document has been placed in the public domain.