Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Michael S Newsgroups: comp.lang.c++ Subject: Re: constexpr is really very smart! Date: Wed, 18 Dec 2024 14:39:22 +0200 Organization: A noiseless patient Spider Lines: 19 Message-ID: <20241218143922.00005d9e@yahoo.com> References: <20241216112808.00003f74@yahoo.com> <20241216132315.00007859@yahoo.com> <86frmlgrl4.fsf@linuxsc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Date: Wed, 18 Dec 2024 13:38:26 +0100 (CET) Injection-Info: dont-email.me; posting-host="fdea8f613c1d6b11b9a10c381af2156d"; logging-data="1764261"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19uw0qu86yC5rwpZJxsvy0BQNpRjUJhX7s=" Cancel-Lock: sha1:kV62MT+TuKjiUIRoXMPCEgJoHps= X-Newsreader: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-w64-mingw32) Bytes: 1849 On Wed, 18 Dec 2024 03:26:15 -0800 Tim Rentsch wrote: > Michael S writes: > > > > My news reader is not sure about equation above. > > You probably meant ceil(pow((1+sqrt(5))/2, n)/sqrt(5)) > > It works well with double precision math up to nu. After that it > > would need high precision fp library, so probably [much] slower > > than simple loop above at least up to n' where we run out of range > > of int64 result. > It seems like your newsreader don't like combinations of characters that I considered benign. Like n=75 and n=92 In case you want to see what was an original, it is here: https://www.novabbs.com/devel/article-flat.php?id=6042&group=comp.lang.c%2B%2B#6042