SHARE
TWEET

Untitled

a guest Apr 26th, 2017 26 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sclr
  2. engineer_math_mult(Sclr multiplicand, Sclr multiplier)
  3. {
  4.    Sclr output;
  5.  
  6.    output   = multiplicand * multiplier;
  7.    output  += (output & (2 * (RADIX - 1)) ) * 2;
  8.    output >>= RADIX;
  9.  
  10.    return output;
  11. }
  12.  
  13. Sclr
  14. engineer_math_divd(Sclr dividend, Sclr divisor)
  15. {
  16.    Sclr output;
  17.  
  18.    output = (dividend << RADIX) / divisor;
  19.  
  20.    return output;
  21. }
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