Vocabulary/tcapdotold

From J Wiki
Jump to navigation Jump to search

>> <<   Back to: Vocabulary Thru to: Dictionary

u T. n Taylor Approximation Conjunction

Rank -- depends on the rank of u -- WHY IS THIS IMPORTANT?

Warning.png This primitive has been removed from J Version 9.01 and later


Approximates a given verb u by computing its Taylor series to n terms.

   u=: ^                    NB. sample u: the exponential function
   ] y=: (i.10)%10          NB. sample arguments for verb u and its Taylor approximation
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
   u y                      NB. the sample arguments processed by u itself
1 1.10517 1.2214 1.34986 1.49182 1.64872 1.82212 2.01375 2.22554 2.4596

   (u T.4) y                NB. noticeably inaccurate for y>0.2
1 1.10517 1.22133 1.3495 1.49067 1.64583 1.816 2.00217 2.20533 2.4265
   (u T.6) y                NB. tolerable for y<0.5
1 1.10517 1.2214 1.34986 1.49182 1.6487 1.82205 2.01357 2.22513 2.45876
   (u T.8) y                NB. tolerable for y<0.9
1 1.10517 1.2214 1.34986 1.49182 1.64872 1.82212 2.01375 2.22554 2.45959

Common uses

Replace a given expensive function with a cheaper Taylor approximation.


Related Primitives

Taylor Coefficient (t.), Weighted Taylor (t:)


More Information

1. u T. calculates the Maclaurin series, i. e. the Taylor expansion around 0.