For floating point number like float ,double etc result type is double
For integer type numbers like int , long etc the result type is int
If we have a float and a long the result should be double because one number is floating type.
Regards,
Amit Mahajan