Solve thin lens equation for focal length.
The thin lens equation relates focal length, object distance and image distance as reciprocals: one over f equals one over the object distance plus one over the image distance. Solving for the image distance and applying the magnification relation m equals minus image distance over object distance gives both the position and the size of the image, with the sign convention carrying the physical meaning — a positive image distance is a real image, a negative one is virtual.
Thin lens equation
1/f = 1/do + 1/di, so di = 1 / (1/f - 1/do); m = -di/do; image height = m x object height
That the image is inverted relative to the object. A magnification of -0.5 means the image is upside down and half the object's height, which is exactly what a converging lens produces for an object beyond twice the focal length.
The reciprocal difference goes to zero and the rays emerge parallel, so the image forms at infinity. The calculator detects that case rather than returning a meaningless huge number.
Yes, with a negative focal length. A diverging lens always produces a virtual, upright, reduced image, which shows up as a negative image distance and a positive magnification below 1.