I am obtaining a very unexpected result and I would really like to not get this result:
vector = {1, 1, 1, 1/2, 1/2, 1/4, 1/4, 1/96 (11 + Sqrt[97]), 1/6, 1/6,
1/8, 1/8, 1/10, 1/12, 1/12, 1/20, 1/20, 1/36, 1/36, 1/36, 1/36, 1/36,
1/40, 1/80, 1/80, 1/96 (11 - Sqrt[97]), 1/96, 1/144, 1/144, 1/576, 1/576};
Position[vector, 1/2]
(* Out[1224]= {{4}, {5}, {8, 2, 2, 2}, {26, 2, 2, 2, 2}} *)
I am expecting the result to be {{4}, {5}}, I am very unsure where these extra values are coming from!
Position[vector, 1/2, 1]and to learn why take a look atFullFormof bothvectorand1/2. – Kuba Oct 24 '18 at 12:001/2s comes from the fact thatSqrtis equivalently a1/2-th power. UseFullForm[vector]to show the internal form used actually by the kernels. – Αλέξανδρος Ζεγγ Oct 24 '18 at 14:03