rational constructor from Double