-
-
Notifications
You must be signed in to change notification settings - Fork 31
Closed
Description
Analogous to the PR: JuliaLang/julia#40668 I believe the _exp!-function can be implemented with one multiplication less in several cases. More precisely, these lines can be implemented with one multiplication less:
ExponentialUtilities.jl/src/exp.jl
Lines 41 to 49 in 5460b95
| mul!(A2, A, A) | |
| @. U = C[2] * P | |
| @. V = C[1] * P | |
| for k in 1:(div(size(C, 1), 2) - 1) | |
| k2 = 2 * k | |
| mul!(temp, P, A2); P, temp = temp, P # equivalent to P *= A2 | |
| @. U += C[k2 + 2] * P | |
| @. V += C[k2 + 1] * P | |
| end |
Since when k=1, P is identity.
Metadata
Metadata
Assignees
Labels
No labels