Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Arbitrary-precision numbers in patterns

  • To: mathgroup at smc.vnet.net
  • Subject: [mg45415] Re: [mg45388] Arbitrary-precision numbers in patterns
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Wed, 7 Jan 2004 01:09:05 -0500 (EST)
  • References: <200401050851.DAA20153@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

It seems to me that the  likely reason for this behaviour is that 
Mathematica switches to a different "hash function", once the list of 
hash values starts getting a bit longish. At least to my limited 
understanding of such things (based only on some knowledge of Knuth, 
not on practical experience) that would seem to be a natural thing to 
do. That would of course involve "reordering". However, I doubt that 
you can expect such things to be made public as long as the source code 
of Mathematica is not.

Andrzej Kozlowski

On 5 Jan 2004, at 17:51, Maxim wrote:

> Compare
>
> In[1]:=
> Do[ f[k] = k, {k, 1., 17.} ]
> f[1.`20]
> Clear[f]
>
> Out[2]=
> 1.
>
> and
>
> In[1]:=
> Do[ f[k] = k, {k, 1., 18.} ]
> f[1.`20]
> Clear[f]
>
> Out[2]=
> f[1.0000000000000000000]
>
> -- and the user's best bet to figure out how it'll work is probably to
> flip a coin.
>
> The reason is probably just that the hashing mechanism breaks down,
> because the result returned by Mathematica changes after it re-sorts
> some internal table of DownValues for f (the 'boundary value' 17 is for
> version 5.0 on my machine; if 17. and 18. don't work, try 2. and 100.).
> But in general, my opinion is that it is only to be expected -- when we
> don't even know for sure how the definitions for f can be reordered.
>
> Maxim Rytin
> m.r at prontomail.com
>
>
>


  • Prev by Date: Re: Mathematica exports curves in pieces to Illustrator
  • Next by Date: Re: Understanding Fibonacci Search
  • Previous by thread: Arbitrary-precision numbers in patterns
  • Next by thread: Re: Arbitrary-precision numbers in patterns