However when I input a 50.6 hz to pin5 the output value shown on the lcd displayer is 8117 .
Is there anyways, i can change it into decimal value and display 0.0198 on the displayer?
The output of the pulseIn() function is the time in microseconds that it took for the pin to go (or be) LOW, then go HIGH, then go LOW.
8117 is a decimal number, in that it isn't hexidecimal or octal or binary. So that part is already handled. If you want to display 0.0198 on the LCD, I'd suggest that you change:
lcd.print(duration);
to
lcd.print("0.0198");
Though why you would want to do that is a mystery.