From 3cb4e75696df6c7abebf17fbc606ca86dcdfb520 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Sun, 6 Sep 2015 23:19:17 +0000
Subject: l3 (6sep15)

git-svn-id: svn://tug.org/texlive/trunk@38305 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/source/latex/l3kernel/l3fp.dtx | 35 +++++++++++++++---------
 1 file changed, 22 insertions(+), 13 deletions(-)

(limited to 'Master/texmf-dist/source/latex/l3kernel/l3fp.dtx')

diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx
index 11904a346c9..1fcd1749003 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx
@@ -1,6 +1,6 @@
 % \iffalse meta-comment
 %
-%% File: l3fp.dtx Copyright (C) 2011-2014 The LaTeX3 Project
+%% File: l3fp.dtx Copyright (C) 2011-2015 The LaTeX3 Project
 %%
 %% It may be distributed and/or modified under the conditions of the
 %% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -38,7 +38,7 @@
 \documentclass[full]{l3doc}
 %</driver>
 %<*driver|package>
-\GetIdInfo$Id: l3fp.dtx 5652 2015-07-09 13:11:22Z joseph $
+\GetIdInfo$Id: l3fp.dtx 5890 2015-08-25 07:47:22Z joseph $
   {L3 Floating points}
 %</driver|package>
 %<*driver>
@@ -114,11 +114,13 @@
 %     $\operatorname{asech} x$, $\operatorname{acsch} x$.
 %   \item Extrema: $\max(x,y,\ldots)$, $\min(x,y,\ldots)$,
 %     $\operatorname{abs}(x)$.
-%   \item Rounding functions: $\operatorname{round}(x,n)$ rounds to
-%     closest value (with ties rounding to even values),
+%   \item Rounding functions ($n=0$ by default, $t=\nan$ by default):
 %     $\operatorname{trunc}(x,n)$ rounds towards zero,
 %     $\operatorname{floor}(x,n)$ rounds towards~$-\infty$,
-%     $\operatorname{ceil}(x,n)$ rounds towards~$+\infty$.  And
+%     $\operatorname{ceil}(x,n)$ rounds towards~$+\infty$,
+%     $\operatorname{round}(x,n,t)$ rounds to the closest value, with
+%     ties rounded to an even value by default, towards zero if $t=0$,
+%     towards $+\infty$ if $t>0$ and towards $-\infty$ if $t<0$.  And
 %     \emph{(not yet)} modulo, and \enquote{quantize}.
 %   \item Constants: \texttt{pi}, \texttt{deg} (one degree in radians).
 %   \item Dimensions, automatically expressed in points, \emph{e.g.},
@@ -312,7 +314,8 @@
 %   \end{quote}
 %   The leading \meta{digit} is non-zero except in the case of $\pm 0$.
 %   The values $\pm\infty$ and~\nan{} trigger an \enquote{invalid
-%     operation} exception.
+%   operation} exception. The entire representation is in the form of
+%   a string (tokens of category code~$12$), \emph{including} the |e|.
 % \end{function}
 %
 % \begin{function}[EXP, updated = 2012-07-08, tested = m3fp-convert003]
@@ -677,7 +680,7 @@
 %
 % \section{Viewing floating points}
 %
-% \begin{function}[added = 2012-05-08, updated = 2012-08-14,
+% \begin{function}[added = 2012-05-08, updated = 2015-08-07,
 %   tested = m3fp002]{\fp_show:N, \fp_show:c, \fp_show:n}
 %   \begin{syntax}
 %     \cs{fp_show:N} \meta{fp~var}
@@ -940,24 +943,30 @@
 % \end{function}
 %
 % \begin{function}^^A
-%   [tested = {m3fp-round001, m3fp-round002}, added = 2013-12-14]
+%   [tested = {m3fp-round001, m3fp-round002}, added = 2013-12-14, updated = 2015-08-08]
 %   {round, trunc, ceil, floor}
 %   \begin{syntax}
 %     \cs{fp_eval:n} \{ |round| |(| \meta{fpexpr} |)| \}
 %     \cs{fp_eval:n} \{ |round| |(| \meta{fpexpr_1} , \meta{fpexpr_2} |)| \}
+%     \cs{fp_eval:n} \{ |round| |(| \meta{fpexpr_1} , \meta{fpexpr_2} , \meta{fpexpr_3} |)| \}
 %   \end{syntax}
-%   Evaluates $\meta{fpexpr_1}=x$ and $\meta{fpexpr_2}=n$, then rounds
+%   Only |round| accepts a third argument.
+%   Evaluates $\meta{fpexpr_1}=x$ and $\meta{fpexpr_2}=n$ and $\meta{fpexpr_3}=t$ then rounds
 %   $x$~to $n$~places.  If $n$~is an integer, this rounds~$x$ to a
 %   multiple of~$10^{-n}$; if $n=+\infty$, this always yields~$x$; if
 %   $n=-\infty$, this yields one of $\pm 0$, $\pm\infty$, or~\nan{}; if
 %   $n$~is neither $\pm\infty$ nor an integer, then an \enquote{invalid
 %     operation} exception is raised.  When \meta{fpexpr_2} is omitted,
 %   $n=0$, \emph{i.e.}, \meta{fpexpr_1} is rounded to an integer.  The
-%   rounding direction depends on the function:
+%   rounding direction depends on the function.
 %   \begin{itemize}
-%     \item |round| yields the multiple of~$10^{-n}$ closest to~$x$, and
-%       if $x$~is half-way between two such multiples, the even multiple
-%       is chosen (\enquote{ties to even});
+%     \item |round| yields the multiple of~$10^{-n}$ closest to~$x$,
+%       with ties ($x$ half-way between two such multiples) rounded
+%       as follows.  If $t$ is \texttt{nan} or not given the even
+%       multiple is chosen (\enquote{ties to even}), if $t=\pm 0$ the
+%       multiple closest to $0$ is chosen (\enquote{ties to zero}),
+%       if $t$ is positive/negative the multiple closest to $\infty$/$-\infty$ is chosen
+%       (\enquote{ties towards positive/negative infinity}).
 %     \item |floor|, or the deprecated |round-|, yields the largest
 %       multiple of~$10^{-n}$ smaller or equal to~$x$ (\enquote{round
 %         towards negative infinity});
-- 
cgit v1.2.3

