Month: December 2018

Absolutely

As a programmer, you will be quite familiar with the abs function. I thought I was. In fact, it was filed in my brain drawer with the absolute mathematical function. It takes a number and returns an always-positive or zero result. Right?

Well, mostly. This morning, while typing in the Scala REPL:

scala> Math.abs(Int.MinValue)
res0: Int = -2147483648
Continue reading “Absolutely”