This is a very helpful link to help you understand how it was done. You don't need to be a math genius, all you need is a good calculator to understand the values in the ECU.
It teaches the basics of hex code and the basics of tuning an eprom ecu. Though this guide is for the vg30dett, you could easily use this guide and transfer a lot of the information over to ecu's like for the ca18det, rb20/25/26 or ka24e/de. Though it's all nissan, you could easily tune other cars with it too.
I know this doesn't pertain to anything about our elantras, but since we are all enthusiasts here, I thought you guys would enjoy the read.