[phobos] CustomFloat

Andrei Alexandrescu andrei at erdani.com
Fri Aug 27 01:43:45 PDT 2010


Thanks!

Andrei

On 8/26/10 23:28 PDT, Lars Tandle Kyllingstad wrote:
> David discovered that the problem I reported was a compiler bug that
> only turned up if one compiled the files in a very particular order.
> Now that the code has been incorporated in Phobos (as opposed to being
> in a separate demo module), the problem has disappeared.
>
> -Lars
>
>
>
> On Thu, 2010-08-26 at 22:59 -0700, Andrei Alexandrescu wrote:
>> My understanding is that CustomFloat is now in good shape. Is that correct?
>>
>> Thanks,
>>
>> Andrei
>>
>> On 6/8/10 1:04 PDT, Lars Tandle Kyllingstad wrote:
>>> On Sat, 2010-06-05 at 10:42 -0400, David Simcha wrote:
>>>> Robert Jacques (who I know offline and, in fact, was the person who
>>>> introduced me to D) has massively improved/debugged CustomFloat and
>>>> asked me to post it for review and commit it to Phobos.  See the
>>>> attached file.  If everyone's happy with it, I'll replace the current
>>>> impl in std.numeric and check it in.
>>>
>>> It's awesome that someone's working on this -- I've seen people
>>> complaining about the state of CustomFloat several times.  (I think the
>>> last time was when we discussed the possibility of using an 80-bit
>>> CustomFloat in Masahiro's msgpack library, to wrap 80-bit reals on
>>> systems that don't support them.)
>>>
>>> That said, I'm having some problems with it.  Looking at the code and
>>> documentation, the following should be correct usage:
>>>
>>>           alias CustomFloat!16 float16;
>>>
>>> However, compiling it with DMD 2.046, I get the errors
>>>
>>>           customfloat.d(430): Error: template instance ToBinary!(real)
>>>           does not match template declaration ToBinary(F) if
>>>           (is(CustomFloat!(F.sizeof * 8)))
>>>           customfloat.d(430): Error: ToBinary!(real) is used as a type
>>>           ...
>>>
>>> -Lars
>>>
>>> _______________________________________________
>>> phobos mailing list
>>> phobos at puremagic.com
>>> http://lists.puremagic.com/mailman/listinfo/phobos
>
>
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos


More information about the phobos mailing list