[DGD] DGD 1.6.2 and Hydra 1.3.9

nikoroleva . natasha.i.koroleva at gmail.com
Sun Jan 21 20:01:20 CET 2018


I want to convert these vectors' units:

R = { 0.857033096, -0.493251623, -0.213830204 } (astronomical units)
V = { 0.00886739864, 0.0133184022, 0.0057727916 } (astronomical units per day)

Basic code for conversion:

float au_to_km(float au)
{
    return au * 1.49597870691e+8;
}

float aupd_to_kms(float au_per_day)
{
    return au_per_day * 1731.45684;
}

f1 = R_x = 0.857033096
f2 = R_y = -0.493251623
f3 = R_z = -0.213830204

f4 = V_x = 0.00886739864
f5 = V_y = 0.0133184022
f6 = V_z = 0.0057727916

The results are below. Using floats in DGD or a C program yield same results.
But it seems that I would prefer to have doubles instead; gets closer
to the Matlab/Octave results.

DGD host floats
> Results:
f1 = 128210326
f2 = -73789392.5
f3 = -31988543.2
f4 = 15.353518
f5 = 23.0602386
f6 = 9.9953395

DGD sim floats
> Results:
f1 = 128210326
f2 = -73789392.5
f3 = -31988543.2
f4 = 15.353518
f5 = 23.0602386
f6 = 9.9953395

C floats
> Results:
f1 = 128210326
f2 = -73789392.5
f3 = -31988543.2
f4 = 15.353518
f5 = 23.0602386
f6 = 9.9953395

C doubles
> Results
f1 = 128210326.273315
f2 = -73789392.515680
f3 = -31988543.207822
f4 = 15.353518
f5 = 23.060239
f6 = 9.995340

Google calculator
> Results
f1 = 128210326.273
f2 = -73789392.5157
f3 = -31988543.2078
f4 = 15.3535180282
f5 = 23.0602385871
f6 = 9.99533950171

Octave
> Results
f1 = 128210326.273315
f2 = -73789392.5156799
f3 = -31988543.2078222
f4 = 15.3535180282347
f5 = 23.060238587061
f6 = 9.99533950171454

On 21 January 2018 at 12:55, Felix A. Croes <felix at dworkin.nl> wrote:
> "Lerkista Wolff" <lerkista at gmail.com> wrote:
>
>> Hi
>>
>> I had to add this lines to Makefile to can compile it in Cygwin:
>>
>> ifeq ($(OS),CYGWIN_NT-10.0)
>>    HOST=DARWIN
>> endif
>
> Platform detection on Cygwin is still as brittle as it always has been,
> but at least the ugliness is becoming more localized.
>
> Note that compiling DGD for Cygwin will enable hotbooting, but it will
> not actually work (it is still Windows).  Has anyone tried to run DGD on
> the new linux emulator subsystem for Windows 10, how does it compare?
>
> Thanks for the feedback.  Please give the new floating point support
> a spin, I'd like to fix any bugs early.
>
> Regards,
> Felix Croes
> ____________________________________________
> https://mail.dworkin.nl/mailman/listinfo/dgd



More information about the DGD mailing list