A packing algorithm for 2D bin packing. Largely based on code and a blog post by Jake Gordon.
Compute the principal square root of a double-precision floating-point number.
Square root of double-precision floating-point epsilon.
Natural logarithm of the square root of 2π.