Tcl Source Code

Check-in [2088e4d384]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to tclconference@googlegroups.com
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:
[kennykb-numerics-branch]
* generic/tclBasic.c: Restored round(.) to the Tcl 8.4 rules.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | kennykb-numerics-branch
Files: files | file ages | folders
SHA1:2088e4d3840323b52c2d88f7a29096a771e7c475
User & Date: dgp 2005-08-29 17:11:58
Context
2005-08-29
18:38
[kennykb-numerics-branch] Merge updates from HEAD.
check-in: c74bd61cc0 user: dgp tags: kennykb-numerics-branch
17:11
[kennykb-numerics-branch]
* generic/tclBasic.c: Restored round(.) to the Tcl 8.4 ...
check-in: 2088e4d384 user: dgp tags: kennykb-numerics-branch
2005-08-25
21:21
[kennykb-numerics-branch]
* generic/tclExecute.c: Bug fix. INST_RSHIFT: shift of n...
check-in: 0e9fcc9b56 user: dgp tags: kennykb-numerics-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.







1
2
3
4
5
6
7






2005-08-25  Donal K. Fellows  <donal.k.fellows@man.ac.uk>

	* generic/tclExecute.c (TEBC:INST_DICT_LAPPEND): Stop dropping a
	duplicated object on the floor, which was a memory leak (and a wrong
	result too). Thanks to Andreas Kupries for reporting this.

2005-08-25  Don Porter  <dgp@users.sourceforge.net>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
2005-08-29  Don Porter  <dgp@users.sourceforge.net>

	[kennykb-numerics-branch]

	* generic/tclBasic.c:	Restored round(.) to the Tcl 8.4 rules.

2005-08-25  Donal K. Fellows  <donal.k.fellows@man.ac.uk>

	* generic/tclExecute.c (TEBC:INST_DICT_LAPPEND): Stop dropping a
	duplicated object on the floor, which was a memory leak (and a wrong
	result too). Thanks to Andreas Kupries for reporting this.

2005-08-25  Don Porter  <dgp@users.sourceforge.net>

Changes to generic/tclBasic.c.

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
....
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
 * Copyright (c) 1994-1997 Sun Microsystems, Inc.
 * Copyright (c) 1998-1999 by Scriptics Corporation.
 * Copyright (c) 2001, 2002 by Kevin B. Kenny.  All rights reserved.
 *
 * See the file "license.terms" for information on usage and redistribution
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 * RCS: @(#) $Id: tclBasic.c,v 1.136.2.29 2005/08/25 15:46:30 dgp Exp $
 */

#include "tclInt.h"
#include "tclCompile.h"
#include <float.h>
#include <math.h>
#include "tommath.h"
................................................................................
	    return TCL_ERROR;
	}
    } else {
	if (TclInitBignumFromDouble(interp, intPart, &big) != TCL_OK) {
	    return TCL_ERROR;
	}
	if (fractPart < 0.0) {
	    if (fractPart < -0.5
		    || (fractPart == -0.5 && fmod(intPart, 2.0) != 0.0)) {
		mp_sub_d(&big, 1, &big);
	    }
	} else if (fractPart > 0.5
		|| (fractPart == 0.5 && fmod(intPart, 2.0) != 0.0)) {
	    mp_add_d(&big, 1, &big);
	}
    }
    Tcl_SetObjResult(interp, Tcl_NewBignumObj(&big));
    return TCL_OK;
#endif
}







|







 







|
<


|
<







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
....
5628
5629
5630
5631
5632
5633
5634
5635

5636
5637
5638

5639
5640
5641
5642
5643
5644
5645
 * Copyright (c) 1994-1997 Sun Microsystems, Inc.
 * Copyright (c) 1998-1999 by Scriptics Corporation.
 * Copyright (c) 2001, 2002 by Kevin B. Kenny.  All rights reserved.
 *
 * See the file "license.terms" for information on usage and redistribution
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 * RCS: @(#) $Id: tclBasic.c,v 1.136.2.30 2005/08/29 17:11:58 dgp Exp $
 */

#include "tclInt.h"
#include "tclCompile.h"
#include <float.h>
#include <math.h>
#include "tommath.h"
................................................................................
	    return TCL_ERROR;
	}
    } else {
	if (TclInitBignumFromDouble(interp, intPart, &big) != TCL_OK) {
	    return TCL_ERROR;
	}
	if (fractPart < 0.0) {
	    if (fractPart <= -0.5) {

		mp_sub_d(&big, 1, &big);
	    }
	} else if (fractPart >= 0.5) {

	    mp_add_d(&big, 1, &big);
	}
    }
    Tcl_SetObjResult(interp, Tcl_NewBignumObj(&big));
    return TCL_OK;
#endif
}