\documentclass[]{article}
\usepackage{amsmath,graphicx,supertabular,hyperref,tabularx,ifthen}
\title{TIP \#294: The "entier" Function: It's Spelt "entire"}
\date{November 03, 2006}
\author{Lars Hellström, Richard Suchenwirth}
\urlstyle{sf}
\setlength{\parskip}{1ex}
\setlength{\parindent}{0pt}
\def\tipversion$#1${\texttt{\$#1\$}}
\def\tiplangle#1{\ensuremath{<}}
\def\tiprangle#1{\ensuremath{>}}
\def\tipbar#1{\ensuremath{|}}
\def\tipmail#1#2{\(\langle\){\small\expandafter\url{#1@#2}}\(\rangle\)}
\ifx\pdfoutput\undefined
\newcommand{\tipimage}[2]{\typeout{Make sure you download #1.eps}\ifthenelse{\lengthtest{0.8\textwidth>#2}\and\lengthtest{0pt<#2}}{\includegraphics{#1.eps}}{\includegraphics[width=0.8\textwidth]{#1.eps}}}
\newcommand{\tipxref}[1]{}
\newcommand{\tipxrefend}{}
\else
\newcommand{\tipimage}[2]{\typeout{Make sure you create #1.pdf}\ifthenelse{\lengthtest{0.8\textwidth>#2}\and\lengthtest{0pt<#2}}{\includegraphics{#1.pdf}}{\includegraphics[width=0.8\textwidth]{#1.pdf}}}
\pdfcatalog{/PageMode /UseOutlines}
\newcommand{\tipxref}[1]{\pdfannotlink attr {/C [0.5 0.5 1.0] /Border [0 0 1]} goto name {#1}}
\newcommand{\tipxrefend}{\pdfendlink}
\fi
\newenvironment{tipabstract}{\begin{abstract}}{\end{abstract}}
\begin{document}\maketitle
\begin{center}\begin{tabularx}{\linewidth}{|r@{: }X|}\hline
\textbf{TIP \#294}&\textbf{The "entier" Function: It's Spelt "entire"}\\\hline
Author&

Lars Hellström \tipmail{Lars.Hellstrom}{residenset.net}
\par
Richard Suchenwirth \tipmail{richard.suchenwirth-bauersachs}{siemens.com}
\\
Created&Friday, \(\text{3}^{\text{rd}}\) November 2006\\
Type&Project\\
Tcl Version&\(8.5\)\\
State&Rejected\\
Vote&Done\\
Version&\tipversion$Revision: 1.4 $\\
Keywords&Tcl, number, cast, rename\\
Post History&\\
\hline\end{tabularx}\end{center}
\thispagestyle{empty}\pagestyle{empty}
\begin{tipabstract}

It is proposed that the \textbf{expr} function \textbf{entier}() introduced by \cite{tip237} is renamed to \textbf{entire}().
\end{tipabstract}
\tableofcontents\setcounter{page}{0}\clearpage\pagestyle{plain}

\section{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 \textit{Merriam-Webster Online} nor \textit{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.

\section{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 [\url{http://planetmath.org/encyclopedia/Entire.html}], and that is quite unrelated to integers. Better names could be:
\begin{itemize}
\item{}
\textbf{whole} (``whole number'' sounds a bit childish, but unlike ``entire number'', it would probably be recognised as meaning ``integer'')
\item{}
\textbf{integer} (this is the proper name for the concept in question)
\end{itemize}

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 \textbf{round} and \textbf{floor}/\textbf{ceil}, whereas separate functions \textbf{ifloor} and \textbf{iceil} would have been more appropriate. Getting them would however require actually implementing something new.

\section{Implementation}

This TIP can be implemented by applying the following command prefix to the contents of the files of the Tcl source tree:
\begingroup\small\begin{verbatim}
 string map {entier entire Entier Entire}
\end{verbatim}
\endgroup

(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 \textit{generic/tclBasic.c}', the only Tcl files affected would be \textit{tests/expr.test} and \textit{tests/info.test}, and the only documentation file affected would be \textit{doc/mathfunc.n}.

\section{Copyright}

This document has been placed in the public domain.

\section{Colophon}

\textit{TIP AutoGenerator --- written by Donal K. Fellows}
\begin{thebibliography}{TIP \#1}
\addcontentsline{toc}{section}{References}
\bibitem[TIP \#237]{tip237}
Kevin B. Kenny,
Don Porter,
\emph{Arbitrary-Precision Integers for Tcl},
on-line at \url{http://purl.org/tcl/tip/237.html}
\end{thebibliography}
\end{document}
