# Tag Info

22

It's due to an implementation-dependent issue. We should try to improve on it. Has not been much clamor to do so, therefore it has not been a high priority. --- edit --- I've had a look at the code. It is quite intentional that the largest is around what you state (I see the constant being set to $7.783516108362\times 10^{12}$). It has to do with this ...

22

Actually, I believe the issue reduced to that of implementing PrimePi[]. It is easy to implement Prime[] using PrimePi[] and FindRoot[] — in fact this is done on page 134 of Bressoud and Wagon, "A Course in Computational Number Theory". So all you need is to have a fast implementation of PrimePi[]. The first efficient way was found by Legendre in 1808. The ...

19

If you calculate Log[2,Log[2,$MaxNumber]], you'll get 29.999999828017338886225739 which is remarkably close to 30. Therefore I conclude that Mathematica calculates with a 31-bit exponent (1 bit for the exponent's sign). Which means that if Mathematica uses the same ordering as IEEE floats (i.e. first sign bit, then exponent, then mantissa), the first 32 ... 16 As it seems to depend on more than machine bits I'm curious what$MaxNumber various Mathematica installs have. If your setup is different please fill in system information and Log2 @ Log2 @ $MaxNumber // Round in the table below:$$\begin{array}{r|c|c|l|c} \text{OS} & \text{Bits} & \text{Version} & \text{\$MaxNumber} & \log_2\log_2\\ \...

10

(All observations made in version 7.) There seems to be a limitation for input even in the Front End (Notebook interface), in that if I enter more than 766 levels of nested lists I get a MaxFormatDepthExceeded expression and an error beep. The help text is: A box structure with a depth exceeding the maximum allowed depth was encountered. We can at ...

7

Oleksandr remarked on the memory required for a dense matrix. I shall attempt to explore SparseArray limitations. From this error message it appears that the dimensions of the array must be machine integers: SparseArray[{}, {2, 2}^70] SparseArray::adims: Array dimension specification {1180591620717411303424,1180591620717411303424} should be Automatic,...

6

What you experience here seems to be some kind of stack limit when you have nested expressions. It doesn't seem to matter whether you nest lists or function calls. Look for instance at this example here which is nothing more than a nested call f[f[f[...f[a]]..] On the other hand, if the parser doesn't need to build up such a large stack, it seems to ...

6

The answer was already given by Xerxes. It is a limitation of MIDI, which only supports 16 channels. That Mathematica really uses MIDI is described in the docs. For instance in the tutorial The Representation of Sound: At the lowest level, all sounds in Mathematica are represented as a sequence of amplitude samples, or as a sequence of MIDI events.

6

Source Mathematica makes use of the PCRE library. According to http://www.pcre.org/pcre.txt : Within a compiled pattern, offset values are used to point from one part to another (for example, from an opening parenthesis to an alter- nation metacharacter). By default, in the 8-bit and 16-bit libraries, two-byte values are used for ...

5

You can define a customized BaseForm: (* Solution 1 *) baseForm[num_, n_] := BaseForm[num //. BaseForm[a_, _] :> a, n] (* Solution 2, may be dangerous *) baseForm[num_, n_] := BaseForm[Block[{BaseForm = # &}, num], n] But personally I think keeping BaseForm out of the function definition is better. If you feel it cumbersome to type BaseForm ...

5

If you just want to check if Bold exists in Names, there's no need for string matching: MemberQ[Names["*"], "Bold"] (* True *) or even Names["Bold"] != {} (* True *) Names also takes more elaborate string patterns, just as StringMatchQ does. That being said, even in your example, I don't understand, why you're matching all the names against Bold ...

3

Your first port of call should be to have a look at the documentation for $MaxNumber, which says:$MaxNumber gives the maximum arbitrary‐precision number that can be represented on a particular computer system. On my machine, $MaxNumber returns$1.605216761933662 \times 10^{1355718576299609}$. With regards to your number,$44^{6553700000000}\$, I ...

2

The second case integrates analytically, so you can do a series expansion: series = Normal@Series[ Integrate[Exp[-alpha Sqrt[x]], {x, 0, y}], {alpha, Infinity, 3}] E^(-alpha Sqrt[y]) (-(2/alpha^2) + (2 E^(alpha Sqrt[y]))/alpha^2 - (2 Sqrt[y])/ alpha) Plot[{NIntegrate[Exp[-alpha Sqrt[x]], {x, 0, 1/2}] , series /. y -> 1/2 }, {alpha, 0 , 10}] ...

2

This works fine for me (v.10.0.0 on Mac Pro): Clear[a, b] a = 44^(65537); b = 22^(65537); c = GCD[a, b]; Where all the digits of c are computed and revealed within about 2 seconds. N@c 2.265859854928417*10^87978

2

Many times you can solve this kind of problems using realtions such as GCD[a,b]=GCD[b,Mod[a,b]] and substituting conventional functions for modular ones more specialized. For example, instead of Mod[x^y,z] you have to use PowerMod[x,y,z] that works if z is not too big, even if x^y is huge. Coming back to your example and using different ...

1

One solution that works when the value isn't being stored if it's not base-10 is to use a wrapper to conditionally apply the BaseForm. baseForm[e_,n_]:=If[n==10,e,BaseForm[e,n]] This fixes the nesting problem because BaseForm[] is only applied in the last call of the execution stack. It is too bad BaseForm[] doesn't do this by default.

1

The two-dimensional histogram figure works for me (v. 10.0.0) for 300000 data points: mydata = RandomVariate[UniformDistribution[], {300000, 2}]; DensityHistogram[mydata] I did get your error message when I accidentally had extra { } around my data set. Check that for your data. You can do that by Dimensions[mydata].

1

I guess my solution maybe pretty easy,but it can works: n = 5; ToExpression[Table["{", {n}] <> Table["}", {n}]] == Nest[{#} &, {}, n - 1] True And if I set n a large number: n=2*10^6; Nest[{#} &, {}, n]; Depth[%] 2000002 Also works.

Only top voted, non community-wiki answers of a minimum length are eligible