FP magic in std.math.pow
Seb via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Aug 1 15:51:19 PDT 2016
On Sunday, 31 July 2016 at 22:45:16 UTC, Stefan Koch wrote:
> On Sunday, 31 July 2016 at 22:38:59 UTC, Seb wrote:
>> Consider this short program:
>>
>> void main()
>> {
>> alias S = float;
>> S s1 = 0x1.24c92ep+5;
>> S s2 = -0x1.1c71c8p+0;
>>
>> [...]
>
> It's an anoying feature.
> The reason this is not implemented in dmd is that pow does not
> map to a simple cpu instruction on x86.
>
> I will have another shot at fixing this once the CTFE stuff is
> in.
It's about 1000 instructions with std.math.pow.
Yeah any improvement of the FP magic in DMD would be highly
appreciated ;-)
More information about the Digitalmars-d-learn
mailing list