Overview
Comment:Fix to prevent numbers being formed with a decimal point in the exponent, Reduce cannot handle these.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: a662d2a62bf70cd5c017fe99d24161c7f093359191682ee503b62cd1db165c95
User & Date: geraint@users.sourceforge.net on 2002-08-09 14:34:45
Other Links: branch diff | manifest | tags
Context
2002-08-09
21:40:19
Now writes log files of gnuplot input, output and errors. check-in: 1f01025594 user: geraint@users.sourceforge.net tags: origin/master, trunk
14:34:45
Fix to prevent numbers being formed with a decimal point in the exponent, Reduce cannot handle these. check-in: a662d2a62b user: geraint@users.sourceforge.net tags: origin/master, trunk
2002-08-07
14:27:14
Changes to make "-i dassl" work again. check-in: 1efcb05487 user: geraint@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/def2write_r from [de9308bd30] to [cb41fd29d7].

9
10
11
12
13
14
15



16
17
18
19
20
21
22
# Copyright (C) 2000 by Peter J. Gawthrop

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$



## Revision 1.12  2002/06/28 10:13:40  geraint
## Includes fix_c.r in ese2rdae and def2write_r to eliminate occurrances of x**y.
##
## Revision 1.11.2.1  2002/06/05 11:14:51  geraint
## ae.r now generated using def2write_r like cse?.r
## fix_c.r called at ese2rdae stage so that pow gets fixed in ae.r.
##







>
>
>







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Copyright (C) 2000 by Peter J. Gawthrop

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.13  2002/07/10 17:43:05  geraint
## Added feature [ 562453 ] Optimisation of algebraic equations.
##
## Revision 1.12  2002/06/28 10:13:40  geraint
## Includes fix_c.r in ese2rdae and def2write_r to eliminate occurrances of x**y.
##
## Revision 1.11.2.1  2002/06/05 11:14:51  geraint
## ae.r now generated using def2write_r like cse?.r
## fix_c.r called at ese2rdae stage so that pow gets fixed in ae.r.
##
151
152
153
154
155
156
157

158
159
160
161
162
163
164
165
	print $0
}
(NF > 1) {
	lhs=$1 ;
	rhs=$2" " ;
	rhs1 = gensub ( /([^A-Za-z_0-9\.\+])([0-9]+)([^\.0-9])/ , "\\1\\2.0\\3" , "g", rhs );
	rhs2 = gensub ( /([^e]\+)([0-9]+)([^\.0-9])/ , "\\1\\2.0\\3" , "g", rhs1 );

	printf "%s:=%s$\n", lhs, rhs2 ;
    }'
}

mtt_optimise ()
{
    sys="$1"
    lhs="$2"







>
|







154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
	print $0
}
(NF > 1) {
	lhs=$1 ;
	rhs=$2" " ;
	rhs1 = gensub ( /([^A-Za-z_0-9\.\+])([0-9]+)([^\.0-9])/ , "\\1\\2.0\\3" , "g", rhs );
	rhs2 = gensub ( /([^e]\+)([0-9]+)([^\.0-9])/ , "\\1\\2.0\\3" , "g", rhs1 );
	rhs3 = gensub ( /([^A-Za-z_0-9\.\+])([0-9]+)e([0-9]+).0([^\.0-9])/ , "\\1\\2\\3\\4" , "g" , rhs)
	printf "%s:=%s$\n", lhs, rhs3 ;
    }'
}

mtt_optimise ()
{
    sys="$1"
    lhs="$2"


MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]