From c57c3fe97251eb98bee08d1ab2e01d0089155eaa Mon Sep 17 00:00:00 2001 From: rlar Date: Sun, 21 Nov 2010 15:41:38 +0000 Subject: [PATCH] d_source d_state, change float --> double --- ChangeLog | 5 +++++ src/xspice/icm/digital/d_source/cfunc.mod | 10 +++++----- src/xspice/icm/digital/d_state/cfunc.mod | 10 +++++----- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8c5550a35..590ffdfc6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-11-21 Robert Larice + * src/xspice/icm/digital/d_source/cfunc.mod , + * src/xspice/icm/digital/d_state/cfunc.mod : + d_source d_state, change float --> double + 2010-11-21 Robert Larice * configure.ac , * tests/Makefile.am , diff --git a/src/xspice/icm/digital/d_source/cfunc.mod b/src/xspice/icm/digital/d_source/cfunc.mod index 56276ca26..699570685 100644 --- a/src/xspice/icm/digital/d_source/cfunc.mod +++ b/src/xspice/icm/digital/d_source/cfunc.mod @@ -335,7 +335,7 @@ deck and returns a floating point equivalent value. static int cnv_get_spice_value( char *str, /* IN - The value text e.g. 1.2K */ -float *p_value ) /* OUT - The numerical value */ +double *p_value ) /* OUT - The numerical value */ { @@ -350,8 +350,8 @@ float *p_value ) /* OUT - The numerical value */ char c = ' '; char c1; - float scale_factor; - float value; + double scale_factor; + double value; /* Scan the input string looking for an alpha character that is not */ @@ -442,7 +442,7 @@ float *p_value ) /* OUT - The numerical value */ /* Convert the numeric portion to a float and multiply by the */ /* scale factor. */ - n_matched = sscanf(val_str,"%e",&value); + n_matched = sscanf(val_str,"%le",&value); if(n_matched < 1) { *p_value = 0.0; @@ -836,7 +836,7 @@ static int cm_read_source(FILE *source,short *bits,double *timepoints, *token; /* a particular token from the string */ - float number; /* holding variable for timepoint values */ + double number; /* holding variable for timepoint values */ double double1, /* temporary holding variable */ double2; /* temporary holding variable */ diff --git a/src/xspice/icm/digital/d_state/cfunc.mod b/src/xspice/icm/digital/d_state/cfunc.mod index c7b45eed2..06d6453f0 100644 --- a/src/xspice/icm/digital/d_state/cfunc.mod +++ b/src/xspice/icm/digital/d_state/cfunc.mod @@ -394,7 +394,7 @@ deck and returns a floating point equivalent value. static int cnv_get_spice_value( char *str, /* IN - The value text e.g. 1.2K */ -float *p_value ) /* OUT - The numerical value */ +double *p_value ) /* OUT - The numerical value */ { @@ -409,8 +409,8 @@ float *p_value ) /* OUT - The numerical value */ char c = ' '; char c1; - float scale_factor; - float value; + double scale_factor; + double value; /* Scan the input string looking for an alpha character that is not */ @@ -501,7 +501,7 @@ float *p_value ) /* OUT - The numerical value */ /* Convert the numeric portion to a float and multiply by the */ /* scale factor. */ - n_matched = sscanf(val_str,"%e",&value); + n_matched = sscanf(val_str,"%le",&value); if(n_matched < 1) { *p_value = 0.0; @@ -1522,7 +1522,7 @@ static int cm_read_state_file(FILE *state_file,State_Table_t *states) *token; /* a particular token from the string */ - float number; /* holding variable for timepoint values */ + double number; /* holding variable for timepoint values */ short bit_value=0; /* holding variable for value read from state.in file which needs to be stored */