/* code here */ /* input is i=0..32000, return -32768..32767 */ return (i%256)*100;