Barclays interview question

some logrithmic expression and validate the range for int double/int/float