Version 4, with newmath library.