According to LSB 3.2, finite() has been deprecated with C99.

See: https://refspecs.linuxfoundation.org/LSB_3.2.0/LSB-Core-generic/LSB-Core-generic/baselib-finite.html

Changed the order in which we detect whether to use finite() or isfinite(), favouring the latter.