[latex3-commits] [l3svn] r6750 - Add random numbers to l3fp, allow 0-argument functions

noreply at latex-project.org noreply at latex-project.org
Mon Nov 21 02:24:26 CET 2016


Author: bruno
Date: 2016-11-21 02:24:26 +0100 (Mon, 21 Nov 2016)
New Revision: 6750

Added:
   trunk/l3kernel/l3fp-random.dtx
   trunk/l3kernel/testfiles/m3fp-rand001.lvt
   trunk/l3kernel/testfiles/m3fp-rand001.ptex.tlg
   trunk/l3kernel/testfiles/m3fp-rand001.tlg
   trunk/l3kernel/testfiles/m3fp-rand001.uptex.tlg
   trunk/l3kernel/testfiles/m3fp-rand001.xetex.tlg
Modified:
   trunk/l3kernel/l3.ins
   trunk/l3kernel/l3format.ins
   trunk/l3kernel/l3fp-aux.dtx
   trunk/l3kernel/l3fp-parse.dtx
   trunk/l3kernel/l3fp-round.dtx
   trunk/l3kernel/l3fp.dtx
   trunk/l3kernel/source3body.tex
   trunk/l3kernel/testfiles/m3expl001.luatex.tlg
   trunk/l3kernel/testfiles/m3expl001.ptex.tlg
   trunk/l3kernel/testfiles/m3expl001.tlg
   trunk/l3kernel/testfiles/m3expl001.uptex.tlg
   trunk/l3kernel/testfiles/m3expl001.xetex.tlg
   trunk/l3kernel/testfiles/m3expl003.luatex.tlg
   trunk/l3kernel/testfiles/m3expl003.ptex.tlg
   trunk/l3kernel/testfiles/m3expl003.tlg
   trunk/l3kernel/testfiles/m3expl003.uptex.tlg
   trunk/l3kernel/testfiles/m3expl003.xetex.tlg
   trunk/l3kernel/testfiles/m3fp-parse002.lvt
   trunk/l3kernel/testfiles/m3fp-parse002.tlg
   trunk/l3kernel/testfiles/m3fp-round002.tlg
Log:
Add random numbers to l3fp, allow 0-argument functions

This commits adds rand() producing floating points in [0,1)
and randint(a,b) producing integers in [a,b] where a and b
must be integers less than 10^16 in magnitude (in principle
we could have allowed +10^16 and -10^16 too but it was easier
to code that way), and a can be omitted, defaulting to 1.

I reworked parsing a bit to allow the 0-argument rand() so
empty arguments (for instance due to extra commas) are now
ignored completely.  Thus max(,,,a,b,,,,) is equivalent to
max(a,b).  Drawback: round(a,,1) is equivalent to round(a,1),
where a user might have expected it to be equivalent to
round(a,0,1) namely "round to integer with ties rounded
toward +inf".



Modified: trunk/l3kernel/l3.ins
===================================================================
--- trunk/l3kernel/l3.ins	2016-11-19 00:43:44 UTC (rev 6749)
+++ trunk/l3kernel/l3.ins	2016-11-21 01:24:26 UTC (rev 6750)
@@ -71,6 +71,7 @@
         \from{l3fp-expo.dtx}    {package}
         \from{l3fp-trig.dtx}    {package}
         \from{l3fp-convert.dtx} {package}
+        \from{l3fp-random.dtx}  {package}
         \from{l3fp-assign.dtx}  {package}
         \from{l3box.dtx}        {package}
         \from{l3coffins.dtx}    {package}

Modified: trunk/l3kernel/l3format.ins
===================================================================
--- trunk/l3kernel/l3format.ins	2016-11-19 00:43:44 UTC (rev 6749)
+++ trunk/l3kernel/l3format.ins	2016-11-21 01:24:26 UTC (rev 6750)
@@ -71,6 +71,7 @@
         \from{l3fp-expo.dtx}    {initex}
         \from{l3fp-trig.dtx}    {initex}
         \from{l3fp-convert.dtx} {initex}
+        \from{l3fp-random.dtx}  {initex}
         \from{l3fp-assign.dtx}  {initex}
         \from{l3box.dtx}        {initex}
         \from{l3coffins.dtx}    {initex}

Modified: trunk/l3kernel/l3fp-aux.dtx
===================================================================
--- trunk/l3kernel/l3fp-aux.dtx	2016-11-19 00:43:44 UTC (rev 6749)
+++ trunk/l3kernel/l3fp-aux.dtx	2016-11-21 01:24:26 UTC (rev 6750)
@@ -939,6 +939,43 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \subsection{Integer floating points}
+%
+% \begin{macro}[int, EXP, pTF]{\@@_int:w}
+% \begin{macro}[aux, EXP]{\@@_int_normal:nnnnn, \@@_int_test:Nw}
+%   Tests if the floating point argument is an integer.  This holds if
+%   the rounding digit resulting from \cs{@@_decimate:nNnnnn} is~$0$.
+%    \begin{macrocode}
+\prg_new_conditional:Npnn \@@_int:w \s_@@ \@@_chk:w #1 #2 #3; { TF , T , F , p }
+  {
+    \if_case:w #1 \exp_stop_f:
+           \prg_return_true:
+    \or:   \@@_int_normal:nnnnn #3
+    \else: \prg_return_false:
+    \fi:
+  }
+\cs_new:Npn \@@_int_normal:nnnnn #1 #2#3#4#5
+  {
+    \if_int_compare:w #1 > \c_zero
+      \@@_decimate:nNnnnn { \c_sixteen - #1 }
+        \@@_int_test:Nw
+        {#2} {#3} {#4} {#5}
+    \else:
+      \prg_return_false:
+    \fi:
+  }
+\cs_new:Npn \@@_int_test:Nw #1#2;
+  {
+    \if_meaning:w 0 #1
+      \prg_return_true:
+    \else:
+      \prg_return_false:
+    \fi:
+  }
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
 % \subsection{Small integer floating points}
 %
 % \begin{macro}[int, EXP]{\@@_small_int:wTF}

Modified: trunk/l3kernel/l3fp-parse.dtx
===================================================================
--- trunk/l3kernel/l3fp-parse.dtx	2016-11-19 00:43:44 UTC (rev 6749)
+++ trunk/l3kernel/l3fp-parse.dtx	2016-11-21 01:24:26 UTC (rev 6750)
@@ -91,6 +91,8 @@
 %   in the input stream as an internal floating point number.  This
 %   function forms the basis of almost all public \pkg{l3fp} functions.
 %   During evaluation, each token is fully \texttt{f}-expanded.
+%
+%   \cs{@@_parse_o:n} does the same but expands once after its result.
 %   \begin{texnote}
 %     Registers (integers, toks, etc.) are automatically unpacked,
 %     without requiring a function such as \cs{int_use:N}.  Invalid
@@ -821,7 +823,7 @@
 %   integer registers from dimensions/skips from muskips, according to
 %   the presence of a period and/or of |pt|.  For integers, simply
 %   convert \meta{value}|e|\meta{exponent} to a floating point number
-%   with \cs{fp_parse:n} (this is somewhat wasteful).  For other
+%   with \cs{@@_parse:n} (this is somewhat wasteful).  For other
 %   registers, the decimal rounding provided by \TeX{} does not
 %   accurately represent the binary value that it manipulates, so we
 %   extract this binary value as a number of scaled points with
@@ -1783,8 +1785,8 @@
 %   {\@@_parse_prefix_(:Nw, \@@_parse_lparen_after:NwN}
 %   The left parenthesis is treated as a unary prefix operator because
 %   it appears in exactly the same settings.  Commas will be allowed if
-%   the previous precedence is $16$ (function with multiple arguments)
-%   or $13$ (unary boolean \enquote{not}).  In this case, find an
+%   the previous precedence is $16$ (function with multiple arguments).
+%   In this case, find an
 %   operand using the precedence~$1$; otherwise the precedence~$0$.
 %   Once the operand is found, the \texttt{lparen_after} auxiliary makes
 %   sure that there was a closing parenthesis (otherwise it complains),
@@ -1825,6 +1827,42 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}[aux, EXP, verb]{\@@_parse_prefix_,:Nw}
+% \begin{macro}[aux, EXP]{\@@_parse_prefix_):Nw}
+%   The right parenthesis and the comma can appear as unary prefixes
+%   when an argument of a multi-argument function is missing (for
+%   instance the first and last ones in |max(,1,2,)| or in |rand()|).
+%   In single-argument functions (precedence~$0$ rather than~$1$) forbid
+%   this.
+%    \begin{macrocode}
+\cs_new:cpn { @@_parse_prefix_,:Nw } #1
+  {
+    \if_int_compare:w #1 = \c_one
+      \exp_after:wN \@@_parse_one:Nw
+      \exp_after:wN #1
+    \else:
+      \__msg_kernel_expandable_error:nnn
+        { kernel } { fp-missing-number } { , }
+      \exp_after:wN \c_nan_fp \exp:w \exp_end_continue_f:w
+      \exp_after:wN \@@_parse_infix:NN
+      \exp_after:wN #1
+      \exp_after:wN ,
+    \fi:
+  }
+\cs_new:cpn { @@_parse_prefix_):Nw } #1
+  {
+    \if_int_compare:w #1 = \c_one
+    \else:
+      \__msg_kernel_expandable_error:nnn
+        { kernel } { fp-missing-number } { ) }
+      \exp_after:wN \c_nan_fp \exp:w \exp_end_continue_f:w
+    \fi:
+    \@@_parse_infix:NN #1 )
+  }
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
 % \subsubsection{Constants}
 %
 % \begin{macro}[aux, EXP]
