Affine arithmetic library