Q=(1-D1)*wd1 +D2 *wd2 +(1-D3)*wd3 +P1 *WP1 As can be understood by those in the art, the factors desired to minimize, such as the distal bone cutout (D1) and the gaps between the implant and the cortical bone (D3) are manipulated so that higher values are reflected as lower values in the above formula.