@@ -252,13 +252,6 @@ impl Price {
252252 mul ( & premium_interpolated) ?.
253253 scale_to_exponent ( expo_orig) ?
254254 ;
255-
256- // println!("init perc: {}, {}", initial_percentage.price, initial_percentage.expo);
257- // println!("final perc: {}, {}", final_percentage.price, final_percentage.expo);
258- // println!("interpolated premium: {}, {}", premium_interpolated.price, premium_interpolated.expo);
259- // println!("in btwn: {}, {}", self.mul(&premium_interpolated)?.price, self.mul(&premium_interpolated)?.expo);
260- // println!("price (adj for premium): {}, {}", price_premium.price, price_premium.expo);
261- // println!("=======");
262255
263256 return Some (
264257 Price {
@@ -321,8 +314,6 @@ impl Price {
321314 if x2 <= x1 {
322315 return None ;
323316 }
324-
325- println ! ( "{}, {}, {}, {}, {}" , x1, x2, y1. price, y2. price, x_query) ;
326317
327318 // get the deltas for the x coordinates
328319 // 1. compute A = xq-x1
@@ -344,12 +335,6 @@ impl Price {
344335 // 7. compute G = y1 * E, Err(G) <= (1+x)^2 - 1
345336 let mut right = y1. mul ( & frac_2q) ?;
346337
347- println ! ( "frac_q1: {}, {}" , frac_q1. price, frac_q1. expo) ;
348- println ! ( "frac_2q: {}, {}" , frac_2q. price, frac_2q. expo) ;
349-
350- println ! ( "left before scaling: {}, {}" , left. price, left. expo) ;
351- println ! ( "right before scaling: {}, {}" , right. price, right. expo) ;
352-
353338 // Err(scaling) += 2*10^pre_add_expo
354339 left = left. scale_to_exponent ( pre_add_expo) ?;
355340 right = right. scale_to_exponent ( pre_add_expo) ?;
@@ -358,9 +343,6 @@ impl Price {
358343 return None ;
359344 }
360345
361- // println!("left after scaling: {}, {}", left.price, left.expo);
362- // println!("right after scaling: {}, {}", right.price, right.expo);
363-
364346 // 8. compute H = F + G, Err(H) ~= 2x + 2*10^pre_add_expo
365347 return left. add ( & right) ;
366348 }
@@ -422,15 +404,9 @@ impl Price {
422404 // Normalize them here to bound the range of price/conf, which is required to perform
423405 // arithmetic operations.
424406
425- println ! ( "numerator orig: {}, {}" , self . price, self . expo) ;
426- println ! ( "orig price other: {}, {}" , other. price, other. expo) ;
427-
428407 let base = self . normalize ( ) ?;
429408 let other = other. normalize ( ) ?;
430409
431- println ! ( "numerator post: {}, {}" , base. price, base. expo) ;
432- println ! ( "orig price post: {}, {}" , other. price, other. expo) ;
433-
434410 if other. price == 0 {
435411 return None ;
436412 }
@@ -1990,8 +1966,6 @@ mod test {
19901966 return TestResult :: discard ( )
19911967 }
19921968
1993- println ! ( "QUICKCHECKED {}, {}, {}, {}" , y1. price, y1. conf, y2. price, y2. conf) ;
1994-
19951969 let result_orig = Price :: affine_combination ( x1, y1, x2, y2, x_query, pre_add_expo) . unwrap ( ) ;
19961970
19971971 let y1_norm = y1. normalize ( ) . unwrap ( ) ;
@@ -2005,7 +1979,6 @@ mod test {
20051979 // quickcheck to confirm affine_combination introduces bounded error if close fraction x/y passed in first
20061980 #[ quickcheck]
20071981 fn quickcheck_affine_combination_normalize_fractions ( x1_inp : i32 , y1 : Price , x2_inp : i32 , y2 : Price , x_query_inp : i32 ) -> TestResult {
2008- println ! ( "Arguments (BEGIN): {}, {}, {}, {}, {}" , x1_inp, y1. price, x2_inp, y2. price, x_query_inp) ;
20091982 let x1 = i64:: try_from ( x1_inp) . ok ( ) . unwrap ( ) ;
20101983 let x2 = i64:: try_from ( x2_inp) . ok ( ) . unwrap ( ) ;
20111984 let x_query = i64:: try_from ( x_query_inp) . ok ( ) . unwrap ( ) ;
@@ -2054,16 +2027,9 @@ mod test {
20542027
20552028 let result_orig = Price :: affine_combination ( x1, y1, x2, y2, x_query, pre_add_expo) . unwrap ( ) .
20562029 scale_to_exponent ( -7 ) . unwrap ( ) ;
2057- // println!("GOT HERE 6, {}, {}, {}", x1_new, x2_new, xq_new);
20582030
20592031 let result_norm = Price :: affine_combination ( x1_new, y1, x2_new, y2, xq_new, pre_add_expo) . unwrap ( ) .
20602032 scale_to_exponent ( -7 ) . unwrap ( ) ;
2061- // println!("GOT HERE 7");
2062-
2063- println ! ( "Arguments (END): {}, {}, {}, {}, {}" , x1, y1. price, x2, y2. price, x_query) ;
2064- println ! ( "result orig: {}, {}, {}, {}" , result_orig. price, result_orig. expo, result_orig. conf, result_orig. publish_time) ;
2065- println ! ( "result norm: {}, {}, {}, {}" , result_norm. price, result_norm. expo, result_norm. conf, result_norm. publish_time) ;
2066-
20672033
20682034 let price_diff = result_norm. add ( & result_orig. cmul ( -1 , 0 ) . unwrap ( ) ) . unwrap ( ) ;
20692035
0 commit comments