Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
November 11, 2013 Phobos math expert wanted: Please help porting std.conv.parse to 64bit reals | ||||
---|---|---|---|---|
| ||||
std.conv.parse!(real) and therefore also parse!double, parse!float were written assuming real is always a 80 bit type. But on most non x86 systems the largest floating point type is actually double and therefore real is basically an alias for double. std.conv makes some convenient assumptions for 80bit reals (like mantissa size is == long.sizeof). I guess this is a simple fix for math/floating point experts but I'd need quite some time to fix it. So it'd be great if someone could help and port std.conv.parse to systems with 64 bit reals (real.mant_dig == 113) :-) https://github.com/D-Programming-Language/phobos/blob/master/std/conv.d#L2367 |
November 19, 2013 Re: Phobos math expert wanted: Please help porting std.conv.parse to 64bit reals | ||||
---|---|---|---|---|
| ||||
Posted in reply to Johannes Pfau | Johannes Pfau <nospam@example.com> writes:
> std.conv.parse!(real) and therefore also parse!double, parse!float were written assuming real is always a 80 bit type. But on most non x86 systems the largest floating point type is actually double and therefore real is basically an alias for double. std.conv makes some convenient assumptions for 80bit reals (like mantissa size is == long.sizeof). I guess this is a simple fix for math/floating point experts but I'd need quite some time to fix it. So it'd be great if someone could help and port std.conv.parse to systems with 64 bit reals (real.mant_dig == 113) :-)
>
> https://github.com/D-Programming-Language/phobos/blob/master/std/conv.d#L2367
First step, please enter a bug so that the issue doesn't get lost.
I may be able to look at it a little tonight. I'm not an expert, but I have some experience with floating point conversion.
Jerry
|
November 19, 2013 Re: Phobos math expert wanted: Please help porting std.conv.parse to 64bit reals | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jerry | Am Tue, 19 Nov 2013 14:18:06 -0500
schrieb Jerry <jlquinn@optonline.net>:
> Johannes Pfau <nospam@example.com> writes:
>
> > std.conv.parse!(real) and therefore also parse!double, parse!float were written assuming real is always a 80 bit type. But on most non x86 systems the largest floating point type is actually double and therefore real is basically an alias for double. std.conv makes some convenient assumptions for 80bit reals (like mantissa size is == long.sizeof). I guess this is a simple fix for math/floating point experts but I'd need quite some time to fix it. So it'd be great if someone could help and port std.conv.parse to systems with 64 bit reals (real.mant_dig == 113) :-)
> >
> > https://github.com/D-Programming-Language/phobos/blob/master/std/conv.d#L2367
>
> First step, please enter a bug so that the issue doesn't get lost.
>
> I may be able to look at it a little tonight. I'm not an expert, but I have some experience with floating point conversion.
>
> Jerry
Hi,
I didn't think someone would actually respond this after more than a week :-)
I actually ported that code in the meantime and I'll open a pull request for phobos soon. But it'd be awesome if you could help reviewing it once I opened the pull request.
BTW: Don't worry, this issue won't get lost. The GDC port to ARM is mostly finished and this is one of the last missing pieces so I have a strong interest in making this work.
|
November 19, 2013 Re: Phobos math expert wanted: Please help porting std.conv.parse to 64bit reals | ||||
---|---|---|---|---|
| ||||
Posted in reply to Johannes Pfau | On Tuesday, 19 November 2013 at 19:38:25 UTC, Johannes Pfau wrote:
> Am Tue, 19 Nov 2013 14:18:06 -0500
> schrieb Jerry <jlquinn@optonline.net>:
>
>> Johannes Pfau <nospam@example.com> writes:
>>
>> > std.conv.parse!(real) and therefore also parse!double, parse!float
>> > were written assuming real is always a 80 bit type. But on most non
>> > x86 systems the largest floating point type is actually double and
>> > therefore real is basically an alias for double. std.conv makes some
>> > convenient assumptions for 80bit reals (like mantissa size is ==
>> > long.sizeof). I guess this is a simple fix for math/floating point
>> > experts but I'd need quite some time to fix it. So it'd be great if
>> > someone could help and port std.conv.parse to systems with 64 bit
>> > reals (real.mant_dig == 113) :-)
>> >
>> > https://github.com/D-Programming-Language/phobos/blob/master/std/conv.d#L2367
>>
>> First step, please enter a bug so that the issue doesn't get lost.
>>
>> I may be able to look at it a little tonight. I'm not an expert, but
>> I have some experience with floating point conversion.
>>
>> Jerry
>
> Hi,
>
> I didn't think someone would actually respond this after more than a
> week :-)
>
> I actually ported that code in the meantime and I'll open a pull
> request for phobos soon. But it'd be awesome if you could help
> reviewing it once I opened the pull request.
>
> BTW: Don't worry, this issue won't get lost. The GDC port to ARM is
> mostly finished and this is one of the last missing pieces so I have a
> strong interest in making this work.
yay arm port!!
|
November 27, 2013 Re: Phobos math expert wanted: Please help porting std.conv.parse to 64bit reals | ||||
---|---|---|---|---|
| ||||
Posted in reply to Johannes Pfau | Johannes Pfau <nospam@example.com> writes: > I didn't think someone would actually respond this after more than a week :-) I only check into the groups once every few days at the moment :-) > I actually ported that code in the meantime and I'll open a pull request for phobos soon. But it'd be awesome if you could help reviewing it once I opened the pull request. Sure I'd be happy to. Jerry |
Copyright © 1999-2021 by the D Language Foundation