Sorry, yes, I misread the example. They're both fine with just 0.

> On Aug 16, 2015, at 2:32 PM, Stefan Karpinski <[email protected]> 
> wrote:
> 
> One is being returned, the other isn't. You cannot change line 8 without 
> causing the returned type to depend on the value.
> 
>> On Aug 16, 2015, at 10:10 AM, Sisyphuss <[email protected]> wrote:
>> 
>> In the Rational.jl :
>> 
>> In Line 8: `num == den == zero(T)` uses `zero(T)` to represent 0
>> In Line 9: `g = den < 0` uses `0` to represent 0
>> 
>> Why this difference? My intuition tells me that in Line 8, it can be 
>> replaced by 0 without performance issue.
>> 
>> 

Reply via email to