Bugzilla #43940: Use new double format utility to improve thread safety and performance. Submitted by Julien Aymé, Ognjen Blagojevic.