Force usage of double (instead of higher precision)

Stefan Koch via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jun 29 05:59:16 PDT 2017


On Thursday, 29 June 2017 at 12:02:48 UTC, Simon Bürger wrote:
> On Thursday, 29 June 2017 at 00:07:35 UTC, kinke wrote:
>> On Wednesday, 28 June 2017 at 22:16:48 UTC, Simon Bürger wrote:
>>> I am currently using LDC on 64-bit-Linux if that is relevant.
>>
>> It is, as LDC on Windows/MSVC would use 64-bit compile-time 
>> reals. ;)
>>
>> Changing it to double on other platforms is trivial if you 
>> compile LDC yourself. You'll want to use this alias: 
>> https://github.com/ldc-developers/ldc/blob/master/ddmd/root/ctfloat.d#L19, https://github.com/ldc-developers/ldc/blob/master/ddmd/root/ctfloat.h#L19
>
> Huh, I will definitely look into this. This might be the most 
> elegant solution. Thanks for the suggestion.

Required a custom build of the compiler for the library to work 
is rather inelegant imo.
However It might allow you to make progress the quickest.
Note that this only changes the type all ct-float-math is done at 
to double.
which means that know float and real will be double.
(Which is probably better then having float and double transform 
into 80bit reals)




More information about the Digitalmars-d-learn mailing list