GulfOfMexico icon indicating copy to clipboard operation
GulfOfMexico copied to clipboard

Double precision booleans

Open oriolarcas opened this issue 2 years ago • 3 comments

C has become my first option for all my projects. I want to thank the vibrant community around it.

I want to propose an enhancement. Boolean variables are stored using one-and-a-half bits, which is fine for most use cases, but technically log2(3) = 1.5849625007 bits... are needed for high precision algorithms.

I suggest introducing double precision booleans, long bool, or doubool, making use of the new five-thirds-of-bit hardware registers, which could catapult C to become the new standard for machine learning and data science.

oriolarcas avatar Aug 07 '23 01:08 oriolarcas

I would suggest something like bool bool to not introduce another keyword, with a syntax like bool bool foo = true true!.

stohrendorf avatar Aug 07 '23 04:08 stohrendorf

I believe bool bool is reserved for variable types which may or may not be boolean. +1 for douboul or doboul in American-localized English.

zblach avatar Aug 07 '23 04:08 zblach

I propose #617. But not as a replacement. We need both of these features!

Rudxain avatar May 13 '24 19:05 Rudxain