ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \setupsystem[random]
@ 2004-11-26 13:16 Christopher Creutzig
  2004-11-27 20:13 ` \setupsystem[random] h h extern
  0 siblings, 1 reply; 6+ messages in thread
From: Christopher Creutzig @ 2004-11-26 13:16 UTC (permalink / raw)


Salvete,

  the line

   \setupsystem[random=261113]

causes an error for me:

./CDaufdruck.tex:10: Arithmetic overflow.
\verynormalnextrandom ...al \multiply \randomi 31
                                                   \global \advance 
\randomi ...

\normalnextrandom ...alyear \verynormalnextrandom
                                                   \egroup
\nextrandom ->\bgroup \normalnextrandom
                                         \gdef \nextrandom {\ifcase 
\randomse...
<argument> ...ormaltime =\@@svrandom ]\nextrandom
                                                   \egroup
\firstofoneargument #1->#1

\dosetupsystem ...1]\setuprandomize [\@@svrandom ]
                                                   \beforesplitstring 
\@@svre...
...


ConTeXt  ver: 2004.10.07  fmt: 2004.10.29  int: english  mes: english

regards,
	Christopher

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: \setupsystem[random]
  2004-11-26 13:16 \setupsystem[random] Christopher Creutzig
@ 2004-11-27 20:13 ` h h extern
  2004-11-29 12:15   ` \setupsystem[random] Christopher Creutzig
  0 siblings, 1 reply; 6+ messages in thread
From: h h extern @ 2004-11-27 20:13 UTC (permalink / raw)


Christopher Creutzig wrote:
> Salvete,
> 
>  the line
> 
>   \setupsystem[random=261113]
> 
> causes an error for me:
> 
> ./CDaufdruck.tex:10: Arithmetic overflow.
> \verynormalnextrandom ...al \multiply \randomi 31
>                                                   \global \advance 
> \randomi ...
> 
> \normalnextrandom ...alyear \verynormalnextrandom
>                                                   \egroup
> \nextrandom ->\bgroup \normalnextrandom
>                                         \gdef \nextrandom {\ifcase 
> \randomse...
> <argument> ...ormaltime =\@@svrandom ]\nextrandom
>                                                   \egroup
> \firstofoneargument #1->#1
> 
> \dosetupsystem ...1]\setuprandomize [\@@svrandom ]
>                                                   \beforesplitstring 
> \@@svre...
> ...
> 
> 
> ConTeXt  ver: 2004.10.07  fmt: 2004.10.29  int: english  mes: english
> 
> regards,
>     Christopher

we could consider changing 1440 by 2880 in the next code (in texexec)

my ($sec, $min) = gmtime;
my $RandomSeed = ($min * 60 + $sec) % 1440;

ideas welcome ...

Hans


PS. you can say:  setupsystem[random=100]


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: \setupsystem[random]
  2004-11-27 20:13 ` \setupsystem[random] h h extern
@ 2004-11-29 12:15   ` Christopher Creutzig
  2004-11-29 13:50     ` \setupsystem[random] Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Christopher Creutzig @ 2004-11-29 12:15 UTC (permalink / raw)


h h extern wrote:

> PS. you can say:  setupsystem[random=100]

  I know.  But I tried to use larger numbers, e.g., to copy the values 
of a previous run from the line

systems        : randomizer starts with 379377681

yet always get the above error.  What is the reason for this line if not 
to copy the number into \setupsystem?

rgeards,
	Christopher Creutzig

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: \setupsystem[random]
  2004-11-29 12:15   ` \setupsystem[random] Christopher Creutzig
@ 2004-11-29 13:50     ` Hans Hagen
  2004-11-29 15:41       ` \setupsystem[random] Christopher Creutzig
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2004-11-29 13:50 UTC (permalink / raw)


Christopher Creutzig wrote:
> h h extern wrote:
> 
>> PS. you can say:  setupsystem[random=100]
> 
> 
>  I know.  But I tried to use larger numbers, e.g., to copy the values of 
> a previous run from the line
> 
> systems        : randomizer starts with 379377681
> 
> yet always get the above error.  What is the reason for this line if not 
> to copy the number into \setupsystem?

this is why i sent the patch for texexec (1440 -> 2880)

the problem is that the tex/mp randomizers are based on time and therefore too 
fragile (too little resolution) on fast machines; so i let texexec set the seed

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: \setupsystem[random]
  2004-11-29 13:50     ` \setupsystem[random] Hans Hagen
@ 2004-11-29 15:41       ` Christopher Creutzig
  2004-11-29 16:11         ` \setupsystem[random] Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Christopher Creutzig @ 2004-11-29 15:41 UTC (permalink / raw)


Hans Hagen wrote:

> the problem is that the tex/mp randomizers are based on time and 
> therefore too fragile (too little resolution) on fast machines; so i let 
> texexec set the seed

  So even in the case where the TeX code contains 
\setupsystem[seed=212], texexec does some additional calculations?  (The 
error I got made me think that the number I entered was directly used in 
TeX calculations.)

Christopher

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: \setupsystem[random]
  2004-11-29 15:41       ` \setupsystem[random] Christopher Creutzig
@ 2004-11-29 16:11         ` Hans Hagen
  0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2004-11-29 16:11 UTC (permalink / raw)


Christopher Creutzig wrote:
> Hans Hagen wrote:
> 
>> the problem is that the tex/mp randomizers are based on time and 
>> therefore too fragile (too little resolution) on fast machines; so i 
>> let texexec set the seed
> 
> 
>  So even in the case where the TeX code contains \setupsystem[seed=212], 
> texexec does some additional calculations?  (The error I got made me 
> think that the number I entered was directly used in TeX calculations.)

it does the calculation but the following setup does it again; this is why the 
texexec patch is needed (although i never ran into such large number side effects)

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-11-29 16:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-26 13:16 \setupsystem[random] Christopher Creutzig
2004-11-27 20:13 ` \setupsystem[random] h h extern
2004-11-29 12:15   ` \setupsystem[random] Christopher Creutzig
2004-11-29 13:50     ` \setupsystem[random] Hans Hagen
2004-11-29 15:41       ` \setupsystem[random] Christopher Creutzig
2004-11-29 16:11         ` \setupsystem[random] Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).