cpp: Resolve an ambiguous overload in some tests sqrt is defined for floats and long doubles in addition to doubles. Add a cast (from int) to specify which one we want.