Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #147692

Re: Bart, a tcc "issue"

Subject Re: Bart, a tcc "issue"
Newsgroups comp.lang.c
References <uRIwF.17878$kE3.891@fx36.iad> <zbJwF.44884$vV6.3918@fx17.am4>
From Bart <bc@freeuk.com>
Message-ID <eeJwF.44885$vV6.5431@fx17.am4> (permalink)
Organization virginmedia.com
Date 2019-11-07 00:06 +0000

Show all headers | View raw


On 07/11/2019 00:03, Bart wrote:
> On 06/11/2019 23:40, DFS wrote:
>> I wrote a distribution of characters counter, and on tcc (0.9.26) on 
>> Windows it always undercounts the last character in the set (9).  If 
>> you have tcc on Windows maybe you could test it.  Doesn't happen on 
>> gcc/MSYS2/Windows.
> 
> 
> Do you mean the count for 9 is lower than expected?
> 
> I can see that, but it's not a tcc thing, I see it on gcc/Windows too. 
> (Maybe gcc/MSYS2 uses a wider random number range; what is RAND_MAX on 
> gcc/MSYS2?)
> 
>  >      printf("%c = %d\n",charset[i],cnt);
> 
> With 1000000 samples divided 62 ways, you expect an average 16129 per 
> character. So print instead cnt-1629 to show the deviation more clearly.

That should be 16129:

    printf("%c = %d\n",charset[i],cnt-16129);

(This is only for a span of 62 and 1000000 total random numbers.)

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Bart, a tcc "issue" DFS <nospam@dfs.com> - 2019-11-06 18:40 -0500
  Re: Bart, a tcc "issue" Bart <bc@freeuk.com> - 2019-11-07 00:03 +0000
    Re: Bart, a tcc "issue" Bart <bc@freeuk.com> - 2019-11-07 00:06 +0000
    Re: Bart, a tcc "issue" Bart <bc@freeuk.com> - 2019-11-07 01:44 +0000
  Re: Bart, a tcc "issue" James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-11-07 10:05 -0500
    Re: Bart, a tcc "issue" DFS <nospam@dfs.com> - 2019-11-07 13:22 -0500
    Re: Bart, a tcc "issue" DFS <nospam@dfs.com> - 2019-11-08 09:19 -0500
      Re: Bart, a tcc "issue" James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-11-08 11:03 -0500
  Re: Bart, a tcc "issue" Manfred <noname@add.invalid> - 2019-11-07 18:22 +0100
    Re: Bart, a tcc "issue" Manfred <noname@add.invalid> - 2019-11-07 18:30 +0100
  Re: Bart, a tcc "issue" Richard Damon <Richard@Damon-Family.org> - 2019-11-08 20:51 -0500
    Re: Bart, a tcc "issue" Tim Rentsch <tr.17687@z991.linuxsc.com> - 2019-11-08 20:59 -0800
      Re: Bart, a tcc "issue" Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-11-09 23:16 +0000
        Re: Bart, a tcc "issue" Richard Damon <Richard@Damon-Family.org> - 2019-11-09 20:27 -0500
          Re: Bart, a tcc "issue" Bart <bc@freeuk.com> - 2019-11-10 01:38 +0000
            Re: Bart, a tcc "issue" Richard Damon <Richard@Damon-Family.org> - 2019-11-09 20:59 -0500
              Re: Bart, a tcc "issue" Keith Thompson <kst-u@mib.org> - 2019-11-09 19:22 -0800
          Re: Bart, a tcc "issue" Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-11-10 03:04 +0000
            Re: Bart, a tcc "issue" Richard Damon <Richard@Damon-Family.org> - 2019-11-09 23:04 -0500
              Re: Bart, a tcc "issue" Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-11-10 13:15 +0000
        Re: Bart, a tcc "issue" Tim Rentsch <tr.17687@z991.linuxsc.com> - 2019-11-10 06:04 -0800
        Re: Bart, a tcc "issue" Tim Rentsch <tr.17687@z991.linuxsc.com> - 2019-11-10 07:49 -0800
          Re: Bart, a tcc "issue" Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-11-10 17:49 +0000
      Re: Bart, a tcc "issue" "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2019-11-11 02:44 -0800
        Re: Bart, a tcc "issue" James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-11-11 13:57 -0500
          Re: Bart, a tcc "issue" "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2019-11-14 16:51 -0800
        Re: Bart, a tcc "issue" Tim Rentsch <tr.17687@z991.linuxsc.com> - 2019-11-28 16:03 -0800

csiph-web