Why does D not have generics?
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Sat Jan 16 08:45:23 UTC 2021
On Saturday, 16 January 2021 at 08:41:18 UTC, Ola Fosheim Grøstad
wrote:
> On Friday, 15 January 2021 at 18:11:04 UTC, Bruce Carneal wrote:
>> value types of the same size. This shows up when implementing
>> radix sort where one solution is to map to/from whole numbers
>> (NaN semantics being ignored).
>
> If we accept the following encoding for floating point then it
> should work out ok?
>
> INPUT OUTPUT
> s exp sig s exp sig
>
> 1 1100 1111110 0 0011 0000001
> 1 0011 0000001 0 1100 1111110
> 1 0000 0000000 0 1111 1111111
>
> 0 0000 0000000 1 0000 1111111
Typo:
0 0000 0000000 1 0000 0000000
Maybe I am overlooking something... This is like 1-2 cycles.
More information about the Digitalmars-d
mailing list