Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: TaylorRec #12

Open
lbenet opened this issue Jun 10, 2015 · 1 comment
Open

WIP: TaylorRec #12

lbenet opened this issue Jun 10, 2015 · 1 comment

Comments

@lbenet
Copy link
Member

lbenet commented Jun 10, 2015

TaylorRec{T,N} is an implementation of multivariate Taylor polynomials as a recursive dense representation, including tests. It is in the "TaylorRec" branch.

The idea is to generate a polynomial in N variables as a polynomial of one variable, with coefficients that are polynomials in N-1 variables. For the time being, it is incorporated along TaylorSeries, i.e., without any replacement. It seems to be much slower, probably due to the bad memory management that the recursion imposes.

@dpsanders I think this is partially what you had in mind in #11, avoiding the problem I described there. There are some nice things of this approach; yet, the performance is bad...

@lbenet
Copy link
Member Author

lbenet commented Jun 10, 2015

Things that work nicely here (related to this comment):

julia> x = @taylorRec(1,6)
TaylorSeries.TaylorRec{Float64,1}([0.0,1.0,0.0,0.0,0.0,0.0,0.0])

julia> y = @taylorRec(2,6)
TaylorSeries.TaylorRec{Float64,2}([TaylorSeries.TaylorRec{Float64,1}([0.0,1.0,0.0,0.0,0.0,0.0,0.0])])

julia> (x^2-y^2) / (x+y);   # a nice `pretty-print` is not yet fully done; result is x-y

julia> TaylorSeries.pretty_print(ans)
" ( - 1.0⋅x₂ ) + ( 1.0 )⋅x₁"

So the result is indeed x-y. Other examples that can be factorized also work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant