Hacker News new | ask | show | jobs
by minimax 3815 days ago
As in Javascript, awk represents all numeric values using double precision floating point. I have always thought that was a strange (but not necessarily bad) choice for a language that is basically all about text processing. I guess it works out pretty well if you need to do 3D graphics math.

There is a bit of cheating going on here though. Awk doesn't support true multidimensional arrays. They are depending on a Gawk extension for that bit of functionality.

2 comments

Actually I tried to do without true multidimensional arrays, but deleting and sorting elements would be a pain.
Double precision floats can losslessly manipulate integers with up to 56 bits precision, so you get the best of both worlds with no extra effort.