SHARE
TWEET

Untitled

a guest Oct 18th, 2019 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. use num_traits::One;
  2.  
  3. pub type Scalar = u32;
  4.  
  5. pub fn short_mul(a: &mut Vec<Scalar>, b: Scalar) {
  6.     let mut prev = a[0];
  7.     a[0] *= b;
  8.     for v in a.iter_mut().skip(1) {
  9.         let this = *v;
  10.         *v = prev + *v * b;
  11.         prev = this;
  12.     }
  13.     a.push(Scalar::one());
  14. }
  15.  
  16. fn main() {
  17.    
  18.    
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top