MathGroup Archive 2010

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

Search the Archive

Re: problem with RandomInteger

  • To: mathgroup at smc.vnet.net
  • Subject: [mg112230] Re: problem with RandomInteger
  • From: Albert Retey <awnl at gmx-topmail.de>
  • Date: Sun, 5 Sep 2010 07:08:47 -0400 (EDT)
  • References: <i5vnr8$2dn$1@smc.vnet.net>

Hi,

> PS: You may want to talk to someone at wolfram about this. As others
> pointed out, your initial code works if n<249 and breaks down if n is
> larger. I also noticed that if you remove l, i, j from the list of
> localized variables, your initial code works for any n. Wolfram may
> need to know about this inconsistent behavior. Nonetheless, I think
> that str1[] is not proper syntax in Mathematica and its possible that
> this behavior arises because mathematica does not anticipate an empty
> [].  Just hypothesizing here...

I strongly disagree with this: str1[] is absolutely valid syntax for
Mathematica, and in fact many of Mathematica internal functions use that
syntax, too, try e.g. Date[]. In fact while both variants are valid
syntax and should work I think that empty argument brackets are far more
often used for SetDelayed definitions which will actually run code
('execute a function') than just the symbol name, so that might be some
explicit or implicit design rule. The fact that the results differ on
whether we define it as an OwnValue or DownValue makes me even more
convinced this is a bug...

hth,

albert



  • Prev by Date: Re: FindRoots?
  • Next by Date: Finite Groups...infinite disappoinment
  • Previous by thread: Re: problem with RandomInteger
  • Next by thread: Re: problem with RandomInteger