diff options
author | Karl Berry <karl@freefriends.org> | 2011-12-11 22:32:04 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-12-11 22:32:04 +0000 |
commit | 3cc0c51eddc31f37b82f651016191bf3575f3aac (patch) | |
tree | 85e3f4cfbe245c416571020e0eb1136193596550 /Master/texmf-dist/source/latex/l3kernel/l3fp.dtx | |
parent | c56f30c6154e55286a21f438d5ed545a5169f13b (diff) |
l3kernel 3036 (11dec11)
git-svn-id: svn://tug.org/texlive/trunk@24822 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3fp.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3fp.dtx | 265 |
1 files changed, 53 insertions, 212 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx index 85d3a91c533..7e22c24e8b5 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx @@ -35,7 +35,7 @@ % %<*driver|package> \RequirePackage{l3names} -\GetIdInfo$Id: l3fp.dtx 2857 2011-09-26 19:46:31Z joseph $ +\GetIdInfo$Id: l3fp.dtx 3029 2011-12-06 22:47:30Z joseph $ {L3 Experimental floating-point operations} %</driver|package> %<*driver> @@ -125,76 +125,44 @@ % \meta{value}. % \end{function} % -% \begin{function}{\fp_set_eq:NN, \fp_set_eq:cN, \fp_set_eq:Nc, \fp_set_eq:cc} -% \begin{syntax} -% \cs{fp_set_eq:NN} \meta{fp var1} \meta{fp var2} -% \end{syntax} -% Sets the value of \meta{floating point variable1} equal to that of -% \meta{floating point variable2}. This assignment is restricted to the -% current \TeX{} group level. -% \end{function} -% % \begin{function} -% {\fp_gset_eq:NN, \fp_gset_eq:cN, \fp_gset_eq:Nc, \fp_gset_eq:cc} +% { +% \fp_set_eq:NN, \fp_set_eq:cN, \fp_set_eq:Nc, \fp_set_eq:cc, +% \fp_gset_eq:NN, \fp_gset_eq:cN, \fp_gset_eq:Nc, \fp_gset_eq:cc +% } % \begin{syntax} -% \cs{fp_gset_eq:NN} \meta{fp var1} \meta{fp var2} +% \cs{fp_set_eq:NN} \meta{fp var1} \meta{fp var2} % \end{syntax} % Sets the value of \meta{floating point variable1} equal to that of -% \meta{floating point variable2}. This assignment is global and so is -% not limited by the current \TeX{} group level. +% \meta{floating point variable2}. % \end{function} % -% \begin{function}{\fp_zero:N, \fp_zero:c} +% \begin{function}{\fp_zero:N, \fp_zero:c, \fp_gzero:N, \fp_gzero:c} % \begin{syntax} % \cs{fp_zero:N} \meta{floating point variable} % \end{syntax} -% Sets the \meta{floating point variable} to |+0.000000000e0| within -% the current scope. -% \end{function} -% -% \begin{function}{\fp_gzero:N, \fp_gzero:c} -% \begin{syntax} -% \cs{fp_gzero:N} \meta{floating point variable} -% \end{syntax} -% Sets the \meta{floating point variable} to |+0.000000000e0| globally. +% Sets the \meta{floating point variable} to |+0.000000000e0|. % \end{function} % -% \begin{function}{\fp_set:Nn, \fp_set:cn} +% \begin{function}{\fp_set:Nn, \fp_set:cn, \fp_gset:Nn, \fp_gset:cn} % \begin{syntax} % \cs{fp_set:Nn} \meta{floating point variable} \Arg{value} % \end{syntax} -% Sets the \meta{floating point variable} variable to \meta{value} -% within the scope of the current \TeX{} group. +% Sets the \meta{floating point variable} variable to \meta{value}. % \end{function} % -% \begin{function}{\fp_gset:Nn, \fp_gset:cn} -% \begin{syntax} -% \cs{fp_gset:Nn} \meta{floating point variable} \Arg{value} -% \end{syntax} -% Sets the \meta{floating point variable} variable to \meta{value} -% globally. -% \end{function} -% -% \begin{function}{\fp_set_from_dim:Nn, \fp_set_from_dim:cn} +% \begin{function} +% { +% \fp_set_from_dim:Nn, \fp_set_from_dim:cn, +% \fp_gset_from_dim:Nn, \fp_gset_from_dim:cn +% } % \begin{syntax} % \cs{fp_set_from_dim:Nn} \meta{floating point variable} \Arg{dimexpr} % \end{syntax} % Sets the \meta{floating point variable} to the distance represented % by the \meta{dimension expression} in the units points. This means % that distances given in other units are first converted to points -% before being assigned to the \meta{floating point variable}. The -% assignment is local. -% \end{function} -% -% \begin{function}{\fp_gset_from_dim:Nn, \fp_gset_from_dim:cn} -% \begin{syntax} -% \cs{fp_gset_from_dim:Nn} \meta{floating point variable} \Arg{dimexpr} -% \end{syntax} -% Sets the \meta{floating point variable} to the distance represented -% by the \meta{dimension expression} in the units points. This means -% that distances given in other units are first converted to points -% before being assigned to the \meta{floating point variable}. The -% assignment is global. +% before being assigned to the \meta{floating point variable}. % \end{function} % % \begin{function}[rEXP]{\fp_use:N, \fp_use:c} @@ -283,40 +251,28 @@ % or significant figures using the usual method in which exact halves % are rounded up. % -% \begin{function}{\fp_round_figures:Nn, \fp_round_figures:cn} +% \begin{function} +% { +% \fp_round_figures:Nn, \fp_round_figures:cn, +% \fp_ground_figures:Nn, \fp_ground_figures:cn +% } % \begin{syntax} % \cs{fp_round_figures:Nn} \meta{floating point variable} \Arg{target} % \end{syntax} % Rounds the \meta{floating point variable} to the \meta{target} number -% of significant figures (an integer expression). The rounding is -% carried out locally. +% of significant figures (an integer expression). % \end{function} % -% \begin{function}{\fp_ground_figures:Nn, \fp_ground_figures:cn} -% \begin{syntax} -% \cs{fp_ground_figures:Nn} \meta{floating point variable} \Arg{target} -% \end{syntax} -% Rounds the \meta{floating point variable} to the \meta{target} number -% of significant figures (an integer expression). The rounding is -% carried out globally. -% \end{function} -% -% \begin{function}{\fp_round_places:Nn, \fp_round_places:cn} +% \begin{function} +% { +% \fp_round_places:Nn, \fp_round_places:cn, +% \fp_ground_places:Nn, \fp_ground_places:cn +% } % \begin{syntax} % \cs{fp_round_places:Nn} \meta{floating point variable} \Arg{target} % \end{syntax} % Rounds the \meta{floating point variable} to the \meta{target} number -% of decimal places (an integer expression). The rounding is -% carried out locally. -% \end{function} -% -% \begin{function}{\fp_ground_places:Nn, \fp_ground_places:cn} -% \begin{syntax} -% \cs{fp_ground_places:Nn} \meta{floating point variable} \Arg{target} -% \end{syntax} -% Rounds the \meta{floating point variable} to the \meta{target} number -% of decimal places (an integer expression). The rounding is -% carried out globally. +% of decimal places (an integer expression). % \end{function} % % \section{Floating-point conditionals} @@ -385,36 +341,18 @@ % The unary operations alter the value stored within an \texttt{fp} % variable. % -% \begin{function}{\fp_abs:N, \fp_abs:c} +% \begin{function}{\fp_abs:N, \fp_abs:c, \fp_gabs:N, \fp_gabs:c} % \begin{syntax} % \cs{fp_abs:N} \meta{floating point variable} % \end{syntax} -% Converts the \meta{floating point variable} to its absolute value, -% assigning the result within the current \TeX\ group. +% Converts the \meta{floating point variable} to its absolute value. % \end{function} % -% \begin{function}{\fp_gabs:N, \fp_gabs:c} -% \begin{syntax} -% \cs{fp_gabs:N} \meta{floating point variable} -% \end{syntax} -% Converts the \meta{floating point variable} to its absolute value, -% assigning the result globally. -% \end{function} -% -% \begin{function}{\fp_neg:N, \fp_neg:c} +% \begin{function}{\fp_neg:N, \fp_neg:c, \fp_gneg:N, \fp_gneg:c} % \begin{syntax} % \cs{fp_neg:N} \meta{floating point variable} % \end{syntax} -% Reverse the sign of the \meta{floating point variable}, assigning the -% result within the current \TeX\ group. -% \end{function} -% -% \begin{function}{\fp_gneg:N, \fp_gneg:c} -% \begin{syntax} -% \cs{fp_gneg:N} \meta{floating point variable} -% \end{syntax} -% Reverse the sign of the \meta{floating point variable}, assigning the -% result globally. +% Reverse the sign of the \meta{floating point variable}. % \end{function} % % \section{Floating-point arithmetic} @@ -428,77 +366,40 @@ % sets \cs{l_my_fp} to the result of $1.234 - 5.678$ % (\emph{i.e.}~$-4.444$). % -% \begin{function}{\fp_add:Nn, \fp_add:cn} +% \begin{function}{\fp_add:Nn, \fp_add:cn, \fp_gadd:Nn, \fp_gadd:cn} % \begin{syntax} % \cs{fp_add:Nn} \meta{floating point} \Arg{value} % \end{syntax} -% Adds the \meta{value} to the \meta{floating point}, making the -% assignment within the current \TeX{} group level. +% Adds the \meta{value} to the \meta{floating point}. % \end{function} % -% \begin{function}{\fp_gadd:Nn, \fp_gadd:cn} -% \begin{syntax} -% \cs{fp_gadd:Nn} \meta{floating point} \Arg{value} -% \end{syntax} -% Adds the \meta{value} to the \meta{floating point}, making the -% assignment globally. -% \end{function} -% -% \begin{function}{\fp_sub:Nn, \fp_sub:cn} +% \begin{function}{\fp_sub:Nn, \fp_sub:cn, \fp_gsub:Nn, \fp_gsub:cn} % \begin{syntax} % \cs{fp_sub:Nn} \meta{floating point} \Arg{value} % \end{syntax} -% Subtracts the \meta{value} from the \meta{floating point}, making the -% assignment within the current \TeX{} group level. -% \end{function} -% -% \begin{function}{\fp_gsub:Nn, \fp_gsub:cn} -% \begin{syntax} -% \cs{fp_gsub:Nn} \meta{floating point} \Arg{value} -% \end{syntax} -% Subtracts the \meta{value} from the \meta{floating point}, making the -% assignment globally. +% Subtracts the \meta{value} from the \meta{floating point}. % \end{function} % -% \begin{function}{\fp_mul:Nn, \fp_mul:cn} +% \begin{function}{\fp_mul:Nn, \fp_mul:cn, \fp_gmul:Nn, \fp_gmul:cn} % \begin{syntax} % \cs{fp_mul:Nn} \meta{floating point} \Arg{value} % \end{syntax} -% Multiples the \meta{floating point} by the \meta{value}, making the -% assignment within the current \TeX{} group level. +% Multiples the \meta{floating point} by the \meta{value}. % \end{function} % -% \begin{function}{\fp_gmul:Nn, \fp_gmul:cn} -% \begin{syntax} -% \cs{fp_gmul:Nn} \meta{floating point} \Arg{value} -% \end{syntax} -% Multiples the \meta{floating point} by the \meta{value}, making the -% assignment globally. -% \end{function} -% -% \begin{function}{\fp_div:Nn, \fp_div:cn} +% \begin{function}{\fp_div:Nn, \fp_div:cn, \fp_gdiv:Nn, \fp_gdiv:cn} % \begin{syntax} % \cs{fp_div:Nn} \meta{floating point} \Arg{value} % \end{syntax} % Divides the \meta{floating point} by the \meta{value}, making the % assignment within the current \TeX{} group level. If the \meta{value} % is zero, the \meta{floating point} will be set to -% \cs{c_undefined_fp}. The assignment is local. -% \end{function} -% -% \begin{function}{\fp_gdiv:Nn, \fp_gdiv:cn} -% \begin{syntax} -% \cs{fp_gdiv:Nn} \meta{floating point} \Arg{value} -% \end{syntax} -% Divides the \meta{floating point} by the \meta{value}, making the -% assignment globally. If the \meta{value} is zero, the -% \meta{floating point} will be set to \cs{c_undefined_fp}. -% The assignment is global. +% \cs{c_undefined_fp}. % \end{function} % % \section{Floating-point power operations} % -% \begin{function}{\fp_pow:Nn, \fp_pow:cn} +% \begin{function}{\fp_pow:Nn, \fp_pow:cn, \fp_gpow:Nn, \fp_gpow:cn} % \begin{syntax} % \cs{fp_pow:Nn} \meta{floating point} \Arg{value} % \end{syntax} @@ -508,54 +409,24 @@ % \meta{floating point} is positive, then the \meta{value} may be any % real value. Mathematically invalid operations such as $0^{0}$ % will give set the \meta{floating point} to to \cs{c_undefined_fp}. -% The assignment is local. -% \end{function} -% -% \begin{function}{\fp_gpow:Nn, \fp_gpow:cn} -% \begin{syntax} -% \cs{fp_gpow:Nn} \meta{floating point} \Arg{value} -% \end{syntax} -% Raises the \meta{floating point} to the given \meta{value}. If the -% \meta{floating point} is negative, then the \meta{value} should be -% either a positive real number or a negative integer. If the -% \meta{floating point} is positive, then the \meta{value} may be any -% real value. Mathematically invalid operations such as $0^{0}$ -% will give set the \meta{floating point} to to \cs{c_undefined_fp}. -% The assignment is global. % \end{function} % % \section{Exponential and logarithm functions} % -% \begin{function}{\fp_exp:Nn, \fp_exp:cn} +% \begin{function}{\fp_exp:Nn, \fp_exp:cn, \fp_gexp:Nn, \fp_gexp:cn} % \begin{syntax} % \cs{fp_exp:Nn} \meta{floating point} \Arg{value} % \end{syntax} % Calculates the exponential of the \meta{value} and assigns this -% to the \meta{floating point}. The assignment is local. +% to the \meta{floating point}. % \end{function} % -% \begin{function}{\fp_gexp:Nn, \fp_gexp:cn} -% \begin{syntax} -% \cs{fp_gexp:Nn} \meta{floating point} \Arg{value} -% \end{syntax} -% Calculates the exponential of the \meta{value} and assigns this -% to the \meta{floating point}. The assignment is global. -% \end{function} -% -% \begin{function}{\fp_ln:Nn, \fp_ln:cn} +% \begin{function}{\fp_ln:Nn, \fp_ln:cn, \fp_gln:Nn, \fp_gln:cn} % \begin{syntax} % \cs{fp_ln:Nn} \meta{floating point} \Arg{value} % \end{syntax} % Calculates the natural logarithm of the \meta{value} and assigns -% this to the \meta{floating point}. The assignment is local. -% \end{function} -% -% \begin{function}{\fp_gln:Nn, \fp_gln:cn} -% \begin{syntax} -% \cs{fp_gln:Nn} \meta{floating point} \Arg{value} -% \end{syntax} -% Calculates the natural logarithm of the \meta{value} and assigns -% this to the \meta{floating point}. The assignment is global. +% this to the \meta{floating point}. % \end{function} % % \section{Trigonometric functions} @@ -564,58 +435,28 @@ % input value of $100\,000\,000$, as there are issues with range % reduction and very large input values. % -% \begin{function}{\fp_sin:Nn, \fp_sin:cn} +% \begin{function}{\fp_sin:Nn, \fp_sin:cn, \fp_gsin:Nn, \fp_gsin:cn} % \begin{syntax} % \cs{fp_sin:Nn} \meta{floating point} \Arg{value} % \end{syntax} % Assigns the sine of the \meta{value} to the \meta{floating point}. -% The \meta{value} should be given in radians. The assignment is -% local. +% The \meta{value} should be given in radians. % \end{function} % -% \begin{function}{\fp_gsin:Nn, \fp_gsin:cn} -% \begin{syntax} -% \cs{fp_gsin:Nn} \meta{floating point} \Arg{value} -% \end{syntax} -% Assigns the sine of the \meta{value} to the \meta{floating point}. -% The \meta{value} should be given in radians. The assignment is -% global. -% \end{function} -% -% \begin{function}{\fp_cos:Nn, \fp_cos:cn} +% \begin{function}{\fp_cos:Nn, \fp_cos:cn, \fp_gcos:Nn, \fp_gcos:cn} % \begin{syntax} % \cs{fp_cos:Nn} \meta{floating point} \Arg{value} % \end{syntax} % Assigns the cosine of the \meta{value} to the \meta{floating point}. -% The \meta{value} should be given in radians. The assignment is -% local. -% \end{function} -% -% \begin{function}{\fp_gcos:Nn, \fp_gcos:cn} -% \begin{syntax} -% \cs{fp_gcos:Nn} \meta{floating point} \Arg{value} -% \end{syntax} -% Assigns the cosine of the \meta{value} to the \meta{floating point}. -% The \meta{value} should be given in radians. The assignment is -% global. +% The \meta{value} should be given in radians. % \end{function} % -% \begin{function}{\fp_tan:Nn, \fp_tan:cn} +% \begin{function}{\fp_tan:Nn, \fp_tan:cn, \fp_gtan:Nn, \fp_gtan:cn} % \begin{syntax} % \cs{fp_tan:Nn} \meta{floating point} \Arg{value} % \end{syntax} % Assigns the tangent of the \meta{value} to the \meta{floating point}. -% The \meta{value} should be given in radians. The assignment is -% local. -% \end{function} -% -% \begin{function}{\fp_gtan:Nn, \fp_gtan:cn} -% \begin{syntax} -% \cs{fp_gtan:Nn} \meta{floating point} \Arg{value} -% \end{syntax} -% Assigns the tangent of the \meta{value} to the \meta{floating point}. -% The \meta{value} should be given in radians. The assignment is -% global. +% The \meta{value} should be given in radians. % \end{function} % % \section{Constant floating point values} @@ -663,7 +504,7 @@ % accuracy for cases likely to be relevant in typesetting situations. % A good overview of the challenges in this area can be found in % J.-M.~Muller, \emph{Elementary functions: algorithms and -% implementation}, 2nd edition, Birkh{\"a}uer Boston, New York, USA, +% implementation}, 2nd edition, Birkh{\"{a}}uer Boston, New York, USA, % 2006. % % The internal representation of numbers is tuned to the needs of the |