## Search found 1668 matches

Jul 24, 2024 8:11
Forum: General
Topic: personal project - new image format
Replies: 14
Views: 3163

### Re: personal project - new image format

rebuilding from scratch. getting my improvement-over-time algo working went relatively smoothly. code size is a lot smaller compared to previous attempts
Jul 21, 2024 12:11
Forum: General
Topic: CMWC8II
Replies: 33
Views: 1514

### Re: CMWC8II

If we have a list of 20 items, say, then log(20!)/log(2) = 61.077 [1]. 20! is 20 factorial. hmm. concise. it could have taken me weeks to try to suss that formula Shuffling more than 20 items will lead to only a fraction of the possible permutations. This may not be an issue with you, but it may be...
Jul 19, 2024 20:34
Forum: General
Topic: CMWC8II
Replies: 33
Views: 1514

### Re: CMWC8II

ok cool i can see it

screenres 255,200,32 ',,2

' flip

this right here is very interesting
(rnd8(3))=n

behaves differently
rnd8(3)=n

updated visualizer to render ushort, ulong
Jul 19, 2024 12:18
Forum: General
Topic: CMWC8II
Replies: 33
Views: 1514

### Re: CMWC8II

this should give an idea of why i wrote the visualizer here's an lcg. the window size is a multiple of 256 /' ubyte rng period visualizer update: moved lenx8 outside of the namespace random_pixels now works correctly for base_literal as ushort, etc '/ type base_literal as ubyte const lenx8 = 8 * len...
Jul 19, 2024 6:23
Forum: Sources, Examples, Tips and Tricks
Topic: convert any 32-bit ulong to single 0.0-0.999999
Replies: 13
Views: 736

### Re: convert any 32-bit ulong to single 0.0-0.999999

no multiply [update: simpler but period may be reduced. still it's longer than LCG] function round(in as double, places as ubyte = 2) as string dim as integer mul = 10 ^ places return str(csng( int(in * mul + .5) / mul) ) End Function namespace rng dim as ulong tmp, u32, last0 = &HBFFFFF, last1'...
Jul 18, 2024 20:12
Forum: General
Topic: CMWC8II
Replies: 33
Views: 1514

### Re: CMWC8II

so easy :D just like a few of my rngs, multiplier has a drastic effect on period /' ubyte rng period visualizer update: moved lenx8 outside of the namespace random_pixels now works correctly for base_literal as ushort, etc _overflow lenBy2 -> lenx8 '/ 'Extern "C" ' Declare Function __built...
Jul 18, 2024 17:58
Forum: General
Topic: CMWC8II
Replies: 33
Views: 1514

### Re: CMWC8II

ahh thanks for the compliment! seriously i'm not that smart. i just have a lot of passion for things i'm interested in.

i may try to port your algo to a ubyte version soon
Jul 18, 2024 8:26
Forum: General
Topic: CMWC8II
Replies: 33
Views: 1514

### Re: CMWC8II

i'm not seeing the connection between all kinds of stuff there. i'm not super-interested but if you do feel like having another crack at illustration, try imagining with 8 bit state var(s)
Jul 17, 2024 5:24
Forum: General
Topic: CMWC8II
Replies: 33
Views: 1514

### Re: CMWC8II

There is a consensus that we should not use a generator's full period. There have been many proposals - one such is to limit to the square root of the period. interesting, though to the sqr seems extreme. maybe they suggest that to for simple design. yeah 2^32 is way too short what's this 2^30 in r...
Jul 16, 2024 23:54
Forum: Sources, Examples, Tips and Tricks
Topic: convert any 32-bit ulong to single 0.0-0.999999
Replies: 13
Views: 736

### Re: convert any 32-bit ulong to single 0.0-0.999999

he's doing a floating point hack (which i don't understand) which eliminates the usual division oper
Jul 16, 2024 23:11
Forum: General
Topic: CMWC8II
Replies: 33
Views: 1514

### Re: CMWC8II

i havent looked at this yet but i plan to

that's interesting about a 2^64 period .. large period rng's are like fairy magic
Jul 16, 2024 23:00
Forum: Sources, Examples, Tips and Tricks
Topic: convert any 32-bit ulong to single 0.0-0.999999
Replies: 13
Views: 736

### Re: convert any 32-bit ulong to single 0.0-0.999999

very nice, Mr. Peters. i put in namespace so a person can adjust last1, last0 at any time, and removed if statements namespace rng dim as ulong last0 = &HBFFFFF, last1' = last0 shl 16 function f( seed as ulong = 0 ) as single '' https://www.freebasic.net/forum/viewtopic.php?t=32753 ' static as u...
Jul 04, 2024 1:21
Forum: General
Replies: 44
Views: 2733

i hope you find the right tooling to satisfy your needs. my Gen 4 accumulator is done. i now store a decently accurate floating point average in a byte. it's awesome. though in my random ray shooter, i discovered i'd "need" to track write counts per pixel, which Gen 4 "doesn't have en...
Jun 30, 2024 8:52
Forum: General
Replies: 44
Views: 2733

i often find myself sitting for minutes trying to word something so it's either somewhat clear and hopefully thoughtful. Writer's block. I get that. There are many ways to combat it. What works for me is to save what I have done and then do something else for a while. Very typically when I return, ...
Jun 29, 2024 17:19
Forum: General
Replies: 44
Views: 2733