Comment Comment by jacobolus > better notation for literals [...] something like 1eb-1 (for 0.5) and 1eb-2 (for 0.25)There are floating point hex literals. These can be written as 0x1p-1 == 0.5 and 0x1p-2 == 0.25.You can use them in C/C++, Java, Julia, Swift, ..., but they are not supported everywhere.https://observablehq.com/@jrus/hexfloat parent jacobolus 5 years ago
There are floating point hex literals. These can be written as 0x1p-1 == 0.5 and 0x1p-2 == 0.25.
You can use them in C/C++, Java, Julia, Swift, ..., but they are not supported everywhere.
https://observablehq.com/@jrus/hexfloat