Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 038435b3736cb2a5a3114fc790562a9e822b529f
Ticket: 1198892fffffffffffffffffffffffffffffffff
expr {2**0} returns 2 instead of 1
User & Date: arjenmarkus on 2005-05-10 09:23:18
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    As described by Kaitschu in a posting to comp.lang.tcl,
    the command [expr {2**0}] returns 2 instead of 1.
    
    I checked this somewhat special case in the test file,
    but there is none that explicitly tests this one (there
    are related tests). Note that [expr {2.0**0}] _does_
    return 1.0, as does [expr {2**0.0}]
    
    To solve the bug:
    - Correct the code in tclExecute.c
    - Add tests for this exponent to expr.test
    
  4. foundin changed to: "obsolete: 8.5a3"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "arjenmarkus"
  9. subsystem changed to: "16. Commands A-H"
  10. title changed to: "expr {2**0} returns 2 instead of 1"
  11. type changed to: "Bug"