I need to take 32-bit unsigned integers and scale them to 16-bit unsigned integers "evenly" so that $0 \mapsto 0$ and `0xFFFFFFFF` $\mapsto$ `0xFFFF`. I also want to do this without using a 64-bit unsigned integer built-in type.

To give you an idea, going in the opposite direction, the formula for 16-bit to 32-bit scaling is:

```
U16 y = 0x3290;   // example input
U32 x = ((U32)y << 16) + y;      // formula implementation

```

To arrive at the formula in the title, I simply took two points on the line that is the graph of $f$, and calculated the slope and y-intercept, like in Alg 1. 

Those are the rules. Good luck!