# What is this formula?

i have been asked to plot a graph of the residuals from the following formula:

|y(hat)/y|-1


they said that it was MAPE but i have the formula for MAPE as:

|100*(y-y(hat))/y|


Is my formula for MAPE wrong or is the formula i was given not the formula for MAPE? If it isn't then what is it?

I think your first expression should be $|\frac{\bar y}{y}-1|$, because negative values are meaningless in terms of error.
Note that $|\frac{\bar y}{y}-1|=|\frac{y-\bar y}{y}|$. So the difference between the two formula above is only $\cdot 100$. It is common practice to use the short form, which provides the real information, "$\cdot100$" is only there to call it percentage. When plotting, it doesn't matter which form you use, multiplying each value by a constant will not change shape and the essence of the plot.
Your first formula will yield a negative "MAPE" if $\hat{y}<y$, which can easily happen, but which will be hard to explain to users. Your second formula is indeed the most commonly accepted definition of the MAPE. Unfortunately, there is no universal agreement on what a "Mean Absolute Percentage Error" is, see here.