Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 9c8161eb4625157ead9f1f51d09c97357ba8c0d59d28ccbd3d272b070e4d7cfe
Ticket: 999b6966b29915bf9e3754969e5521e7573dc667
lseq has incorrect results in edge cases
User & Date: griffin on 2026-01-14 16:09:40
Changes

  1. icomment:
    Errors are reserved for any arguments that are invalid, e.g. a numeric argument is not a number. Otherwise, a sequence is created. 
    
    A sequence is defined as a mathematic expression:  Y = mX + b
    
    The list also has a size (length) limit based on the arguments (start, end, step):
    
        count = int( (end - start + 1) / step )
    
    If the count is 0 or negative, the sequence is considered empty, and an empty set is a valid result.
    
    The sequence can be the empty set when a terminating boundary is met, and there are no prior results, 
    or if the direction of the sequence is inconsistent. For example, the sequence from 1 to 10 by -1 will produce the empty set since the direction of the range is opposite of the increment.
    
    With that being said, there are bugs in the algorithm that need to be addressed.
    
  2. login: "griffin"
  3. mimetype: "text/x-markdown"