11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
* 'double' and the integer types.
*
* Copyright (c) 2005 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: tclStrToD.c,v 1.4.2.4 2005/07/26 04:12:20 dgp Exp $
*
*----------------------------------------------------------------------
*/
#include <tclInt.h>
#include <stdio.h>
#include <stdlib.h>
|
|
|
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
* 'double' and the integer types.
*
* Copyright (c) 2005 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: tclStrToD.c,v 1.4.2.5 2005/09/12 15:40:30 dgp Exp $
*
*----------------------------------------------------------------------
*/
#include <tclInt.h>
#include <stdio.h>
#include <stdlib.h>
|
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
|
} else {
/*
* If f is equal to the smallest significand, then we need another
* factor of FLT_RADIX in s to cope with stepping to the next
* smaller exponent when going to e's predecessor.
*/
rfac2 += bits + log2FLT_RADIX - 1;
sfac2 = 1 + log2FLT_RADIX;
mplusfac2 = bits + log2FLT_RADIX;
mminusfac2 = bits;
}
} else {
/*
* v has digits after the binary point
|
|
|
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
|
} else {
/*
* If f is equal to the smallest significand, then we need another
* factor of FLT_RADIX in s to cope with stepping to the next
* smaller exponent when going to e's predecessor.
*/
rfac2 += bits + log2FLT_RADIX + 1;
sfac2 = 1 + log2FLT_RADIX;
mplusfac2 = bits + log2FLT_RADIX;
mminusfac2 = bits;
}
} else {
/*
* v has digits after the binary point
|