I am doing a nested integration. So far the result was successfully saved with Save["filename.wl", IntOutput]
and looked as following:
{8.699216412022851*^-8, 8.70971945796472*^-8,
8.724312065608903*^-8, 8.739384913073602*^-8, 8.751210081392647*^-8,
8.756863232442175*^-8, 8.754946986080317*^-8}
Now I have a fast oscillating term added and I increase precision with WorkingPrecision->22
. Using the same Save
function, the content of filename.wl
is now:
{8.699216412022879139524462907795`21.69897000433602*^-8,
8.70971945796480158227693635290900000000000000000001`21.69897000433602*^\
-8,
8.72431206560898340384359591002399999999999999999999`21.69897000433602*^-8\
, 8.739384913073543185225410529993`21.698970004336026*^-8,
8.751210081392679873974725075826`21.69897000433602*^-8,
8.756863232442135389693899773939`21.69897000433602*^-8}
When I open this file and try to evalute it, contrary to the previous successful tries, I get the syntax error:
What might be the case? How can I fix this syntax error and what might be the origins?
UPD To reproduce the issue (I am using Mathematica 13.0.1):
- Initialize an array:
IntOutput={8.699216412022879139524462907795`21.69897000433602*^-8,8.70971945796480158227693635290900000000000000000001`21.69897000433602*^-8,8.72431206560898340384359591002399999999999999999999`21.69897000433602*^-8,8.739384913073543185225410529993`21.698970004336026*^-8,8.751210081392679873974725075826`21.69897000433602*^-8,8.756863232442135389693899773939`21.69897000433602*^-8}
- Run
Save["filename.wl", IntOutput]
- Open
filename.wl
and Run it.
I checked, the error is reproducible for me with these steps.
Get["filename.wl"]
. $\endgroup$\`
is there. This is because Save does not usePageWidth->Infinity
by default. But again, this does not affect the content if it is read using theGet
command.Save
does not acceptPageWidth->Infinity
option. Only stream output does. There might be an option in preferences to change this. I do not know. $\endgroup$N[{Sqrt[1/17777777777777]}, 1000]
there are several "\" and works fine withSave
and running the opened file with it. $\endgroup$out = N[{Sqrt[1/17777777777777]}, 1000]; Save["file.wl", out]
$\endgroup$Save
usesOpenAppend
, which acceptsPageWidth
, so you can doSetOptions[OpenAppend, PageWidth -> Infinity]
and it works also forSave
:) $\endgroup$