@@ -1939,9 +1977,11 @@
 %     \@@_parse_word_acot:N , \@@_parse_word_acotd:N,
 %     \@@_parse_word_atan:N , \@@_parse_word_atand:N,
 %     \@@_parse_word_max:N  , \@@_parse_word_min:N  ,
+%     \@@_parse_word_rand:N , \@@_parse_word_randint:N,
 %   }
 %   Those functions are also unary (not binary), but may receive a
 %   variable number of arguments.
+%   For |randint| we don't use the first argument~|?|.
 %    \begin{macrocode}
 \cs_new:Npn \@@_parse_word_acot:N
   { \@@_parse_function:NNN \@@_acot_o:Nw \use_i:nn }
@@ -1955,6 +1995,10 @@
   { \@@_parse_function:NNN \@@_minmax_o:Nw 2 }
 \cs_new:Npn \@@_parse_word_min:N
   { \@@_parse_function:NNN \@@_minmax_o:Nw 0 }
+\cs_new:Npn \@@_parse_word_rand:N
+  { \@@_parse_function:NNN \@@_rand_o:Nw ? }
+\cs_new:Npn \@@_parse_word_randint:N
+  { \@@_parse_function:NNN \@@_randint_o:Nw ? }
 %    \end{macrocode}
 % \end{macro}
 %
@@ -2088,6 +2132,18 @@
 % \end{macro}
 % \end{macro}
 %
+% \begin{macro}[int, EXP]{\@@_parse_o:n}
+% ^^A todo: optimize, comment, make it work for arrays.
+%    \begin{macrocode}
+\cs_new:Npn \@@_parse_o:n #1
+  {
+    \exp_after:wN \exp_after:wN
+    \exp_after:wN \@@_exp_after_o:w
+      \@@_parse:n {#1}
+  }
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}[aux, EXP]{\@@_parse_operand:Nw}
 % \begin{macro}[aux, EXP]{\@@_parse_continue:NwN}
 %   The \cs{@@_parse_operand}

