added script that tests relative error as a function of k