Switch to using core::f64::consts. Still have problem with doctest
Change tests to work around rustdoc limitation on extern crate.