Algorithm 956. - Aruliah, D. A.; Veen, Lennaert Van; Dubitski, Alex (ACM Transactions on Mathematical Software, 2016)