[latex3-commits] [git/LaTeX3-latex3-latex3] master: Ensure benchmark "op" time is non-zero (40fe4dc)

Joseph Wright joseph.wright at morningstar2.co.uk
Fri Oct 26 09:23:59 CEST 2018


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/40fe4dc87ef69e08e359898224a1a15f71680ef7

>---------------------------------------------------------------

commit 40fe4dc87ef69e08e359898224a1a15f71680ef7
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Fri Oct 26 08:23:59 2018 +0100

    Ensure benchmark "op" time is non-zero
    
    On my system, at least, I get random divide-by-zero
    errors due to this coming out too small.


>---------------------------------------------------------------

40fe4dc87ef69e08e359898224a1a15f71680ef7
 l3experimental/l3benchmark/l3benchmark.dtx |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/l3experimental/l3benchmark/l3benchmark.dtx b/l3experimental/l3benchmark/l3benchmark.dtx
index 386e0fd..b8e9766 100644
--- a/l3experimental/l3benchmark/l3benchmark.dtx
+++ b/l3experimental/l3benchmark/l3benchmark.dtx
@@ -425,6 +425,8 @@
       { \int_gset:Nn \g_@@_duration_int { 256 } } % arbitrary single operation
     \@@_aux:
     \fp_gset_eq:NN \g_@@_one_op_fp \g_benchmark_time_fp
+    \fp_compare:nNnT \g_@@_one_op_fp < { 1e-6 }
+      { \fp_gset:Nn \g_@@_one_op_fp { 1e-6 } }
   }
 \cs_new_protected:Npn \benchmark_silent:n #1
   {





More information about the latex3-commits mailing list