fate: make compare() function compatible with POSIX bc