Tcl Library Source Code

Ticket Change Details
Login
Overview

Artifact ID: 58e772a8908efe2309dc8a3ec0e628575d114dd9d10dda2810aa305aea5e15f6
Ticket: e99fe133e61b7868a4c2f7d9c2e6cb2f164a7246
typo in math::combinatorics::permutations
User & Date: emiliano 2025-01-30 01:48:26
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. comment changed to:
    On file modules/math/combinatoricsExt.tcl , line 53
    
    https://core.tcl-lang.org/tcllib/file?ci=tip&name=modules/math/combinatoricsExt.tcl&ln=53
    
    reads
    
        set newfactorial [lindex $$factorial end]
    
    with two $$ on the "factorial" variable. While the code works because the element 0 (which becomes "$1" instead of "1") is never returned, this code path causes the list of cached factorials shimmer to a string and again to a list on every invocation. The obvious solution is to remove the extra "$".
    
  4. foundin changed to: "trunk"
  5. is_private changed to: "0"
  6. login: "emiliano"
  7. mimetype: "text/x-fossil-plain"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "885ae311f5fce05c2a8d9c31d2d2a1b5638ca9df"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "emiliano"
  14. subsystem changed to: "math"
  15. title changed to: "typo in math::combinatorics::permutations"
  16. type changed to: "Bug"