Skip to content

Commit 18e838e

Browse files
Apply suggestions from code review
1 parent 07a1c78 commit 18e838e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/jvp.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ The JVP is computed using the finite difference approximation:
130130
where `h` is the step size and `v` is the direction vector.
131131
132132
# Notes
133-
- Requires only `O(1)` or `O(2)` function evaluations (vs `O(n)` for full Jacobian)
134-
- Forward differences: 1 extra function evaluation, `O(h)` accuracy
135-
- Central differences: 2 extra function evaluations, `O(h²)` accuracy
133+
- Requires only `2` function evaluations (vs `O(n)` for full Jacobian)
134+
- Forward differences: 2 function evaluations, `O(h)` accuracy
135+
- Central differences: 2 function evaluations, `O(h²)` accuracy
136136
- Particularly efficient when `v` is sparse or when only one directional derivative is needed
137137
"""
138138
function finite_difference_jvp(f, x, v,

0 commit comments

Comments
 (0)