diff options
author | shusa <shusa> | 2005-11-15 13:39:39 +0000 |
---|---|---|
committer | shusa <shusa> | 2005-11-15 13:39:39 +0000 |
commit | a3f3f2eabf428791c59cdaaa5b373f74cc94b755 (patch) | |
tree | f62afff42bdf716dc3d5ba9ba21b315f234567c9 /Tools/CodeGen | |
parent | 3f94d792cb0734819b06af06076299826941a841 (diff) |
do not use SQR, CUB, QAD macros for Fortran anymore, since they are not
necessary, and apparently confuse some preprocessors under certain
circumstances.
Diffstat (limited to 'Tools/CodeGen')
-rw-r--r-- | Tools/CodeGen/CodeGen.m | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Tools/CodeGen/CodeGen.m b/Tools/CodeGen/CodeGen.m index 817eb5e..7c8a49d 100644 --- a/Tools/CodeGen/CodeGen.m +++ b/Tools/CodeGen/CodeGen.m @@ -503,13 +503,14 @@ insertFile[name_] := macros SQR, CUB, QAD *) ReplacePowers[x_] := Module[{rhs}, - rhs = x /. Power[xx_, 2] -> SQR[xx]; - rhs = rhs /. Power[xx_, 3] -> CUB[xx]; - rhs = rhs /. Power[xx_, 4] -> QAD[xx]; - rhs = rhs /. Power[xx_, -1] -> INV[xx]; + rhs = x /. Power[xx_, -1] -> INV[xx]; If[SOURCELANGUAGE == "C", Module[{}, + rhs = rhs /. Power[xx_, 2] -> SQR[xx]; + rhs = rhs /. Power[xx_, 3] -> CUB[xx]; + rhs = rhs /. Power[xx_, 4] -> QAD[xx]; + rhs = rhs /. Power[E, power_] -> exp[power]; rhs = rhs /. Power[xx_, 0.5] -> sqrt[xx]; |