JuliaLang/julia — pull request #6183 by andreasnoackjensen (2014-03-16 11:08:20+00:00)
Title: Restrict zero and one to Number types. Default to floating points.

There is some room for choosing the return type of e.g. `zero(Real)` and right now the default is `Int`. By using floating points instead the `InexactError` in #4796 could have been avoided. This pr also restricts `zero` and `one` such that `zero/one(Any)` is no longer defined. It is possible that this change will break some code with type inference problems, but maybe that is a good.