Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 0a563595b2daa712e1ef3473ba86eca22d4e5030
Ticket: 1851567fffffffffffffffffffffffffffffffff
expr returns incorrect results on M68K architecture
User & Date: teopetuk on 2007-12-20 20:59:56
Changes

  1. icomment:
    Logged In: YES 
    user_id=410366
    Originator: YES
    
    It's a bug in frexp() function. The following program:
    
    #include <math.h>
    #include <stdio.h>
    
    main() {
            double v;
            int e;
            v = frexp(1.1, &e);
            printf("%g, %d\n", v, e);
            v = frexp(0.1, &e);
            printf("%g, %d\n", v, e);
    }
    
    prints out
    0.55, 1
    0.05, -2147483647
    
    which is obviously wrong. The result should be
    0.55, 1
    0.8, -3
    
    So, there's no bug in Tcl itself.
    
    
  2. login: "teopetuk"
  3. mimetype: "text/plain"
  4. username: "teopetuk"