Hallo Stefan,
wenn ich Ihr notebook unter Windows unevaluiert öffne, erscheint
------------------------------------------------------------------------
rootsOfI[8]
The roots are <<1>>
------------------------------------------------------------------------
Somit gibt es auch unter Linux Fehler mit Short[]: Bei rootsOfI[7]
erscheint richtig eine Verkürzung, rootsOfI[8] kollabiert, rootsOfI[9]
ist wieder korrekt formatiert.
Mit den besten Grüssen
Udo.
On 4/6/2026 12:18 PM, Stefan Welke wrote:
Frohe Ostern lieber Udo,
bei mir unter Linux sieht es so aus wie im angehängten Notebook, alles
einzeilig.
Viele Grüße
Stefan
On 06/04/2026 08:53, Susanne & Udo Krause via demug wrote:
Liebe Freundinnen und Freunde wahrlich randständiger Bemerkungen,
Angenommen, es gäbe eine Funktion
In[47]:= Clear[rootsOfI]
rootsOfI::nosol := "Solve runs empty for n = `1`";
rootsOfI[n_Integer?Positive] := Block[{s = x /. Solve[x^n - I == 0, x]},
If[Length[s] == 0,
Message[rootsOfI::nosol, n];
Return[$Failed], (* else *)
Print["The roots are ", Short[s]]
];
Graphics[{Circle[],
{PointSize[.03], Red, Point[{0, 1}]},
{PointSize[.03], Blue, Point[ReIm /@ s]}
},
Axes -> True]
]
und man schaute sich die Angaben von Short[s] an, dann sähe das mit
In[48]:= $Version
Out[48]= "14.3.0 for Microsoft Windows (64-bit) (July 8, 2025)"
erst gut aus
rootsOfI[4]
The roots are {-(-1)^(1/8),(-1)^(1/8),-(-1)^(5/8),(-1)^(5/8)}
dann nicht
rootsOfI[10]
The roots are
{-(-1)^(1/20),(-1)^(1/20),-(-1)^(1/4),(-1)^(1/4),-<<1>>^<<1>>,<<1>>,-(-1)^(13/20),(-1)^(13/20),-(-1)^(17/20),(-1)^(17/20)}
und wieder nicht
rootsOfI[11]
The roots are
{-I,(-1)^(1/22),-(-1)^(3/22),(-1)^(5/22),-<<1>>,<<1>>^<<1>>,<<1>>^<<1>>,-(-1)^(15/22),(-1)^(17/22),-(-1)^(19/22),(-1)^(21/22)}
das nimmt übrigens widerreferentiell 2 Zeilen ein ... und ab 12 ist
es dann in Ordnung
rootsOfI[12]
The roots are
{-(-1)^(1/24),(-1)^(1/24),-(-1)^(5/24),(-1)^(5/24),<<4>>,-(-1)^(17/24),(-1)^(17/24),-(-1)^(7/8),(-1)^(7/8)}
z.B.
rootsOfI[21]
The roots are
{I,(-1)^(1/42),-(-1)^(1/14),(-1)^(5/42),-(-1)^(1/6),<<12>>,-(-1)^(5/6),(-1)^(37/42),-(-1)^(13/14),(-1)^(41/42)}
Frohe Ostern!
Udo.
_______________________________________________
DMUG Deutschsprachiges Mathematica-Forum demug@XXXXXXX.ch
http://www.mathematica.ch/mailman/listinfo/demug
Archiv: http://www.mathematica.ch/archiv.html
_______________________________________________
DMUG Deutschsprachiges Mathematica-Forum demug@XXXXXXX.ch
http://www.mathematica.ch/mailman/listinfo/demug
Archiv: http://www.mathematica.ch/archiv.html