diff --git a/docs/values-module/3-lp.html b/docs/values-module/3-lp.html index 77b0853ec..2d1a3ba04 100644 --- a/docs/values-module/3-lp.html +++ b/docs/values-module/3-lp.html @@ -1197,9 +1197,13 @@ note that the following uses the raw text of the word. Kinds::Scalings::value_to_quanta(v, lp->scaling, &v, &remainder); literal_pattern_element *lpe = &(lp->lp_elements[ec]); int m = lpe->element_range; - LiteralPatterns::write_val(OUT, m, - (v/(lpe->element_multiplier)) % m + lpe->element_offset, - lpe->number_base, lpe->print_with_leading_zeros); + if (m == 0) + LiteralPatterns::write_val(OUT, 0, + lpe->element_offset, lpe->number_base, lpe->print_with_leading_zeros); + else + LiteralPatterns::write_val(OUT, m, + (v/(lpe->element_multiplier)) % m + lpe->element_offset, + lpe->number_base, lpe->print_with_leading_zeros); if (ec == 0) Index the fractional part of the value25.3.1; } ec++; diff --git a/inform7/Figures/timings-diagnostics.txt b/inform7/Figures/timings-diagnostics.txt index 2ba010edd..ca9aa682b 100644 --- a/inform7/Figures/timings-diagnostics.txt +++ b/inform7/Figures/timings-diagnostics.txt @@ -1,28 +1,28 @@ 100.0% in inform7 run - 66.5% in compilation to Inter - 44.7% in //Sequence::undertake_queued_tasks// - 5.0% in //MajorNodes::pre_pass// - 3.6% in //MajorNodes::pass_1// + 66.7% in compilation to Inter + 45.2% in //Sequence::undertake_queued_tasks// + 4.5% in //MajorNodes::pre_pass// + 3.3% in //MajorNodes::pass_1// 1.8% in //ImperativeDefinitions::assess_all// - 1.4% in //RTKindConstructors::compile// - 1.4% in //RTPhrasebook::compile_entries// - 1.0% in //Sequence::lint_inter// + 1.5% in //RTKindConstructors::compile// + 1.5% in //RTPhrasebook::compile_entries// + 1.1% in //Sequence::lint_inter// 0.3% in //CompletionModule::compile// 0.3% in //ImperativeDefinitions::compile_first_block// 0.3% in //MajorNodes::pass_2// 0.3% in //Sequence::undertake_queued_tasks// 0.3% in //Sequence::undertake_queued_tasks// 0.3% in //World::stage_V// - 5.1% not specifically accounted for - 26.9% in running Inter pipeline - 9.0% in step 14/15: generate inform6 -> auto.inf - 6.9% in step 5/15: load-binary-kits - 5.4% in step 6/15: make-synoptic-module + 5.2% not specifically accounted for + 27.1% in running Inter pipeline + 8.6% in step 14/15: generate inform6 -> auto.inf + 7.1% in step 5/15: load-binary-kits + 5.6% in step 6/15: make-synoptic-module 1.8% in step 9/15: make-identifiers-unique 0.3% in step 12/15: eliminate-redundant-operations 0.3% in step 4/15: compile-splats 0.3% in step 7/15: shorten-wiring 0.3% in step 8/15: detect-indirect-calls 2.2% not specifically accounted for - 5.8% in supervisor + 5.2% in supervisor 0.8% not specifically accounted for diff --git a/inform7/values-module/Chapter 3/Literal Patterns.w b/inform7/values-module/Chapter 3/Literal Patterns.w index 1c8833b34..8ba4cfe5a 100644 --- a/inform7/values-module/Chapter 3/Literal Patterns.w +++ b/inform7/values-module/Chapter 3/Literal Patterns.w @@ -987,9 +987,13 @@ note that the following uses the raw text of the word. Kinds::Scalings::value_to_quanta(v, lp->scaling, &v, &remainder); literal_pattern_element *lpe = &(lp->lp_elements[ec]); int m = lpe->element_range; - LiteralPatterns::write_val(OUT, m, - (v/(lpe->element_multiplier)) % m + lpe->element_offset, - lpe->number_base, lpe->print_with_leading_zeros); + if (m == 0) + LiteralPatterns::write_val(OUT, 0, + lpe->element_offset, lpe->number_base, lpe->print_with_leading_zeros); + else + LiteralPatterns::write_val(OUT, m, + (v/(lpe->element_multiplier)) % m + lpe->element_offset, + lpe->number_base, lpe->print_with_leading_zeros); if (ec == 0) @; } ec++;