Use floating point division wherever appropriate in examples.

This addresses #58, reported by @cswiger.