JuliaAttic / ReverseDiffSource.jl

Reverse automated differentiation from source
MIT License
47 stars 12 forks source link

Possible bug related to allorders optional argument #29

Closed papamarkou closed 8 years ago

papamarkou commented 8 years ago

The following

using ReverseDiffSource

res = rdiff(:(x[1]^3+x[2]^2) , x=[2., 3.], order=1)
@eval foo(x) = $res
foo([1.5, 2.8])

yields (11.215,[6.75,5.6]), whereas the following

res = rdiff(:(x[1]^3+x[2]^2) , x=[2., 3.], order=1, allorders=false)
@eval foo(x) = $res
foo([1.5, 2.8])

gives 6.75. If I am not wrong, I think the latter should give [6.75,5.6] instead.

fredo-dedup commented 8 years ago

corrected with latest master

papamarkou commented 8 years ago

Thanks for this too!

papamarkou commented 8 years ago

I checked it from my end, works fine!