From 32d5d21b5b92a8ee802f1d4e815f776db20941a2 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 18 May 2019 16:09:28 +0000 Subject: increase trie_size and triec_size git-svn-id: svn://tug.org/texlive/trunk@51154 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/ChangeLog | 8 ++++++++ Build/source/texk/web2c/patgen.ch | 14 +++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog index 8dc5ec005ca..3f62fac9770 100644 --- a/Build/source/texk/web2c/ChangeLog +++ b/Build/source/texk/web2c/ChangeLog @@ -1,3 +1,11 @@ +2019-05-18 Karl Berry + + * patgen.ch (trie_size), + (triec_size): increase to maximum values 110021182 and 55000006 + as reported by Keno Wehr, + (print_real calls): reorder parentheses to avoid overflow. + https://tug.org/pipermail/tex-live/2019-May/043679.html. + 2019-05-08 Akira Kakuto * texmfmp.h: Define a new function find_input_file(integer s). diff --git a/Build/source/texk/web2c/patgen.ch b/Build/source/texk/web2c/patgen.ch index 600e8a8b568..25ebfb4bb32 100644 --- a/Build/source/texk/web2c/patgen.ch +++ b/Build/source/texk/web2c/patgen.ch @@ -72,14 +72,14 @@ begin @!text_char=ASCII_code; {the data type of characters in text files} @z -@x Increase constants. +@x Maximum constant values from Keno Wehr, 17 May 2019 16:03:00 on tex-live. @!trie_size=55000; {space for pattern trie} @!triec_size=26000; {space for pattern count trie, must be less than |trie_size| and greater than the number of occurrences of any pattern in the dictionary} @y -@!trie_size=10000000; {space for pattern trie} -@!triec_size=5000000; {space for pattern count trie, must be less than +@!trie_size=110021182; {max space for pattern trie} +@!triec_size=54677566; {max space for pattern count trie, must be less than |trie_size| and greater than the number of occurrences of any pattern in the dictionary} @z @@ -146,18 +146,18 @@ reset (dictionary, f_name); filnam[7]:=xdig[hyph_level]; @z -@x Work around floating point I/O deficiency. +@x Work around floating point I/O deficiency; reorder to avoid overflow. if (good_count+miss_count)>0 then print_ln((100*good_count/(good_count+miss_count)):1:2,' %, ', (100*bad_count/(good_count+miss_count)):1:2,' %, ', (100*miss_count/(good_count+miss_count)):1:2,' %'); @y if (good_count+miss_count)>0 then - begin print_real((100*good_count/(good_count+miss_count)),1,2); + begin print_real((100*(good_count/(good_count+miss_count))),1,2); print(' %, '); - print_real((100*bad_count/(good_count+miss_count)),1,2); + print_real((100*(bad_count/(good_count+miss_count))),1,2); print(' %, '); - print_real((100*miss_count/(good_count+miss_count)),1,2); + print_real((100*(miss_count/(good_count+miss_count))),1,2); print_ln(' %'); end; @z -- cgit v1.2.3