πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #2066

Re: variadic min and max, (any some and none, cat and more)

#2066
From: Bonita Montero
Date: Tue, 01 Dec 2026 19:42
45 lines
3232 bytes
Am 01.12.2026 um 19:47 schrieb Kaz Kylheku:

> complex<double> is too much of a mouthful for a complex type
> you will be reaching for a lot.
> How it should have been designed is that there should have
> been a basic_complex<T> template and complex being a typedef
> name for basic_complex<double>

But apart from that, you don’t have any other problems, right ?

> If the C++ people designed it from scratch, it would be some
> std::math::sin<double>(angle) type fuckery.

The standard library does not use namespaces quite so excessively,
and there is the `using` keyword.

>> int main()
>> {
>> 	constexpr double Pi4 = 3.1415926535897932384626433832795 / 4.0;

> This is just stupid; a double only holds around 17 decimal
> digits of precision (15 that are guaranteed to be preserved).

If you sum up the digits backwards, which is the most precise way,
this could make a difference.

> Moreover, surely C++ has a pi constant somewhere?
> 
> Evidently C++20 has ths:
> 
> #include <iostream>
> #include <numbers>
> 
> // ...
>    std::numbers::pi;
>    std::numbers::pi_v<float>;
>    std::numbers::pi_v<long double>;
> 
> It didn't occur to them until the pandemic hit that numeric programmers might
> want the language to provide pi.
> 
> They hit on the idea of avoiding pi_v<double>, like what I'm talking
> about with the complex<T> verbosity above.
You constantly see problems where there aren't any.
Technical Details
Message-ID: <11en7ug$23msg$1@raubtier-asyl.eternal-september.org>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail
References: <11bes8b$1gncr$1@dont-email.me> <11ek7b2$j8f6$1@raubtier-asyl.eternal-september.org> <11ekfu0$mq5n$4@dont-email.me> <11ekg71$n5p7$1@raubtier-asyl.eternal-september.org> <11ekgf8$mq5n$8@dont-email.me> <11ekjsp$pmch$2@raubtier-asyl.eternal-september.org> <11ekq4q$snda$1@dont-email.me> <11em45u$1fp0a$1@dont-email.me> <11emdhn$1ko8h$1@dont-email.me> <11emjh1$1ntap$1@dont-email.me> <11en1a0$1vqc1$1@dont-email.me> <11en399$20vkl$1@raubtier-asyl.eternal-september.org> <20261201103802.875@kylheku.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail
From: Bonita Montero <Bonita.Montero@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: variadic min and max, (any some and none, cat and more)
Date: Tue, 1 Dec 2026 20:42:07 +0100
Organization: A noiseless patient Spider
Lines: 45
Message-ID: <11en7ug$23msg$1@raubtier-asyl.eternal-september.org>
References: <11bes8b$1gncr$1@dont-email.me>
 <11ek7b2$j8f6$1@raubtier-asyl.eternal-september.org>
 <11ekfu0$mq5n$4@dont-email.me>
 <11ekg71$n5p7$1@raubtier-asyl.eternal-september.org>
 <11ekgf8$mq5n$8@dont-email.me>
 <11ekjsp$pmch$2@raubtier-asyl.eternal-september.org>
 <11ekq4q$snda$1@dont-email.me> <11em45u$1fp0a$1@dont-email.me>
 <11emdhn$1ko8h$1@dont-email.me> <11emjh1$1ntap$1@dont-email.me>
 <11en1a0$1vqc1$1@dont-email.me>
 <11en399$20vkl$1@raubtier-asyl.eternal-september.org>
 <20261201103802.875@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 01 Dec 2026 19:42:09 +0000 (UTC)
Injection-Info: raubtier-asyl.eternal-september.org;
	logging-data="2218896"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+gEPDqzMlUY6NlxVvbUi+wQOqSuNna1ug="; posting-host="cb3400413eae5ed37f31905f1027ec02"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:MJLa4fcLF6Hn4zrvCLmCjrkjaXo= sha256:cYWqV9PkOc/W0b5DxyRUiPCFhwWLaTUd8wYcjY3mltg=
	sha1:0eh5uHBJIBiTQ5rqwju4Inm85sc= sha256:dWixMWsNiWjF2+tpZEHesKka6EXSJ9Rok9HtPMJvgYw=
In-Reply-To: <20261201103802.875@kylheku.com>
Content-Language: de-DE