Ruud H.G. van Tol on Wed, 24 Jan 2024 01:56:34 +0100
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
- To: pari-users@pari.math.u-bordeaux.fr
- Subject: Re: log_int_rat
- From: "Ruud H.G. van Tol" <rvtol@isolution.nl>
- Date: Wed, 24 Jan 2024 01:56:27 +0100
- Delivery-date: Wed, 24 Jan 2024 01:56:35 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=isolution.nl; s=soverin; t=1706057790; bh=n+VbG5r6cauRa82uSTm8x9C5+4yBPWNpsjCw6HGs3mM=; h=Date:Subject:From:To:References:In-Reply-To:From; b=kw0CGTjdGG/ToSTQv4oGRpiFhkW2dbwsxjsoJQWqBs3VtuvsHamG0KHk24bNnPBZI 0kh3tsfZH1zL8iHs2OzMo+Iv0UOS1viInyDbe9/vzt3tgZchc4WeNQbb/PGTs6j/1q ZAsVL/euixgn2yXARiXCKEkpYqKNszxBN+OOzgjO1dWFvTiT2cjm4+m8DUEcwu3Qj5 DtqKvFlLRSBqT3tuqauoWYFalOBANTbNi0O9OzmP4LmH9Tq2GkX2YG3jUTkcS9lnBW lfEFaLfgJjYJET1NcGu744t+qKzK+efBzZrsDG+l2tNQkzNjfFJzGwQB5KXiotXqyd aALQEZiIDmCqA==
- In-reply-to: <0bd27b4e-5754-4ce4-943b-607e588990f2@isolution.nl>
- References: <b7806246-4381-4aee-8cd6-8fcf0a16e40c@isolution.nl> <ZWeccfBdhkWy3DpL@seventeen> <7137957c-e6e5-48aa-b81d-6d21f49c53f3@isolution.nl> <0bd27b4e-5754-4ce4-943b-607e588990f2@isolution.nl>
On 2024-01-22 04:26, Ruud H.G. van Tol wrote:
[...]
Now proposed it as:
alist(N) = { \\ A054414
my(a=1/2, b=1, r=-1);
vector(N, i, a*=4; b*=3; r+=2; if(a>b, a*=2; b*=3; r++); r);
}
And 2% faster:
alist(N) = { \\ A054414
my(a=1/2, b=1, r=-1);
vector(N, i, a*=4; b*=3; if(a>b, a*=2; b*=3; r++); 2*i+r);
}
-- Ruud