@@ -640,7 +640,7 @@ for f in (:digamma, :trigamma, :zeta, :eta, :invdigamma)
640
640
641
641
function $f (z:: Number )
642
642
x = float (z)
643
- typeof (x) == typeof (z) && throw (MethodError ($ f, (z,)))
643
+ typeof (x) === typeof (z) && throw (MethodError ($ f, (z,)))
644
644
# There is nothing to fallback to, since this didn't change the argument types
645
645
$ f (x)
646
646
end
@@ -675,30 +675,30 @@ function zeta(s::Complex{Int}, z::ComplexOrReal{Float64})::Complex{Float64}
675
675
end
676
676
677
677
function zeta (s:: Integer , z:: Number )
678
- x = float (z)
679
678
t = Int (s) # One could worry here about converting a BigInteger into a Int32/Int64
680
- if typeof (x) === typeof (z) && typeof (t) === typeof (s)
679
+ x = float (z)
680
+ if typeof (t) === typeof (s) && typeof (x) === typeof (z)
681
681
# There is nothing to fallback to, since this didn't work
682
- throw (MethodError (zeta,(s,t )))
682
+ throw (MethodError (zeta,(s,z )))
683
683
end
684
684
zeta (t, x)
685
685
end
686
686
687
687
688
688
function zeta (s:: Number , z:: Number )
689
- x = float (z)
690
689
t = float (s)
691
- if typeof (x) === typeof (z) && typeof (t) === typeof (s)
690
+ x = float (z)
691
+ if typeof (t) === typeof (s) && typeof (x) === typeof (z)
692
692
# There is nothing to fallback to, since this didn't work
693
- throw (MethodError (zeta,(s,t )))
693
+ throw (MethodError (zeta,(s,z )))
694
694
end
695
695
zeta (t, x)
696
696
end
697
697
698
698
699
699
function polygamma (m:: Integer , z:: Number )
700
700
x = float (z)
701
- typeof (x) == typeof (z) && throw (MethodError (polygamma, (m,z)))
701
+ typeof (x) === typeof (z) && throw (MethodError (polygamma, (m,z)))
702
702
# There is nothing to fallback to, since this didn't work
703
703
polygamma (m, x)
704
704
end
0 commit comments