Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * the device calculates the function
- *
- * f'(n) = x'
- * + v' *n
- * + a'/2 *n*(n-1)
- * + j'/6 *n*(n-1)*(n-2)
- * + s'/24 *n*(n-1)*(n-2)*(n-3)
- * + c'/120*n*(n-1)*(n-2)*(n-3)*(n-4)
- *
- * while we have our parameters in the form
- *
- * f(n) = x + v*n + a/2*n^2 + j/6*n^3 + s/24*n^4 + c/120*n^5
- *
- * which is equivalent to
- * f(n) = x
- * + (v + a/2 + j/6 + s/24 + c/120) * n
- * + (a + j + 7/12*s +c/4)/2 * n*(n-1)
- * + (j + 3/2*s + 5/4*c)/6 * n*(n-1)*(n-2)
- * + (s+2*c)/24 * n*(n-1)*(n-2)*(n-3)
- * + c /120* n*(n-1)*(n-2)*(n-3)*(n-4)
- *
- * so we have
- * x' = x
- * v' = v + a/2 + j/6 + s/24 + c/120
- * a' = a + j + 7/12*s +c/4
- * j' = j + 3/2*s + 5/4*c
- * s' = s + 2*c
- * c' = c
- *
- * and for the other direction
- * x = x'
- * v = v' - a'/2 + j'/3 + s'/4 + c'/5
- * a = a' - j' + 11/12*s' - 5/6*c'
- * j = j' - 3/2*s' + 7/4*c'
- * s = s' - 2*c'
- * c = c'
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement