smallest |cos(x)| ?
|
10-08-2021, 07:54 PM
Post: #7
|
|||
|
|||
RE: smallest |cos(x)| ?
(10-08-2021 02:16 PM)Werner Wrote: instead of doing (k+0.5)*pi, which has 2 rounding errors (one for pi, one for *), do: "Bad" PI does not matter. (Besides, ->RAD might use the same PI) Consider 34th digit of stored PI = 3, but should be 2.884... x = (k+0.5)*PI rel_error(x) = rel_error(PI) ≈ (0.116 ULP) / (PI*10^33 ULP) ≈ 3.686E-35 If x has |cos(x)| minimized, x scaled to 34 digits, is very close to integer. Say, combined relative error = 3.7E-35 (as long as error < 5E-35, we are safe) ulp_error(x) < 10^34 ULP * 3.7E-35 = 0.37 ULP If we assume multiply has correct rounding, 0.37 ULP will have removed. Searching for min(|cos(x)|, my OP eps() code can be replaced with plain cos(x) |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
smallest |cos(x)| ? - Albert Chan - 10-07-2021, 12:14 PM
RE: smallest |cos(x)| ? - Werner - 10-07-2021, 03:40 PM
RE: smallest |cos(x)| ? - Albert Chan - 10-07-2021, 06:40 PM
RE: smallest |cos(x)| ? - Werner - 10-08-2021, 07:02 AM
RE: smallest |cos(x)| ? - Albert Chan - 10-08-2021, 08:17 PM
RE: smallest |cos(x)| ? - ijabbott - 10-09-2021, 01:15 PM
RE: smallest |cos(x)| ? - Albert Chan - 10-09-2021, 02:09 PM
RE: smallest |cos(x)| ? - Albert Chan - 10-09-2021, 05:01 PM
RE: smallest |cos(x)| ? - EdS2 - 10-08-2021, 08:24 AM
RE: smallest |cos(x)| ? - Werner - 10-08-2021, 02:16 PM
RE: smallest |cos(x)| ? - Albert Chan - 10-08-2021 07:54 PM
RE: smallest |cos(x)| ? - Werner - 10-11-2021, 01:16 PM
RE: smallest |cos(x)| ? - Albert Chan - 10-11-2021, 04:22 PM
RE: smallest |cos(x)| ? - Albert Chan - 10-10-2021, 01:36 PM
RE: smallest |cos(x)| ? - Albert Chan - 10-11-2021, 10:05 PM
|
User(s) browsing this thread: 3 Guest(s)