Name: Vladyslav Shtabovenko Date: 02/16/16-12:07:18 PM Z


Hi Wen-Long,

I’m not very familiar with Fortran, but to me this
looks like just the D notation for DOUBLE PRECISION
type, i.e. 8D0 = 8. 10^0 = 8. etc.

You can disable it using the FortranDoublePrecision option:

Write2[“sang.abc”, abc = 0.6*(-8 + 12 Log[5 + y[1]]),
 abc1 = 1/x^(2/3), FormatType -> FortranForm,
 FortranFormatDoublePrecision -> False]

which returns

        abc = 0.6*(-8. + 12.*Log[5. + y[1.]])
        abc1 = x^(-0.6666666666666666)

Cheers,
Vladyslav

Am 16.02.2016 um 04:39 schrieb wen-long sang:
> Dear Vladyslav,
>
> When I run the command
> “ Write2[NotebookDirectory[] <> “sang.abc”, abc = 0.6*(-8 + 12 Log[5 + y[1]]), abc1 = 1/x^(2/3), FormatType -> FortranForm]”,
>
> the return in sang.abc is
> “ abc = 6.D-1*(-8D0 + 12D1*Log(5D0 + y(1D0)))
> abc1 = x**-6.666666666666666D0D-1”.
>
> It seems both transformations are not correct.
> Is this a bug for Write2
>
> Best Regards
> Wen-Long Sang
>