diff options
author | Erik Schnetter <schnetter@gmail.com> | 2013-01-15 19:43:47 -0500 |
---|---|---|
committer | Erik Schnetter <schnetter@gmail.com> | 2013-01-15 19:43:47 -0500 |
commit | 475da3e1b21791901670acf018b636b15d2be535 (patch) | |
tree | 8eda7f150952a41e2f41d26a2db384f3f158760b /Tools/CodeGen/CodeGenCactus.m | |
parent | 784a060e6c538f4c0b83f4b537c1c6d7811053f9 (diff) |
Do not generate integer constants
Do not generate integer constants; this may fail if they are arguments to two-argument functions (e.g. pow) with some C++ compilers.
Diffstat (limited to 'Tools/CodeGen/CodeGenCactus.m')
-rw-r--r-- | Tools/CodeGen/CodeGenCactus.m | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Tools/CodeGen/CodeGenCactus.m b/Tools/CodeGen/CodeGenCactus.m index 3117b12..6088e6c 100644 --- a/Tools/CodeGen/CodeGenCactus.m +++ b/Tools/CodeGen/CodeGenCactus.m @@ -763,6 +763,8 @@ DefFn[ (* Avoid rational numbers *) rhs = rhs /. xx_Rational :> N[xx, 30]; + (* Avoid integers *) + rhs = rhs /. xx_Integer :> 1.0*xx; (* Simple optimisations *) rhs = rhs /. IfThen[_, aa_, aa_] -> aa; |