exercism / awk

Exercism exercises in AWK.
https://exercism.org/tracks/awk
MIT License
19 stars 22 forks source link

Add 2 new tests: big numbers #168

Closed glennj closed 2 years ago

glennj commented 2 years ago

This required a reimplementation to avoid arithmetic errors, even with big number support:

$ echo 18670996100153879010063413297699 | gawk -M '{print $1; print int($1/10)}'
18670996100153879010063413297699
1867099610015387799844860985344

$ gawk --version
GNU Awk 5.1.0, API: 3.0 (GNU MPFR 4.1.0, GNU MP 6.2.1)

Also removed the useless here-strings