Open B-LIE opened 3 years ago
Do you mind to check a few other functions and make a PR?
I'm surprised it's not in DiffRules. Is there a set of rules for them somewhere?
I'm not super good with GitHub... I had to get help from a colleague to make a PR for the documentation (macros for variables vs. parameters), and I understand that a PR is a proposal for change in code or text. I'm probably not qualified to make a PR for functions... I certainly don't want to mess up your code :-o
OK -- I did the following:
using Symbolics
#
@variables x
D = Differential(x)
#
# Vector of math functions with single arguments found in Julia Documentation
vf = [sin,cos,sincos,tan,sind,cosd,tand,sinpi,cospi,sinh,cosh,asin,acos,atan,asind,acosd,atand,sec,csc,cot,secd,cscd,cotd,
asec,acsc,acot,asecd,acscd,acotd,sech,csch,coth,asinh,acosh,atanh,asech,acsch,acoth,sinc,cosc,deg2rad,rad2deg,
log,log2,log10,log1p,exp,exp2,exp10,expm1,abs,abs2,sqrt,cbrt];
#
[try
vf[i](x)
catch
println("Not defined: #$(i)")
end
for i in 1:length(vf)]
;
leading to:
Not defined: #3
Not defined: #39
Not defined: #40
Thus, the following functions appear to be not defined properly in Symbolics:
julia> vf[[3,39,40]]
3-element Array{Function,1}:
sincos
sinc
cosc
I also did something similar wrt. differentiation, and found that abs
doesn't handle differentiation.
The
sinc
function has not been registered in Symbolics.┆Issue is synchronized with this Trello card by Unito