JuliaMath / Calculus.jl

Calculus functions in Julia
Other
278 stars 76 forks source link

remove oftype from derivative definitions #96

Closed mlubin closed 8 years ago

mlubin commented 8 years ago

@giordano, these ended up breaking JuMP because we symbolically differentiate the list of derivatives to get 2nd order derivatives, and Calculus doesn't know how to differentiate oftype. We use pi in a number of other places without oftype, so I'm going to back out this change until there's a more satisfying way to handle this case.

giordano commented 8 years ago

I'm sorry for having broken a downstream project, but all these derivatives are essentially untested, it's easy to break something without noticing it. In any case, I'm fine with this temporary solution.

As a definitive solution, how about setting the gradient of oftype(x, y) to (zero(x), one(x))?

mlubin commented 8 years ago

@giordano, that would work except for the missing infrastructure to differentiate two-argument functions

giordano commented 8 years ago

except for the missing infrastructure to differentiate two-argument functions

Yes, that's unfortunate.