Arbitrary precision calculation makes my computer hang - Mathematica Stack Exchange most recent 30 from mathematica.stackexchange.com 2019-09-22T11:07:25Z https://mathematica.stackexchange.com/feeds/question/159907 https://creativecommons.org/licenses/by-sa/4.0/rdf https://mathematica.stackexchange.com/q/159907 0 Arbitrary precision calculation makes my computer hang Masacroso https://mathematica.stackexchange.com/users/44169 2017-11-14T13:56:22Z 2017-11-14T17:42:18Z <p>I have this code</p> <pre><code>list = Accumulate@Tan[N[Range[10^8]]]; // AbsoluteTiming </code></pre> <p>and the timing is slightly more than two seconds. Now if I try to compute this</p> <pre><code>list = Accumulate@Tan[N[Range[10^8],30]]; // AbsoluteTiming </code></pre> <p>my computer its completely blocked. I have a laptop with an i7 chipset and 4gb of RAM, and Im not running any other thing in the background. It is really as big this calculation to block my computer or there is something wrong in the code or in my computer?</p> <p>More over: this code</p> <pre><code>ListPlot[Abs[Accumulate[Tan[N[Range[10^6]]]] -Accumulate@Tan[N[Range[10^6],1000]]]] </code></pre> <p>(with an arbitrary precision of 1000 inside!!!) runs fine, that is, it make the plot in some minutes. However I cant use a range bigger than \$10^6\$. What is going on? Its \$10^8\$ too big for my computer?</p> <p>There is an alternative code, with the same dimension of \$10^8\$ and precision at least \$30\$ that can be handled easier for a computer?</p>