(PC-12xx~14xx) qthsh Tanh-Sinh quadrature
|
04-02-2021, 08:14 PM
Post: #15
|
|||
|
|||
RE: (PC-12xx~14xx) qthsh Tanh-Sinh quadrature
(04-02-2021 07:12 PM)Albert Chan Wrote:(03-29-2021 07:42 PM)robve Wrote: sqrt(x / (1 - x * x)) What is meant is that when x is close to 1 so-called "catastrophic cancellation" occurs with loss of precision. Tanh-Sinh accumulates inaccurate values at this point. I picked two Boost Math Tanh-Sinh points very close to 1 for this function to illustrate: x=0.999999999999991 x^2=0.999999999999982 1-x^2=1.77635683940025e-14 x=0.999999999999999 x^2=0.999999999999999 1-x^2=1.33226762955019e-15 The first point for example has about 3~4 digits remaining in IEEE 754 double precision after subtraction 1-x2 with x2= 0.999999999999982, so roughly 1.77e-14 < 1-x^2 < 1.78e-14. This means that x/(1-x*x)) is accurate to 3~4 digits while being fairly large 5.6e13. This happens to a lot of points. The "garbage" is not my wording, see Boost Tanh-Sinh. There could be a problem if the number of points integrated are mostly in the neighborhood of 1 for this function. Thinking that there are better examples to demonstrate this. - Rob "I count on old friends to remain rational" |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)