(PC-12xx~14xx) qthsh Tanh-Sinh quadrature
|
04-08-2021, 06:59 PM
Post: #42
|
|||
|
|||
RE: (PC-12xx~14xx) qthsh Tanh-Sinh quadrature
Just to show expt make no difference, this version eliminated t = exp(h), replaced by cheaper sqrt().
Code: function qthsh3(f, a, b, c, n, eps) -- tanh-sinh quadrature lua> f = function(x) return 1/sqrt(-log(x)) end lua> qthsh (f, 0, 1) -- exp version 1.7724538240988943 6.586211614189097e-009 lua> qthsh2(f, 0, 1) -- expm1 version 1.7724538240988927 6.58621067462469e-009 lua> qthsh3(f, 0, 1) -- sqrt version 1.7724538240988927 6.586210486711807e-009 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)