Added: trunk/l3kernel/l3fp-random.dtx
===================================================================
--- trunk/l3kernel/l3fp-random.dtx	                        (rev 0)
+++ trunk/l3kernel/l3fp-random.dtx	2016-11-21 01:24:26 UTC (rev 6750)
@@ -0,0 +1,266 @@
+% \iffalse meta-comment
+%
+%% File: l3fp-random.dtx Copyright (C) 2016 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
+%% license or (at your option) any later version.  The latest version
+%% of this license is in the file
+%%
+%%    http://www.latex-project.org/lppl.txt
+%%
+%% This file is part of the "l3kernel bundle" (The Work in LPPL)
+%% and all files in that bundle must be distributed together.
+%%
+%% The released version of this bundle is available from CTAN.
+%%
+%% -----------------------------------------------------------------------
+%%
+%% The development version of the bundle can be found at
+%%
+%%    http://www.latex-project.org/svnroot/experimental/trunk/
+%%
+%% for those people who are interested.
+%%
+%%%%%%%%%%%
+%% NOTE: %%
+%%%%%%%%%%%
+%%
+%%   Snapshots taken from the repository represent work in progress and may
+%%   not work or may contain conflicting material!  We therefore ask
+%%   people _not_ to put them into distributions, archives, etc. without
+%%   prior consultation with the LaTeX Project Team.
+%%
+%% -----------------------------------------------------------------------
+%%
+%
+%<*driver>
+\documentclass[full]{l3doc}
+\GetIdInfo$Id$
+  {L3 Floating-point random numbers}
+\begin{document}
+  \DocInput{\jobname.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \title{The \textsf{l3fp-random} package\thanks{This file
+%         has version number \ExplFileVersion, last
+%         revised \ExplFileDate.}\\
+% Floating point random numbers}
+% \author{^^A
+%  The \LaTeX3 Project\thanks
+%    {^^A
+%      E-mail:
+%        \href{mailto:latex-team at latex-project.org}
+%          {latex-team at latex-project.org}^^A
+%    }^^A
+% }
+% \date{Released \ExplFileDate}
+%
+% \maketitle
+%
+% \begin{documentation}
+%
+% \end{documentation}
+%
+% \begin{implementation}
+%
+% \section{\pkg{l3fp-random} Implementation}
+%
+%    \begin{macrocode}
+%<*initex|package>
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+%<@@=fp>
+%    \end{macrocode}
+%
+% \subsection{Random floating point}
+%
+% \begin{macro}[EXP, int]{\@@_rand_o:Nw}
+% \begin{macro}[EXP, aux]{\@@_rand_o:}
+%   Check that |random| was called without argument.  Random numbers are
+%   only available if the engine defines a primitive equivalent to
+%   \pdfTeX{}'s \tn{pdfuniformdeviate}.  A random floating point number
+%   in $[0,1)$, uniformly distributed with equal-spaced steps of
+%   $10^{-16}$ is obtained by combining two integers in $[0,10^8-1]$.
+%    \begin{macrocode}
+\cs_new:Npn \@@_rand_o:Nw ? #1 @
+  {
+    \tl_if_empty:nTF {#1}
+      { \@@_rand_o: }
+      {
+        \__msg_kernel_expandable_error:nnnnn
+          { kernel } { fp-num-args } { rand() } { 0 } { 0 }
+        \exp_after:wN \c_nan_fp
+      }
+  }
+\cs_if_exist:NTF \pdftex_uniformdeviate:D
+  {
+    \cs_new:Npn \@@_rand_o:
+      {
+        \@@_parse_o:n
+          {
+            .
+            \exp_after:wN \use_none:n
+            \__int_value:w \__int_eval:w 1 0000 0000 +
+              \pdftex_uniformdeviate:D 1 0000 0000 \__int_eval_end:
+            \exp_after:wN \use_none:n
+            \__int_value:w \__int_eval:w 1 0000 0000 +
+              \pdftex_uniformdeviate:D 1 0000 0000 \__int_eval_end:
+          }
+      }
+  }
+  {
+    \cs_new:Npn \@@_rand_o:
+      {
+        \__msg_kernel_expandable_error:nn { kernel } { fp-no-random }
+        \exp_after:wN \c_nan_fp
+      }
+  }
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Random integer}
+%
+% \begin{macro}[EXP, int]{\@@_randint_o:Nw}
+% \begin{macro}[EXP, aux]
+%   {
+%     \@@_randint_badarg:w,
+%     \@@_randint_e:w,
+%     \@@_randint_narrow_e:nn,
+%     \@@_randint_wide_e:nn,
+%     \@@_randint_wide_e:nnn,
+%     \@@_randint_wide_e:nnnn,
+%   }
+%     Enforce that there is one argument (then add first argument~$1$)
+%     or two arguments.  Enforce that they are integers in
+%     $(-10^{16},10^{16})$ and ordered.
+%
+%     When the range is narrow (less than $2\times 10^9$) we can
+%     directly use the primitive.  Otherwise we use the primitive twice.
+%     To ensure a uniform distribution we combine two uniformly
+%     distributed integers into a total range greater or equal to our
+%     target range and try again if the random number ended up being too
+%     big.
+%
+%     The strange |+\c_six| ensures that the first argument of
+%     \cs{@@_randint_wide_e:nnn} is larger than $10^{-8}$ times the
+%     difference between the end-points even if these are near
+%     $-10^{16}$ and $+10^{16}$ (their difference is rounded to sixteen
+%     digits).  Note that we cannot just concatenate the two random
+%     numbers provided by the engine as that may give an integer up to
+%     (almost) $2\times 10^{16}$ which incurs rounding.
+%    \begin{macrocode}
+\cs_new:Npn \@@_randint_o:Nw ? #1 @
+  {
+    \if_case:w
+      \__int_eval:w \@@_array_count:n {#1} - \c_one \__int_eval_end:
+         \exp_after:wN \@@_randint_e:w \c_one_fp #1
+    \or: \@@_randint_e:w #1
+    \else:
+      \__msg_kernel_expandable_error:nnnnn
+        { kernel } { fp-num-args } { randint() } { 1 } { 2 }
+      \exp_after:wN \c_nan_fp \exp:w
+    \fi:
+    \exp_after:wN \exp_end:
+  }
+\cs_new:Npn \@@_randint_badarg:w \s_@@ \@@_chk:w #1#2#3;
+  {
+    \@@_int:wTF \s_@@ \@@_chk:w #1#2#3;
+      {
+        \if_meaning:w 1 #1
+          \if_int_compare:w
+            \use_i_delimit_by_q_stop:nw #3 \q_stop > \c_sixteen
+            \exp_after:wN \c_one
+          \fi:
+        \fi:
+      }
+      { \c_one }
+  }
+\cs_new:Npn \@@_randint_e:w #1; #2;
+  {
+    \if_case:w
+        \@@_randint_badarg:w #1;
+        \@@_randint_badarg:w #2;
+        \fp_compare:nNnTF { #1; } > { #2; } { \c_one } { \c_zero }
+      \fp_compare:nNnTF { #1; + 2e9 } < { #2; }
+        { \@@_randint_wide_e:nn }
+        { \@@_randint_narrow_e:nn }
+        { #1; } { #2; }
+    \or:
+      \@@_invalid_operation_tl_o:ff
+        { randint } { \@@_array_to_clist:n { #1; #2; } }
+      \exp:w
+    \fi:
+  }
+\cs_if_exist:NTF \pdftex_uniformdeviate:D
+  {
+    \cs_new:Npn \@@_randint_narrow_e:nn #1#2
+      {
+        \@@_parse_o:n
+          {
+            #1 +
+            \pdftex_uniformdeviate:D
+              \int_eval:n { \fp_to_int:n { #2 - #1 } + \c_one }
+          }
+        \exp:w
+      }
+    \cs_new:Npn \@@_randint_wide_e:nn #1 #2
+      {
+        \exp_args:Nf \@@_randint_wide_e:nnn
+          { \fp_to_int:n { ceil ( ( #2 - #1 + \c_six ) * 1e-8 ) } }
+          {#1} {#2}
+      }
+    \cs_new:Npn \@@_randint_wide_e:nnn #1#2#3
+      {
+        \exp_args:Nf \@@_randint_wide_e:nnnn
+          {
+            \@@_parse:n
+              {
+                #2 +
+                \pdftex_uniformdeviate:D #1 e 8 +
+                \pdftex_uniformdeviate:D 1 0000 0000
+              }
+          }
+          {#1} {#2} {#3}
+      }
+    \cs_new:Npn \@@_randint_wide_e:nnnn #1#2#3#4
+      {
+        \fp_compare:nNnTF {#1} > {#4}
+          { \@@_randint_wide_e:nnn {#2} {#3} {#4} }
+          { \@@_exp_after_o:w #1 \exp:w }
+      }
+  }
+  {
+    \cs_new:Npn \@@_randint_narrow_e:nn #1#2
+      {
+        \__msg_kernel_expandable_error:nn { kernel } { fp-no-random }
+        \exp_after:wN \c_nan_fp \exp:w
+      }
+    \cs_new:Npn \@@_randint_wide_e:nn #1#2
+      {
+        \__msg_kernel_expandable_error:nn { kernel } { fp-no-random }
+        \exp_after:wN \c_nan_fp \exp:w
+      }
+  }
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%    \begin{macrocode}
+\__msg_kernel_new:nnn { kernel } { fp-no-random }
+  { Random~numbers~unavailable }
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+%</initex|package>
+%    \end{macrocode}
+%
+% \end{implementation}
+%
+% \PrintChanges
+%
+% \PrintIndex


Property changes on: trunk/l3kernel/l3fp-random.dtx
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Id

Modified: trunk/l3kernel/l3fp-round.dtx
===================================================================
--- trunk/l3kernel/l3fp-round.dtx	2016-11-19 00:43:44 UTC (rev 6749)
+++ trunk/l3kernel/l3fp-round.dtx	2016-11-21 01:24:26 UTC (rev 6750)
@@ -350,6 +350,7 @@
 %
 % ^^A todo: This macro is intermingled with l3fp-parse.
 % ^^A todo: Add explanations.
+% ^^A todo: This macro f-expands rather than o-expands after itself, is that an issue?
 % \begin{macro}[aux,EXP]{\@@_round_o:Nw}
 %   The |trunc|, |ceil| and |floor| functions expect one or two
 %   arguments (the second is $0$ by default), and the |round| function
@@ -360,8 +361,9 @@
 \cs_new:Npn \@@_round_o:Nw #1#2 @
   {
     \if_case:w
-      \__int_eval:w \@@_array_count:n {#2} - \c_one \__int_eval_end:
-         \@@_round:Nwn #1 #2 {0} \exp:w
+      \__int_eval:w \@@_array_count:n {#2} \__int_eval_end:
+         \@@_round_no_arg_o:Nw #1 \exp:w
+    \or: \@@_round:Nwn #1 #2 {0} \exp:w
     \or: \@@_round:Nww #1 #2 \exp:w
     \else: \@@_round:Nwww #1 #2 @ \exp:w
     \fi:
@@ -370,6 +372,21 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}[aux, EXP]{\@@_round_no_arg_o:Nw}
+%    \begin{macrocode}
+\cs_new:Npn \@@_round_no_arg_o:Nw #1
+  {
+    \cs_if_eq:NNTF #1 \@@_round_to_nearest:NNN
+      { \@@_error:nnnn { num-args } { round () } { 1 } { 3 } }
+      {
+        \@@_error:nffn { num-args }
+          { \@@_round_name_from_cs:N #1 () } { 1 } { 2 }
+      }
+    \exp_after:wN \c_nan_fp
+  }
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}[aux, EXP]{\@@_round:Nwww}
 %   Having three arguments is only allowed for |round|, not |trunc|,
 %   |ceil|, |floor|, so check for that case.  If all is well, construct

Modified: trunk/l3kernel/l3fp.dtx
===================================================================
--- trunk/l3kernel/l3fp.dtx	2016-11-19 00:43:44 UTC (rev 6749)
+++ trunk/l3kernel/l3fp.dtx	2016-11-21 01:24:26 UTC (rev 6750)
@@ -91,6 +91,7 @@
 %   \item Boolean logic: negation $\mathop{!}x$, conjunction
 %     $x\mathop{\&\&}y$, disjunction $x\mathop{\vert\vert}y$, ternary
 %     operator $x\mathop{?}y\mathop{:}z$.
+%   \item Random numbers: $\mathop{rand}()$, $\mathop{randint}(m,n)$.
 %   \item Exponentials: $\exp x$, $\ln x$, $x^y$.
 %   \item Trigonometry: $\sin x$, $\cos x$, $\tan x$, $\cot x$, $\sec
 %     x$, $\csc x$ expecting their arguments in radians, and
@@ -1135,6 +1136,35 @@
 %   $\sqrt{\text{\nan{}}}=\text{\nan{}}$.
 % \end{function}
 %
+% \begin{function}[added = 2016-11-20]{rand}
+%   \begin{syntax}
+%     \cs{fp_eval:n} \{ |rand()| \}
+%   \end{syntax}
+%   Produces a pseudo-random floating-point number (multiple of
+%   $10^{-16}$) between $0$~included and $1$~excluded.
+%   \begin{texnote}
+%     This is a wrapper around \tn{pdfuniformdeviate}.  The random seed
+%     can be queried using \tn{pdfrandomseed} and set using
+%     \tn{pdfsetrandomseed}.
+%   \end{texnote}
+% \end{function}
+%
+% \begin{function}[added = 2016-11-20]{randint}
+%   \begin{syntax}
+%     \cs{fp_eval:n} \{ |randint(| \meta{fpexpr} |)| \}
+%     \cs{fp_eval:n} \{ |randint(| \meta{fpexpr_1} , \meta{fpexpr_2} |)| \}
+%   \end{syntax}
+%   Produces a pseudo-random integer between $1$~and \meta{fpexpr} or
+%   between \meta{fpexpr_1} and \meta{fpexpr_2} inclusive.  The bounds
+%   must be integers in the range $(-10^{16},10^{16})$ and the first
+%   must be smaller or equal to the second.
+%   \begin{texnote}
+%     This is a wrapper around \tn{pdfuniformdeviate}.  The random seed
+%     can be queried using \tn{pdfrandomseed} and set using
+%     \tn{pdfsetrandomseed}.
+%   \end{texnote}
+% \end{function}
+%
 % \begin{variable}[tested = m3fp-parse001]{inf, nan}
 %   The special values $+\infty$, $-\infty$, and \nan{} are represented
 %   as \texttt{inf}, \texttt{-inf} and \texttt{nan} (see \cs{c_inf_fp},

Modified: trunk/l3kernel/source3body.tex
===================================================================
--- trunk/l3kernel/source3body.tex	2016-11-19 00:43:44 UTC (rev 6749)
+++ trunk/l3kernel/source3body.tex	2016-11-21 01:24:26 UTC (rev 6750)
@@ -448,6 +448,7 @@
     l3fp-expo.dtx ,
     l3fp-trig.dtx ,
     l3fp-convert.dtx ,
+    l3fp-random.dtx ,
     l3fp-assign.dtx ,
   }
 \ExplSyntaxOff

Modified: trunk/l3kernel/testfiles/m3expl001.luatex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.luatex.tlg	2016-11-19 00:43:44 UTC (rev 6749)
+++ trunk/l3kernel/testfiles/m3expl001.luatex.tlg	2016-11-21 01:24:26 UTC (rev 6750)
@@ -3420,6 +3420,12 @@
 Defining \__fp_case_return_o:Nww on line ...
 Defining \__fp_case_return_i_o:ww on line ...
 Defining \__fp_case_return_ii_o:ww on line ...
+Defining \__fp_int:wTF on line ...
+Defining \__fp_int:wT on line ...
+Defining \__fp_int:wF on line ...
+Defining \__fp_int_p:w on line ...
+Defining \__fp_int_normal:nnnnn on line ...
+Defining \__fp_int_test:Nw on line ...
 Defining \__fp_small_int:wTF on line ...
 Defining \__fp_small_int_true:wTF on line ...
 Defining \__fp_small_int_normal:NnwTF on line ...
@@ -3499,6 +3505,7 @@
 Defining \__fp_round_to_nearest_pinf_neg:NNN on line ...
 Defining \__fp_round_neg:NNN on line ...
 Defining \__fp_round_o:Nw on line ...
+Defining \__fp_round_no_arg_o:Nw on line ...
 Defining \__fp_round:Nwww on line ...
 Defining \__fp_round_name_from_cs:N on line ...
 Defining \__fp_round:Nww on line ...
@@ -3573,6 +3580,8 @@
 Defining \__fp_parse_prefix_.:Nw on line ...
 Defining \__fp_parse_prefix_(:Nw on line ...
 Defining \__fp_parse_lparen_after:NwN on line ...
+Defining \__fp_parse_prefix_,:Nw on line ...
+Defining \__fp_parse_prefix_):Nw on line ...
 Defining \__fp_parse_word_inf:N on line ...
 Defining \__fp_parse_word_nan:N on line ...
 Defining \__fp_parse_word_pi:N on line ...
@@ -3600,6 +3609,8 @@
 Defining \__fp_parse_word_atand:N on line ...
 Defining \__fp_parse_word_max:N on line ...
 Defining \__fp_parse_word_min:N on line ...
+Defining \__fp_parse_word_rand:N on line ...
+Defining \__fp_parse_word_randint:N on line ...
 Defining \__fp_parse_word_abs:N on line ...
 Defining \__fp_parse_word_exp:N on line ...
 Defining \__fp_parse_word_ln:N on line ...
@@ -3631,6 +3642,7 @@
 Defining \__fp_parse_round:Nw on line ...
 Defining \__fp_parse:n on line ...
 Defining \__fp_parse_after:ww on line ...
+Defining \__fp_parse_o:n on line ...
 Defining \__fp_parse_operand:Nw on line ...
 Defining \__fp_parse_continue:NwN on line ...
 Defining \__fp_parse_apply_binary:NwNwN on line ...
@@ -4044,6 +4056,16 @@
 Defining \fp_min:nn on line ...
 Defining \__fp_array_to_clist:n on line ...
 Defining \__fp_array_to_clist_loop:Nw on line ...
+Defining \__fp_rand_o:Nw on line ...
+Defining \__fp_rand_o: on line ...
+Defining \__fp_randint_o:Nw on line ...
+Defining \__fp_randint_badarg:w on line ...
+Defining \__fp_randint_e:w on line ...
+Defining \__fp_randint_narrow_e:nn on line ...
+Defining \__fp_randint_wide_e:nn on line ...
+Defining \__fp_randint_wide_e:nnn on line ...
+Defining \__fp_randint_wide_e:nnnn on line ...
+Defining message LaTeX/kernel/fp-no-random on line ...
 Defining \fp_new:N on line ...
 Defining \fp_new:c on line ...
 Defining \fp_set:Nn on line ...

Modified: trunk/l3kernel/testfiles/m3expl001.ptex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.ptex.tlg	2016-11-19 00:43:44 UTC (rev 6749)
+++ trunk/l3kernel/testfiles/m3expl001.ptex.tlg	2016-11-21 01:24:26 UTC (rev 6750)
@@ -3411,6 +3411,12 @@
 Defining \__fp_case_return_o:Nww on line ...
 Defining \__fp_case_return_i_o:ww on line ...
 Defining \__fp_case_return_ii_o:ww on line ...
+Defining \__fp_int:wTF on line ...
+Defining \__fp_int:wT on line ...
+Defining \__fp_int:wF on line ...
+Defining \__fp_int_p:w on line ...
+Defining \__fp_int_normal:nnnnn on line ...
+Defining \__fp_int_test:Nw on line ...
 Defining \__fp_small_int:wTF on line ...
 Defining \__fp_small_int_true:wTF on line ...
 Defining \__fp_small_int_normal:NnwTF on line ...
@@ -3490,6 +3496,7 @@
 Defining \__fp_round_to_nearest_pinf_neg:NNN on line ...
 Defining \__fp_round_neg:NNN on line ...
 Defining \__fp_round_o:Nw on line ...
+Defining \__fp_round_no_arg_o:Nw on line ...
 Defining \__fp_round:Nwww on line ...
 Defining \__fp_round_name_from_cs:N on line ...
 Defining \__fp_round:Nww on line ...
@@ -3564,6 +3571,8 @@
 Defining \__fp_parse_prefix_.:Nw on line ...
 Defining \__fp_parse_prefix_(:Nw on line ...
 Defining \__fp_parse_lparen_after:NwN on line ...
+Defining \__fp_parse_prefix_,:Nw on line ...
+Defining \__fp_parse_prefix_):Nw on line ...
 Defining \__fp_parse_word_inf:N on line ...
 Defining \__fp_parse_word_nan:N on line ...
 Defining \__fp_parse_word_pi:N on line ...
@@ -3591,6 +3600,8 @@
 Defining \__fp_parse_word_atand:N on line ...
 Defining \__fp_parse_word_max:N on line ...
 Defining \__fp_parse_word_min:N on line ...
+Defining \__fp_parse_word_rand:N on line ...
+Defining \__fp_parse_word_randint:N on line ...
 Defining \__fp_parse_word_abs:N on line ...
 Defining \__fp_parse_word_exp:N on line ...
 Defining \__fp_parse_word_ln:N on line ...
@@ -3622,6 +3633,7 @@
 Defining \__fp_parse_round:Nw on line ...
 Defining \__fp_parse:n on line ...
 Defining \__fp_parse_after:ww on line ...
+Defining \__fp_parse_o:n on line ...
 Defining \__fp_parse_operand:Nw on line ...
 Defining \__fp_parse_continue:NwN on line ...
 Defining \__fp_parse_apply_binary:NwNwN on line ...
@@ -4035,6 +4047,14 @@
 Defining \fp_min:nn on line ...
 Defining \__fp_array_to_clist:n on line ...
 Defining \__fp_array_to_clist_loop:Nw on line ...
+Defining \__fp_rand_o:Nw on line ...
+Defining \__fp_rand_o: on line ...
+Defining \__fp_randint_o:Nw on line ...
+Defining \__fp_randint_badarg:w on line ...
+Defining \__fp_randint_e:w on line ...
+Defining \__fp_randint_narrow_e:nn on line ...
+Defining \__fp_randint_wide_e:nn on line ...
+Defining message LaTeX/kernel/fp-no-random on line ...
 Defining \fp_new:N on line ...
 Defining \fp_new:c on line ...
 Defining \fp_set:Nn on line ...

Modified: trunk/l3kernel/testfiles/m3expl001.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.tlg	2016-11-19 00:43:44 UTC (rev 6749)
+++ trunk/l3kernel/testfiles/m3expl001.tlg	2016-11-21 01:24:26 UTC (rev 6750)
@@ -3411,6 +3411,12 @@
 Defining \__fp_case_return_o:Nww on line ...
 Defining \__fp_case_return_i_o:ww on line ...
 Defining \__fp_case_return_ii_o:ww on line ...
+Defining \__fp_int:wTF on line ...
+Defining \__fp_int:wT on line ...
+Defining \__fp_int:wF on line ...
+Defining \__fp_int_p:w on line ...
+Defining \__fp_int_normal:nnnnn on line ...
+Defining \__fp_int_test:Nw on line ...
 Defining \__fp_small_int:wTF on line ...
 Defining \__fp_small_int_true:wTF on line ...
 Defining \__fp_small_int_normal:NnwTF on line ...
@@ -3490,6 +3496,7 @@
 Defining \__fp_round_to_nearest_pinf_neg:NNN on line ...
 Defining \__fp_round_neg:NNN on line ...
 Defining \__fp_round_o:Nw on line ...
+Defining \__fp_round_no_arg_o:Nw on line ...
 Defining \__fp_round:Nwww on line ...
 Defining \__fp_round_name_from_cs:N on line ...
 Defining \__fp_round:Nww on line ...
@@ -3564,6 +3571,8 @@
 Defining \__fp_parse_prefix_.:Nw on line ...
 Defining \__fp_parse_prefix_(:Nw on line ...
 Defining \__fp_parse_lparen_after:NwN on line ...
+Defining \__fp_parse_prefix_,:Nw on line ...
+Defining \__fp_parse_prefix_):Nw on line ...
 Defining \__fp_parse_word_inf:N on line ...
 Defining \__fp_parse_word_nan:N on line ...
 Defining \__fp_parse_word_pi:N on line ...
@@ -3591,6 +3600,8 @@
 Defining \__fp_parse_word_atand:N on line ...
 Defining \__fp_parse_word_max:N on line ...
 Defining \__fp_parse_word_min:N on line ...
+Defining \__fp_parse_word_rand:N on line ...
+Defining \__fp_parse_word_randint:N on line ...
 Defining \__fp_parse_word_abs:N on line ...
 Defining \__fp_parse_word_exp:N on line ...
 Defining \__fp_parse_word_ln:N on line ...
@@ -3622,6 +3633,7 @@
 Defining \__fp_parse_round:Nw on line ...
 Defining \__fp_parse:n on line ...
 Defining \__fp_parse_after:ww on line ...
+Defining \__fp_parse_o:n on line ...
 Defining \__fp_parse_operand:Nw on line ...
 Defining \__fp_parse_continue:NwN on line ...
 Defining \__fp_parse_apply_binary:NwNwN on line ...
@@ -4035,6 +4047,16 @@
 Defining \fp_min:nn on line ...
 Defining \__fp_array_to_clist:n on line ...
 Defining \__fp_array_to_clist_loop:Nw on line ...
+Defining \__fp_rand_o:Nw on line ...
+Defining \__fp_rand_o: on line ...
+Defining \__fp_randint_o:Nw on line ...
+Defining \__fp_randint_badarg:w on line ...
+Defining \__fp_randint_e:w on line ...
+Defining \__fp_randint_narrow_e:nn on line ...
+Defining \__fp_randint_wide_e:nn on line ...
+Defining \__fp_randint_wide_e:nnn on line ...
+Defining \__fp_randint_wide_e:nnnn on line ...
+Defining message LaTeX/kernel/fp-no-random on line ...
 Defining \fp_new:N on line ...
 Defining \fp_new:c on line ...
 Defining \fp_set:Nn on line ...

Modified: trunk/l3kernel/testfiles/m3expl001.uptex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.uptex.tlg	2016-11-19 00:43:44 UTC (rev 6749)
+++ trunk/l3kernel/testfiles/m3expl001.uptex.tlg	2016-11-21 01:24:26 UTC (rev 6750)
@@ -3411,6 +3411,12 @@
 Defining \__fp_case_return_o:Nww on line ...
 Defining \__fp_case_return_i_o:ww on line ...
 Defining \__fp_case_return_ii_o:ww on line ...
+Defining \__fp_int:wTF on line ...
+Defining \__fp_int:wT on line ...
+Defining \__fp_int:wF on line ...
+Defining \__fp_int_p:w on line ...
+Defining \__fp_int_normal:nnnnn on line ...
+Defining \__fp_int_test:Nw on line ...
 Defining \__fp_small_int:wTF on line ...
 Defining \__fp_small_int_true:wTF on line ...
 Defining \__fp_small_int_normal:NnwTF on line ...
@@ -3490,6 +3496,7 @@
 Defining \__fp_round_to_nearest_pinf_neg:NNN on line ...
 Defining \__fp_round_neg:NNN on line ...
 Defining \__fp_round_o:Nw on line ...
+Defining \__fp_round_no_arg_o:Nw on line ...
 Defining \__fp_round:Nwww on line ...
 Defining \__fp_round_name_from_cs:N on line ...
 Defining \__fp_round:Nww on line ...
@@ -3564,6 +3571,8 @@
 Defining \__fp_parse_prefix_.:Nw on line ...
 Defining \__fp_parse_prefix_(:Nw on line ...
 Defining \__fp_parse_lparen_after:NwN on line ...
+Defining \__fp_parse_prefix_,:Nw on line ...
+Defining \__fp_parse_prefix_):Nw on line ...
 Defining \__fp_parse_word_inf:N on line ...
 Defining \__fp_parse_word_nan:N on line ...
 Defining \__fp_parse_word_pi:N on line ...
@@ -3591,6 +3600,8 @@
 Defining \__fp_parse_word_atand:N on line ...
 Defining \__fp_parse_word_max:N on line ...
 Defining \__fp_parse_word_min:N on line ...
+Defining \__fp_parse_word_rand:N on line ...
+Defining \__fp_parse_word_randint:N on line ...
 Defining \__fp_parse_word_abs:N on line ...
 Defining \__fp_parse_word_exp:N on line ...
 Defining \__fp_parse_word_ln:N on line ...
@@ -3622,6 +3633,7 @@
 Defining \__fp_parse_round:Nw on line ...
 Defining \__fp_parse:n on line ...
 Defining \__fp_parse_after:ww on line ...
+Defining \__fp_parse_o:n on line ...
 Defining \__fp_parse_operand:Nw on line ...
 Defining \__fp_parse_continue:NwN on line ...
 Defining \__fp_parse_apply_binary:NwNwN on line ...
@@ -4035,6 +4047,14 @@
 Defining \fp_min:nn on line ...
 Defining \__fp_array_to_clist:n on line ...
 Defining \__fp_array_to_clist_loop:Nw on line ...
+Defining \__fp_rand_o:Nw on line ...
+Defining \__fp_rand_o: on line ...
+Defining \__fp_randint_o:Nw on line ...
+Defining \__fp_randint_badarg:w on line ...
+Defining \__fp_randint_e:w on line ...
+Defining \__fp_randint_narrow_e:nn on line ...
+Defining \__fp_randint_wide_e:nn on line ...
+Defining message LaTeX/kernel/fp-no-random on line ...
 Defining \fp_new:N on line ...
 Defining \fp_new:c on line ...
 Defining \fp_set:Nn on line ...

Modified: trunk/l3kernel/testfiles/m3expl001.xetex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.xetex.tlg	2016-11-19 00:43:44 UTC (rev 6749)
+++ trunk/l3kernel/testfiles/m3expl001.xetex.tlg	2016-11-21 01:24:26 UTC (rev 6750)
@@ -3418,6 +3418,12 @@
 Defining \__fp_case_return_o:Nww on line ...
 Defining \__fp_case_return_i_o:ww on line ...
 Defining \__fp_case_return_ii_o:ww on line ...
+Defining \__fp_int:wTF on line ...
+Defining \__fp_int:wT on line ...
+Defining \__fp_int:wF on line ...
+Defining \__fp_int_p:w on line ...
+Defining \__fp_int_normal:nnnnn on line ...
+Defining \__fp_int_test:Nw on line ...
 Defining \__fp_small_int:wTF on line ...
 Defining \__fp_small_int_true:wTF on line ...
 Defining \__fp_small_int_normal:NnwTF on line ...
@@ -3497,6 +3503,7 @@
 Defining \__fp_round_to_nearest_pinf_neg:NNN on line ...
 Defining \__fp_round_neg:NNN on line ...
 Defining \__fp_round_o:Nw on line ...
+Defining \__fp_round_no_arg_o:Nw on line ...
 Defining \__fp_round:Nwww on line ...
 Defining \__fp_round_name_from_cs:N on line ...
 Defining \__fp_round:Nww on line ...
@@ -3571,6 +3578,8 @@
 Defining \__fp_parse_prefix_.:Nw on line ...
 Defining \__fp_parse_prefix_(:Nw on line ...
 Defining \__fp_parse_lparen_after:NwN on line ...
+Defining \__fp_parse_prefix_,:Nw on line ...
+Defining \__fp_parse_prefix_):Nw on line ...
 Defining \__fp_parse_word_inf:N on line ...
 Defining \__fp_parse_word_nan:N on line ...
 Defining \__fp_parse_word_pi:N on line ...
@@ -3598,6 +3607,8 @@
 Defining \__fp_parse_word_atand:N on line ...
 Defining \__fp_parse_word_max:N on line ...
 Defining \__fp_parse_word_min:N on line ...
+Defining \__fp_parse_word_rand:N on line ...
+Defining \__fp_parse_word_randint:N on line ...
 Defining \__fp_parse_word_abs:N on line ...
 Defining \__fp_parse_word_exp:N on line ...
 Defining \__fp_parse_word_ln:N on line ...
@@ -3629,6 +3640,7 @@
 Defining \__fp_parse_round:Nw on line ...
 Defining \__fp_parse:n on line ...
 Defining \__fp_parse_after:ww on line ...
+Defining \__fp_parse_o:n on line ...
 Defining \__fp_parse_operand:Nw on line ...
 Defining \__fp_parse_continue:NwN on line ...
 Defining \__fp_parse_apply_binary:NwNwN on line ...
@@ -4042,6 +4054,14 @@
 Defining \fp_min:nn on line ...
 Defining \__fp_array_to_clist:n on line ...
 Defining \__fp_array_to_clist_loop:Nw on line ...
+Defining \__fp_rand_o:Nw on line ...
+Defining \__fp_rand_o: on line ...
+Defining \__fp_randint_o:Nw on line ...
+Defining \__fp_randint_badarg:w on line ...
+Defining \__fp_randint_e:w on line ...
+Defining \__fp_randint_narrow_e:nn on line ...
+Defining \__fp_randint_wide_e:nn on line ...
+Defining message LaTeX/kernel/fp-no-random on line ...
 Defining \fp_new:N on line ...
 Defining \fp_new:c on line ...
 Defining \fp_set:Nn on line ...

Modified: trunk/l3kernel/testfiles/m3expl003.luatex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.luatex.tlg	2016-11-19 00:43:44 UTC (rev 6749)
+++ trunk/l3kernel/testfiles/m3expl003.luatex.tlg	2016-11-21 01:24:26 UTC (rev 6750)
@@ -3421,6 +3421,12 @@
 Defining \__fp_case_return_o:Nww on line ...
 Defining \__fp_case_return_i_o:ww on line ...
 Defining \__fp_case_return_ii_o:ww on line ...
+Defining \__fp_int:wTF on line ...
+Defining \__fp_int:wT on line ...
+Defining \__fp_int:wF on line ...
+Defining \__fp_int_p:w on line ...
+Defining \__fp_int_normal:nnnnn on line ...
+Defining \__fp_int_test:Nw on line ...
 Defining \__fp_small_int:wTF on line ...
 Defining \__fp_small_int_true:wTF on line ...
 Defining \__fp_small_int_normal:NnwTF on line ...
@@ -3500,6 +3506,7 @@
 Defining \__fp_round_to_nearest_pinf_neg:NNN on line ...
 Defining \__fp_round_neg:NNN on line ...
 Defining \__fp_round_o:Nw on line ...
+Defining \__fp_round_no_arg_o:Nw on line ...
 Defining \__fp_round:Nwww on line ...
 Defining \__fp_round_name_from_cs:N on line ...
 Defining \__fp_round:Nww on line ...
@@ -3574,6 +3581,8 @@
 Defining \__fp_parse_prefix_.:Nw on line ...
 Defining \__fp_parse_prefix_(:Nw on line ...
 Defining \__fp_parse_lparen_after:NwN on line ...
+Defining \__fp_parse_prefix_,:Nw on line ...
+Defining \__fp_parse_prefix_):Nw on line ...
 Defining \__fp_parse_word_inf:N on line ...
 Defining \__fp_parse_word_nan:N on line ...
 Defining \__fp_parse_word_pi:N on line ...
@@ -3601,6 +3610,8 @@
 Defining \__fp_parse_word_atand:N on line ...
 Defining \__fp_parse_word_max:N on line ...
 Defining \__fp_parse_word_min:N on line ...
+Defining \__fp_parse_word_rand:N on line ...
+Defining \__fp_parse_word_randint:N on line ...
 Defining \__fp_parse_word_abs:N on line ...
 Defining \__fp_parse_word_exp:N on line ...
 Defining \__fp_parse_word_ln:N on line ...
@@ -3632,6 +3643,7 @@
 Defining \__fp_parse_round:Nw on line ...
 Defining \__fp_parse:n on line ...
 Defining \__fp_parse_after:ww on line ...
+Defining \__fp_parse_o:n on line ...
 Defining \__fp_parse_operand:Nw on line ...
 Defining \__fp_parse_continue:NwN on line ...
 Defining \__fp_parse_apply_binary:NwNwN on line ...
@@ -4045,6 +4057,16 @@
 Defining \fp_min:nn on line ...
 Defining \__fp_array_to_clist:n on line ...
 Defining \__fp_array_to_clist_loop:Nw on line ...
+Defining \__fp_rand_o:Nw on line ...
+Defining \__fp_rand_o: on line ...
+Defining \__fp_randint_o:Nw on line ...
+Defining \__fp_randint_badarg:w on line ...
+Defining \__fp_randint_e:w on line ...
+Defining \__fp_randint_narrow_e:nn on line ...
+Defining \__fp_randint_wide_e:nn on line ...
+Defining \__fp_randint_wide_e:nnn on line ...
+Defining \__fp_randint_wide_e:nnnn on line ...
+Defining message LaTeX/kernel/fp-no-random on line ...
 Defining \fp_new:N on line ...
 Defining \fp_new:c on line ...
 Defining \fp_set:Nn on line ...

Modified: trunk/l3kernel/testfiles/m3expl003.ptex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.ptex.tlg	2016-11-19 00:43:44 UTC (rev 6749)
+++ trunk/l3kernel/testfiles/m3expl003.ptex.tlg	2016-11-21 01:24:26 UTC (rev 6750)
@@ -3412,6 +3412,12 @@
 Defining \__fp_case_return_o:Nww on line ...
 Defining \__fp_case_return_i_o:ww on line ...
 Defining \__fp_case_return_ii_o:ww on line ...
+Defining \__fp_int:wTF on line ...
+Defining \__fp_int:wT on line ...
+Defining \__fp_int:wF on line ...
+Defining \__fp_int_p:w on line ...
+Defining \__fp_int_normal:nnnnn on line ...
+Defining \__fp_int_test:Nw on line ...
 Defining \__fp_small_int:wTF on line ...
 Defining \__fp_small_int_true:wTF on line ...
 Defining \__fp_small_int_normal:NnwTF on line ...
@@ -3491,6 +3497,7 @@
 Defining \__fp_round_to_nearest_pinf_neg:NNN on line ...
 Defining \__fp_round_neg:NNN on line ...
 Defining \__fp_round_o:Nw on line ...
+Defining \__fp_round_no_arg_o:Nw on line ...
 Defining \__fp_round:Nwww on line ...
 Defining \__fp_round_name_from_cs:N on line ...
 Defining \__fp_round:Nww on line ...
@@ -3565,6 +3572,8 @@
 Defining \__fp_parse_prefix_.:Nw on line ...
 Defining \__fp_parse_prefix_(:Nw on line ...
 Defining \__fp_parse_lparen_after:NwN on line ...
+Defining \__fp_parse_prefix_,:Nw on line ...
+Defining \__fp_parse_prefix_):Nw on line ...
 Defining \__fp_parse_word_inf:N on line ...
 Defining \__fp_parse_word_nan:N on line ...
 Defining \__fp_parse_word_pi:N on line ...
@@ -3592,6 +3601,8 @@
 Defining \__fp_parse_word_atand:N on line ...
 Defining \__fp_parse_word_max:N on line ...
 Defining \__fp_parse_word_min:N on line ...
+Defining \__fp_parse_word_rand:N on line ...
+Defining \__fp_parse_word_randint:N on line ...
 Defining \__fp_parse_word_abs:N on line ...
 Defining \__fp_parse_word_exp:N on line ...
 Defining \__fp_parse_word_ln:N on line ...
@@ -3623,6 +3634,7 @@
 Defining \__fp_parse_round:Nw on line ...
 Defining \__fp_parse:n on line ...
 Defining \__fp_parse_after:ww on line ...
+Defining \__fp_parse_o:n on line ...
 Defining \__fp_parse_operand:Nw on line ...
 Defining \__fp_parse_continue:NwN on line ...
 Defining \__fp_parse_apply_binary:NwNwN on line ...
@@ -4036,6 +4048,14 @@
 Defining \fp_min:nn on line ...
 Defining \__fp_array_to_clist:n on line ...
 Defining \__fp_array_to_clist_loop:Nw on line ...
+Defining \__fp_rand_o:Nw on line ...
+Defining \__fp_rand_o: on line ...
+Defining \__fp_randint_o:Nw on line ...
+Defining \__fp_randint_badarg:w on line ...
+Defining \__fp_randint_e:w on line ...
+Defining \__fp_randint_narrow_e:nn on line ...
+Defining \__fp_randint_wide_e:nn on line ...
+Defining message LaTeX/kernel/fp-no-random on line ...
 Defining \fp_new:N on line ...
 Defining \fp_new:c on line ...
 Defining \fp_set:Nn on line ...

Modified: trunk/l3kernel/testfiles/m3expl003.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.tlg	2016-11-19 00:43:44 UTC (rev 6749)
+++ trunk/l3kernel/testfiles/m3expl003.tlg	2016-11-21 01:24:26 UTC (rev 6750)
@@ -3412,6 +3412,12 @@
 Defining \__fp_case_return_o:Nww on line ...
 Defining \__fp_case_return_i_o:ww on line ...
 Defining \__fp_case_return_ii_o:ww on line ...
+Defining \__fp_int:wTF on line ...
+Defining \__fp_int:wT on line ...
+Defining \__fp_int:wF on line ...
+Defining \__fp_int_p:w on line ...
+Defining \__fp_int_normal:nnnnn on line ...
+Defining \__fp_int_test:Nw on line ...
 Defining \__fp_small_int:wTF on line ...
 Defining \__fp_small_int_true:wTF on line ...
 Defining \__fp_small_int_normal:NnwTF on line ...
@@ -3491,6 +3497,7 @@
 Defining \__fp_round_to_nearest_pinf_neg:NNN on line ...
 Defining \__fp_round_neg:NNN on line ...
 Defining \__fp_round_o:Nw on line ...
+Defining \__fp_round_no_arg_o:Nw on line ...
 Defining \__fp_round:Nwww on line ...
 Defining \__fp_round_name_from_cs:N on line ...
 Defining \__fp_round:Nww on line ...
@@ -3565,6 +3572,8 @@
 Defining \__fp_parse_prefix_.:Nw on line ...
 Defining \__fp_parse_prefix_(:Nw on line ...
 Defining \__fp_parse_lparen_after:NwN on line ...
+Defining \__fp_parse_prefix_,:Nw on line ...
+Defining \__fp_parse_prefix_):Nw on line ...
 Defining \__fp_parse_word_inf:N on line ...
 Defining \__fp_parse_word_nan:N on line ...
 Defining \__fp_parse_word_pi:N on line ...
@@ -3592,6 +3601,8 @@
 Defining \__fp_parse_word_atand:N on line ...
 Defining \__fp_parse_word_max:N on line ...
 Defining \__fp_parse_word_min:N on line ...
+Defining \__fp_parse_word_rand:N on line ...
+Defining \__fp_parse_word_randint:N on line ...
 Defining \__fp_parse_word_abs:N on line ...
 Defining \__fp_parse_word_exp:N on line ...
 Defining \__fp_parse_word_ln:N on line ...
@@ -3623,6 +3634,7 @@
 Defining \__fp_parse_round:Nw on line ...
 Defining \__fp_parse:n on line ...
 Defining \__fp_parse_after:ww on line ...
+Defining \__fp_parse_o:n on line ...
 Defining \__fp_parse_operand:Nw on line ...
 Defining \__fp_parse_continue:NwN on line ...
 Defining \__fp_parse_apply_binary:NwNwN on line ...
@@ -4036,6 +4048,16 @@
 Defining \fp_min:nn on line ...
 Defining \__fp_array_to_clist:n on line ...
 Defining \__fp_array_to_clist_loop:Nw on line ...
+Defining \__fp_rand_o:Nw on line ...
+Defining \__fp_rand_o: on line ...
+Defining \__fp_randint_o:Nw on line ...
+Defining \__fp_randint_badarg:w on line ...
+Defining \__fp_randint_e:w on line ...
+Defining \__fp_randint_narrow_e:nn on line ...
+Defining \__fp_randint_wide_e:nn on line ...
+Defining \__fp_randint_wide_e:nnn on line ...
+Defining \__fp_randint_wide_e:nnnn on line ...
+Defining message LaTeX/kernel/fp-no-random on line ...
 Defining \fp_new:N on line ...
 Defining \fp_new:c on line ...
 Defining \fp_set:Nn on line ...

Modified: trunk/l3kernel/testfiles/m3expl003.uptex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.uptex.tlg	2016-11-19 00:43:44 UTC (rev 6749)
+++ trunk/l3kernel/testfiles/m3expl003.uptex.tlg	2016-11-21 01:24:26 UTC (rev 6750)
@@ -3412,6 +3412,12 @@
 Defining \__fp_case_return_o:Nww on line ...
 Defining \__fp_case_return_i_o:ww on line ...
 Defining \__fp_case_return_ii_o:ww on line ...
+Defining \__fp_int:wTF on line ...
+Defining \__fp_int:wT on line ...
+Defining \__fp_int:wF on line ...
+Defining \__fp_int_p:w on line ...
+Defining \__fp_int_normal:nnnnn on line ...
+Defining \__fp_int_test:Nw on line ...
 Defining \__fp_small_int:wTF on line ...
 Defining \__fp_small_int_true:wTF on line ...
 Defining \__fp_small_int_normal:NnwTF on line ...
@@ -3491,6 +3497,7 @@
 Defining \__fp_round_to_nearest_pinf_neg:NNN on line ...
 Defining \__fp_round_neg:NNN on line ...
 Defining \__fp_round_o:Nw on line ...
+Defining \__fp_round_no_arg_o:Nw on line ...
 Defining \__fp_round:Nwww on line ...
 Defining \__fp_round_name_from_cs:N on line ...
 Defining \__fp_round:Nww on line ...
@@ -3565,6 +3572,8 @@
 Defining \__fp_parse_prefix_.:Nw on line ...
 Defining \__fp_parse_prefix_(:Nw on line ...
 Defining \__fp_parse_lparen_after:NwN on line ...
+Defining \__fp_parse_prefix_,:Nw on line ...
+Defining \__fp_parse_prefix_):Nw on line ...
 Defining \__fp_parse_word_inf:N on line ...
 Defining \__fp_parse_word_nan:N on line ...
 Defining \__fp_parse_word_pi:N on line ...
@@ -3592,6 +3601,8 @@
 Defining \__fp_parse_word_atand:N on line ...
 Defining \__fp_parse_word_max:N on line ...
 Defining \__fp_parse_word_min:N on line ...
+Defining \__fp_parse_word_rand:N on line ...
+Defining \__fp_parse_word_randint:N on line ...
 Defining \__fp_parse_word_abs:N on line ...
 Defining \__fp_parse_word_exp:N on line ...
 Defining \__fp_parse_word_ln:N on line ...
@@ -3623,6 +3634,7 @@
 Defining \__fp_parse_round:Nw on line ...
 Defining \__fp_parse:n on line ...
 Defining \__fp_parse_after:ww on line ...
+Defining \__fp_parse_o:n on line ...
 Defining \__fp_parse_operand:Nw on line ...
 Defining \__fp_parse_continue:NwN on line ...
 Defining \__fp_parse_apply_binary:NwNwN on line ...
@@ -4036,6 +4048,14 @@
 Defining \fp_min:nn on line ...
 Defining \__fp_array_to_clist:n on line ...
 Defining \__fp_array_to_clist_loop:Nw on line ...
+Defining \__fp_rand_o:Nw on line ...
+Defining \__fp_rand_o: on line ...
+Defining \__fp_randint_o:Nw on line ...
+Defining \__fp_randint_badarg:w on line ...
+Defining \__fp_randint_e:w on line ...
+Defining \__fp_randint_narrow_e:nn on line ...
+Defining \__fp_randint_wide_e:nn on line ...
+Defining message LaTeX/kernel/fp-no-random on line ...
 Defining \fp_new:N on line ...
 Defining \fp_new:c on line ...
 Defining \fp_set:Nn on line ...

Modified: trunk/l3kernel/testfiles/m3expl003.xetex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.xetex.tlg	2016-11-19 00:43:44 UTC (rev 6749)
+++ trunk/l3kernel/testfiles/m3expl003.xetex.tlg	2016-11-21 01:24:26 UTC (rev 6750)
@@ -3419,6 +3419,12 @@
 Defining \__fp_case_return_o:Nww on line ...
 Defining \__fp_case_return_i_o:ww on line ...
 Defining \__fp_case_return_ii_o:ww on line ...
+Defining \__fp_int:wTF on line ...
+Defining \__fp_int:wT on line ...
+Defining \__fp_int:wF on line ...
+Defining \__fp_int_p:w on line ...
+Defining \__fp_int_normal:nnnnn on line ...
+Defining \__fp_int_test:Nw on line ...
 Defining \__fp_small_int:wTF on line ...
 Defining \__fp_small_int_true:wTF on line ...
 Defining \__fp_small_int_normal:NnwTF on line ...
@@ -3498,6 +3504,7 @@
 Defining \__fp_round_to_nearest_pinf_neg:NNN on line ...
 Defining \__fp_round_neg:NNN on line ...
 Defining \__fp_round_o:Nw on line ...
+Defining \__fp_round_no_arg_o:Nw on line ...
 Defining \__fp_round:Nwww on line ...
 Defining \__fp_round_name_from_cs:N on line ...
 Defining \__fp_round:Nww on line ...
@@ -3572,6 +3579,8 @@
 Defining \__fp_parse_prefix_.:Nw on line ...
 Defining \__fp_parse_prefix_(:Nw on line ...
 Defining \__fp_parse_lparen_after:NwN on line ...
+Defining \__fp_parse_prefix_,:Nw on line ...
+Defining \__fp_parse_prefix_):Nw on line ...
 Defining \__fp_parse_word_inf:N on line ...
 Defining \__fp_parse_word_nan:N on line ...
 Defining \__fp_parse_word_pi:N on line ...
@@ -3599,6 +3608,8 @@
 Defining \__fp_parse_word_atand:N on line ...
 Defining \__fp_parse_word_max:N on line ...
 Defining \__fp_parse_word_min:N on line ...
+Defining \__fp_parse_word_rand:N on line ...
+Defining \__fp_parse_word_randint:N on line ...
 Defining \__fp_parse_word_abs:N on line ...
 Defining \__fp_parse_word_exp:N on line ...
 Defining \__fp_parse_word_ln:N on line ...
@@ -3630,6 +3641,7 @@
 Defining \__fp_parse_round:Nw on line ...
 Defining \__fp_parse:n on line ...
 Defining \__fp_parse_after:ww on line ...
+Defining \__fp_parse_o:n on line ...
 Defining \__fp_parse_operand:Nw on line ...
 Defining \__fp_parse_continue:NwN on line ...
 Defining \__fp_parse_apply_binary:NwNwN on line ...
@@ -4043,6 +4055,14 @@
 Defining \fp_min:nn on line ...
 Defining \__fp_array_to_clist:n on line ...
 Defining \__fp_array_to_clist_loop:Nw on line ...
+Defining \__fp_rand_o:Nw on line ...
+Defining \__fp_rand_o: on line ...
+Defining \__fp_randint_o:Nw on line ...
+Defining \__fp_randint_badarg:w on line ...
+Defining \__fp_randint_e:w on line ...
+Defining \__fp_randint_narrow_e:nn on line ...
+Defining \__fp_randint_wide_e:nn on line ...
+Defining message LaTeX/kernel/fp-no-random on line ...
 Defining \fp_new:N on line ...
 Defining \fp_new:c on line ...
 Defining \fp_set:Nn on line ...

Modified: trunk/l3kernel/testfiles/m3fp-parse002.lvt
===================================================================
--- trunk/l3kernel/testfiles/m3fp-parse002.lvt	2016-11-19 00:43:44 UTC (rev 6749)
+++ trunk/l3kernel/testfiles/m3fp-parse002.lvt	2016-11-21 01:24:26 UTC (rev 6750)
@@ -102,6 +102,19 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
+\TEST { Extra~or~missing~arguments }
+  {
+    \fp_log:n { min() }
+    \fp_log:n { max(,~\c_space_tl,,) }
+    \fp_log:n { sin(0,) }
+    \fp_log:n { sin(,0) }
+    \fp_log:n { sin() }
+    \fp_log:n { inf() }
+    \fp_log:n { -0+() }
+  }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
 % \TESTEXP { Indexing }
 %   {
 %     \fp_eval:n { (\1,\2\3,\4)[\0,\2][\1,\0] + \.\2 } \NEWLINE

Modified: trunk/l3kernel/testfiles/m3fp-parse002.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3fp-parse002.tlg	2016-11-19 00:43:44 UTC (rev 6749)
+++ trunk/l3kernel/testfiles/m3fp-parse002.tlg	2016-11-21 01:24:26 UTC (rev 6750)
@@ -146,3 +146,68 @@
 and I'll forget about whatever was undefined.
 > \sin (3)=nan.
 ============================================================
+============================================================
+TEST 7: Extra or missing arguments
+============================================================
+> min()=inf.
+> max(, \c_space_tl ,,)=-inf.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Unexpected comma: extra arguments ignored.
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+> sin(0,)=0.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Missing number before ','.
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Unexpected comma: extra arguments ignored.
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+> sin(,0)=nan.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Missing number before ')'.
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+> sin()=nan.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Missing number before ')'.
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+> inf()=nan.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Missing number before ')'.
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+> -0+()=nan.
+============================================================

Added: trunk/l3kernel/testfiles/m3fp-rand001.lvt
===================================================================
--- trunk/l3kernel/testfiles/m3fp-rand001.lvt	                        (rev 0)
+++ trunk/l3kernel/testfiles/m3fp-rand001.lvt	2016-11-21 01:24:26 UTC (rev 6750)
@@ -0,0 +1,58 @@
+%
+% Copyright (C) 2016 LaTeX3 Project
+%
+
+\documentclass{minimal}
+\input{regression-test}
+
+\RequirePackage[check-declarations,log-functions]{expl3}
+
+\begin{document}
+\START
+\AUTHOR{Bruno Le Floch}
+\ExplSyntaxOn
+
+\cs_if_exist_use:NT \pdftex_setrandomseed:D { 0 }
+\OMIT
+\cs_if_exist:NTF \pdftex_uniformdeviate:D
+  { \cs_new:Npn \test:n #1 { \prg_replicate:nn { 5 } { \fp_to_tl:n {#1} \NEWLINE } } }
+  { \cs_new:Npn \test:n #1 { \fp_to_tl:n {#1} , ~ } }
+\TIMO
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\TESTEXP { Random~floating~point~number }
+  {
+    \test:n { rand() }
+  }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\TESTEXP { Random~integer }
+  {
+    \test:n { randint(2) }
+    \test:n { randint(-9999 9999 9999 9999, -9999 9999 9999 9998) }
+    \test:n { randint(-10 0000 0000, 10 0000 0000) }
+    \test:n { randint(9.9e15) }
+    \test:n { randint(-9999 9999 9999 9999, 9999 9999 9999 9999) }
+  }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\TESTEXP { Random~bad~arguments }
+  {
+    \fp_to_tl:n { rand(,) } \NEWLINE
+    \fp_to_tl:n { rand(1,2,3) } \NEWLINE
+    \fp_to_tl:n { rand(nan) } \NEWLINE
+    \fp_to_tl:n { randint() } \NEWLINE
+    \fp_to_tl:n { randint(1) } \NEWLINE
+    \fp_to_tl:n { randint(1,0) } \NEWLINE
+    \fp_to_tl:n { randint(1e16) } \NEWLINE
+    \fp_to_tl:n { randint(9.9e15, 1e16) } \NEWLINE
+    \fp_to_tl:n { randint(-1e16, -1e15) } \NEWLINE
+    \fp_to_tl:n { randint(1,2,3) } \NEWLINE
+    \fp_to_tl:n { randint(nan) } \NEWLINE
+    \fp_to_tl:n { randint(inf) } \NEWLINE
+    \fp_to_tl:n { randint(nan,0) } \NEWLINE
+    \fp_to_tl:n { randint(inf,0) } \NEWLINE
+  }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\END


Property changes on: trunk/l3kernel/testfiles/m3fp-rand001.lvt
___________________________________________________________________
Added: svn:eol-style
   + native

Added: trunk/l3kernel/testfiles/m3fp-rand001.ptex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3fp-rand001.ptex.tlg	                        (rev 0)
+++ trunk/l3kernel/testfiles/m3fp-rand001.ptex.tlg	2016-11-21 01:24:26 UTC (rev 6750)
@@ -0,0 +1,211 @@
+This is a generated file for the LaTeX (2e + expl3) validation system.
+Don't change this file in any respect.
+Author: Bruno Le Floch
+============================================================
+TEST 1: Random floating point number
+============================================================
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Random numbers unavailable
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+nan, 
+============================================================
+============================================================
+TEST 2: Random integer
+============================================================
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Random numbers unavailable
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Random numbers unavailable
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Random numbers unavailable
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Random numbers unavailable
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Random numbers unavailable
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+nan, nan, nan, nan, nan, 
+============================================================
+============================================================
+TEST 3: Random bad arguments
+============================================================
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Random numbers unavailable
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           rand() expects between 0 and 0 arguments.
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           rand() expects between 0 and 0 arguments.
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           randint() expects between 1 and 2 arguments.
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Random numbers unavailable
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid operation randint(1, 0)
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid operation randint(1, 1e16)
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid operation randint(9900000000000000, 1e16)
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid operation randint(-1e16, -1000000000000000)
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           randint() expects between 1 and 2 arguments.
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid operation randint(1, nan)
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid operation randint(1, inf)
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid operation randint(nan, 0)
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid operation randint(inf, 0)
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+nan
+nan
+nan
+nan
+nan
+nan
+nan
+nan
+nan
+nan
+nan
+nan
+nan
+nan
+============================================================


Property changes on: trunk/l3kernel/testfiles/m3fp-rand001.ptex.tlg
___________________________________________________________________
Added: svn:eol-style
   + native

Added: trunk/l3kernel/testfiles/m3fp-rand001.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3fp-rand001.tlg	                        (rev 0)
+++ trunk/l3kernel/testfiles/m3fp-rand001.tlg	2016-11-21 01:24:26 UTC (rev 6750)
@@ -0,0 +1,167 @@
+This is a generated file for the LaTeX (2e + expl3) validation system.
+Don't change this file in any respect.
+Author: Bruno Le Floch
+============================================================
+TEST 1: Random floating point number
+============================================================
+0.2407420072402611
+0.3515320854381432
+0.5533095157403602
+0.0660146332110129
+0.5852169352589155
+============================================================
+============================================================
+TEST 2: Random integer
+============================================================
+1
+2
+2
+2
+1
+-9999999999999999
+-9999999999999998
+-9999999999999998
+-9999999999999999
+-9999999999999999
+437063568
+-666106306
+215291590
+364170477
+-276943944
+8769999775679512
+8833715394274005
+38558588213314
+5288608244773258
+8167384417467195
+-5008926051050742
+-6655967122213220
+7529164776533466
+2488672346419615
+9084896187831551
+============================================================
+============================================================
+TEST 3: Random bad arguments
+============================================================
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           rand() expects between 0 and 0 arguments.
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           rand() expects between 0 and 0 arguments.
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           randint() expects between 1 and 2 arguments.
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid operation randint(1, 0)
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid operation randint(1, 1e16)
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid operation randint(9900000000000000, 1e16)
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid operation randint(-1e16, -1000000000000000)
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           randint() expects between 1 and 2 arguments.
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid operation randint(1, nan)
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid operation randint(1, inf)
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid operation randint(nan, 0)
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid operation randint(inf, 0)
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+0.5455874475799493
+nan
+nan
+nan
+1
+nan
+nan
+nan
+nan
+nan
+nan
+nan
+nan
+nan
+============================================================


Property changes on: trunk/l3kernel/testfiles/m3fp-rand001.tlg
___________________________________________________________________
Added: svn:eol-style
   + native

Added: trunk/l3kernel/testfiles/m3fp-rand001.uptex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3fp-rand001.uptex.tlg	                        (rev 0)
+++ trunk/l3kernel/testfiles/m3fp-rand001.uptex.tlg	2016-11-21 01:24:26 UTC (rev 6750)
@@ -0,0 +1,211 @@
+This is a generated file for the LaTeX (2e + expl3) validation system.
+Don't change this file in any respect.
+Author: Bruno Le Floch
+============================================================
+TEST 1: Random floating point number
+============================================================
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Random numbers unavailable
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+nan, 
+============================================================
+============================================================
+TEST 2: Random integer
+============================================================
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Random numbers unavailable
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Random numbers unavailable
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Random numbers unavailable
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Random numbers unavailable
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Random numbers unavailable
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+nan, nan, nan, nan, nan, 
+============================================================
+============================================================
+TEST 3: Random bad arguments
+============================================================
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Random numbers unavailable
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           rand() expects between 0 and 0 arguments.
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           rand() expects between 0 and 0 arguments.
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           randint() expects between 1 and 2 arguments.
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Random numbers unavailable
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid operation randint(1, 0)
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid operation randint(1, 1e16)
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid operation randint(9900000000000000, 1e16)
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid operation randint(-1e16, -1000000000000000)
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           randint() expects between 1 and 2 arguments.
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid operation randint(1, nan)
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid operation randint(1, inf)
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid operation randint(nan, 0)
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid operation randint(inf, 0)
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+nan
+nan
+nan
+nan
+nan
+nan
+nan
+nan
+nan
+nan
+nan
+nan
+nan
+nan
+============================================================


Property changes on: trunk/l3kernel/testfiles/m3fp-rand001.uptex.tlg
___________________________________________________________________
Added: svn:eol-style
   + native

Added: trunk/l3kernel/testfiles/m3fp-rand001.xetex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3fp-rand001.xetex.tlg	                        (rev 0)
+++ trunk/l3kernel/testfiles/m3fp-rand001.xetex.tlg	2016-11-21 01:24:26 UTC (rev 6750)
@@ -0,0 +1,211 @@
+This is a generated file for the LaTeX (2e + expl3) validation system.
+Don't change this file in any respect.
+Author: Bruno Le Floch
+============================================================
+TEST 1: Random floating point number
+============================================================
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Random numbers unavailable
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+nan, 
+============================================================
+============================================================
+TEST 2: Random integer
+============================================================
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Random numbers unavailable
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Random numbers unavailable
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Random numbers unavailable
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Random numbers unavailable
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Random numbers unavailable
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+nan, nan, nan, nan, nan, 
+============================================================
+============================================================
+TEST 3: Random bad arguments
+============================================================
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Random numbers unavailable
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           rand() expects between 0 and 0 arguments.
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           rand() expects between 0 and 0 arguments.
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           randint() expects between 1 and 2 arguments.
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Random numbers unavailable
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid operation randint(1, 0)
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid operation randint(1, 1e16)
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid operation randint(9900000000000000, 1e16)
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid operation randint(-1e16, -1000000000000000)
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           randint() expects between 1 and 2 arguments.
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid operation randint(1, nan)
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid operation randint(1, inf)
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid operation randint(nan, 0)
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid operation randint(inf, 0)
+l. ...  }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+nan
+nan
+nan
+nan
+nan
+nan
+nan
+nan
+nan
+nan
+nan
+nan
+nan
+nan
+============================================================


Property changes on: trunk/l3kernel/testfiles/m3fp-rand001.xetex.tlg
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/l3kernel/testfiles/m3fp-round002.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3fp-round002.tlg	2016-11-19 00:43:44 UTC (rev 6749)
+++ trunk/l3kernel/testfiles/m3fp-round002.tlg	2016-11-21 01:24:26 UTC (rev 6750)
@@ -6,7 +6,7 @@
 ============================================================
 ! Undefined control sequence.
 <argument> \LaTeX3 error: 
-                           Missing number before ')'.
+                           round() expects between 1 and 3 arguments.
 l. ...  }
 The control sequence at the end of the top line
 of your error message was never \def'ed. If you have
@@ -51,7 +51,7 @@
 and I'll forget about whatever was undefined.
 ! Undefined control sequence.
 <argument> \LaTeX3 error: 
-                           Missing number before ')'.
+                           trunc() expects between 1 and 2 arguments.
 l. ...  }
 The control sequence at the end of the top line
 of your error message was never \def'ed. If you have
@@ -78,7 +78,7 @@
 and I'll forget about whatever was undefined.
 ! Undefined control sequence.
 <argument> \LaTeX3 error: 
-                           Missing number before ')'.
+                           ceil() expects between 1 and 2 arguments.
 l. ...  }
 The control sequence at the end of the top line
 of your error message was never \def'ed. If you have
@@ -105,7 +105,7 @@
 and I'll forget about whatever was undefined.
 ! Undefined control sequence.
 <argument> \LaTeX3 error: 
-                           Missing number before ')'.
+                           floor() expects between 1 and 2 arguments.
 l. ...  }
 The control sequence at the end of the top line
 of your error message was never \def'ed. If you have



More information about the latex3-commits mailing list