Update REPL.c

added max/min as well as basic arithmetic error handling