changeset 1247:163207b736c5 draft

fix if judgment
author Daichi Toma <toma@cr.ie.u-ryukyu.ac.jp>
date Sat, 12 Nov 2011 15:28:14 +0900
parents cd50c48f45e7
children d2f70da2aa19
files example/Miller_Rabin/ppe/Prime.cc example/Miller_Rabin/spe/Prime.cc
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/example/Miller_Rabin/ppe/Prime.cc	Thu Nov 03 20:40:17 2011 +0900
+++ b/example/Miller_Rabin/ppe/Prime.cc	Sat Nov 12 15:28:14 2011 +0900
@@ -16,7 +16,7 @@
 	U64 result = 1;
 
 	while (power > 0) {
-		if ( power & 1 == 1 ) {
+		if ( (power & 1) == 1 ) {
 			result = (result * base) % mod;
 		}
 		base = ( base * base ) % mod;
--- a/example/Miller_Rabin/spe/Prime.cc	Thu Nov 03 20:40:17 2011 +0900
+++ b/example/Miller_Rabin/spe/Prime.cc	Sat Nov 12 15:28:14 2011 +0900
@@ -16,7 +16,7 @@
 	U64 result = 1;
 
 	while (power > 0) {
-		if ( power & 1 == 1 ) {
+		if ( (power & 1) == 1 ) {
 			result = (result * base) % mod;
 		}
 		base = ( base * base ) % mod;