summaryrefslogtreecommitdiffstats
path: root/src/opt/sim/simSwitch.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2009-01-18 08:01:00 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2009-01-18 08:01:00 -0800
commitf936cc0680c98ffe51b3a1716c996072d5dbf76c (patch)
tree784a2a809fb6b972ec6a8e2758ab758ca590d01a /src/opt/sim/simSwitch.c
parentc9ad5880cc61787dec6d018111b63023407ce0e6 (diff)
downloadabc-f936cc0680c98ffe51b3a1716c996072d5dbf76c.tar.gz
abc-f936cc0680c98ffe51b3a1716c996072d5dbf76c.tar.bz2
abc-f936cc0680c98ffe51b3a1716c996072d5dbf76c.zip
Version abc90118
Diffstat (limited to 'src/opt/sim/simSwitch.c')
-rw-r--r--src/opt/sim/simSwitch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/opt/sim/simSwitch.c b/src/opt/sim/simSwitch.c
index 218d4d59..baabc320 100644
--- a/src/opt/sim/simSwitch.c
+++ b/src/opt/sim/simSwitch.c
@@ -97,7 +97,7 @@ float Sim_ComputeSwitching( unsigned * pSimInfo, int nSimWords )
int nOnes, nTotal;
nTotal = 32 * nSimWords;
nOnes = Sim_UtilCountOnes( pSimInfo, nSimWords );
- return (float)2.0 * nOnes * (nTotal - nOnes) / nTotal / nTotal;
+ return (float)2.0 * nOnes / nTotal * (nTotal - nOnes) / nTotal;
}
////////////////////////////////////////////////////////////////////////