Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: fcf3b0ba11bf80c3e3141bcd4b9be1332b83382c
Ticket: 852280ffffffffffffffffffffffffffffffffff
binary format conversion error
User & Date: nobody on 2003-12-01 19:57:40
Changes

  1. assignee changed to: "hobbs"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Hi all !
    
    I am using Linux 9 w Tcl 8.4.4.-34.
    Got a funny mistake from Tcl, maybe
    the new release fixes it, haven't checked
    it yet.
    
    Trying to convert string to binary double,
    32Bit-float like this:
    
    set datei [open "test.bin" w]
    puts -nonewline $datei [binary format "f" [format "%
    E" 0.3705]]
    close $datei
    
    Problem: binary number yields
    0.1869516 !
    
    Also tried:
    "0.3705"
    "3.705E-1"
    instead of 0.3705 but problems still there.
    
    However, only some numbers are converted wrongly.
    E.g. 0.364 converts correctly !
    To me, it looks arbitrary, but I see it on all my graphs
    (Exporting data from my db to scilab).
    Therefore I need exactly this binary format, no other 
    avail. 
    
    Ok. Trying new version but don't think this bug
    is resolved.
    
    Thanks in advance for the help
    
    Bjoern
    
    
    
    
    
    
  4. foundin changed to: "obsolete: 8.4.4"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "11. Conversions from String"
  10. title changed to: "binary format conversion error"
  11. type changed to: "Bug"