(28 48 49 50) Bernoulli Numbers
|
09-10-2023, 07:39 PM
(This post was last modified: 09-10-2023 11:17 PM by Albert Chan.)
Post: #11
|
|||
|
|||
RE: (28 48) Bernoulli numbers
Hi, John Keith
I was also surprised that O(m) to O(√m) does not translate to much speed gain. Yes, O(√m) version eventually is faster, but not by much. The reason is D = 2*(2^m-1) factors between 2 and m+1 matched d factors, with few false positives. This make O(m) code very efficient. (it skipped D nonfactors) m = 2 to 52 step 2, there are only 3 m's that have false positives. (bold) m = 24: d = 2*3*5*7*13 D = 2*3²*5*7*13*17*241 m = 40: d = 2*3*5*11*41 D = 2*3*5²*11*17*31*41*61681 m = 50: d = 2*3*11 D = 2*3*11*31*251*601*1801*4051 Instead of half q's, we may use a few q's, to reduce search space. With 1 q, it already beat O(√m) version, all the way to m=52 (IEEE double limit) Code: function min_d(m) -- B(even m>=2) reduced denominator |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(28 48 49 50) Bernoulli Numbers - John Keith - 09-05-2023, 05:27 PM
RE: (48G) Bernoulli numbers - Gerald H - 09-06-2023, 08:48 AM
RE: (48G) Bernoulli numbers - John Keith - 09-06-2023, 11:04 AM
RE: (48G) Bernoulli numbers - Gerald H - 09-06-2023, 02:34 PM
RE: (48G) Bernoulli numbers - Albert Chan - 09-07-2023, 03:37 PM
RE: (48G) Bernoulli numbers - John Keith - 09-07-2023, 04:18 PM
RE: (28 48) Bernoulli numbers - Albert Chan - 09-09-2023, 06:33 PM
RE: (28 48) Bernoulli numbers - Albert Chan - 09-09-2023, 07:34 PM
RE: (28 48) Bernoulli numbers - John Keith - 09-08-2023, 08:09 PM
RE: (28 48) Bernoulli numbers - John Keith - 09-10-2023, 03:24 PM
RE: (28 48) Bernoulli numbers - Albert Chan - 09-10-2023 07:39 PM
RE: (28 48) Bernoulli numbers - John Keith - 09-10-2023, 07:45 PM
RE: (28 48 49 50) Bernoulli Numbers - Gerald H - 09-17-2023, 02:32 PM
|
User(s) browsing this thread: 1 Guest(s)