This is a post in which i express my gratitude to my husband for letting me try my hand at writing, and the mathematical skills I have developed through all of this. This is the first of many posts to come.
Math is a huge part of my life. My brother used to tell me that I had a knack for math, but that I’m just too young to appreciate it. “Too young to know that the value of a coin is equal to the number of things on a given face. Too young to know that 0.5 is as good as a pizza.” But math is something that I do, and something that I enjoy every day.
It’s not about being too young to appreciate math. I actually enjoy what I do. I like the fact that I can do math and come up with ideas and solutions. It’s just that I’m only able to do it when I’m at work and I’m not able to do it when I’m at home.
The biggest problem with a hack like this is that its only going to be effective in an environment with a relatively limited number of numbers. So what we have is a hack that will only work with 12. What we really need is a way to make an equation that works even with 13.
This is where the math abs hack comes in. It doesn’t have a lot of features and is quite simple, so don’t expect it to be the best solution.
The Math.abs() function works well enough for most uses (the first two examples are pretty straight forward), but lets look at the last one.