Search found 280 matches
- Feb 20, 2019 3:42
- Forum: Sources, Examples, Tips and Tricks
- Topic: Numerical optimizer
- Replies: 25
- Views: 5444
Re: Numerical optimizer
I was just starting to get back to coding after a break. This forum got very unfriendly very quick. Maybe Brexit is causing a general increase in grumpiness and a lack of movement. Maybe a chia seed and prune juice pudding would help? if not consult your doctor. While not an OAP like some of you guy...
- Feb 19, 2019 13:30
- Forum: Sources, Examples, Tips and Tricks
- Topic: Numerical optimizer
- Replies: 25
- Views: 5444
Re: Numerical optimizer
You can't expect people to maintain 2 systems and two compilers before they post some code. If you want to loosen up maybe the Dandy Warhols are a good band to listen to. Or is it roast beef, Yorkshire pudding and oxo every Sunday.
- Feb 19, 2019 6:45
- Forum: Sources, Examples, Tips and Tricks
- Topic: Numerical optimizer
- Replies: 25
- Views: 5444
Re: Numerical optimizer
I didn't put any work into it. Maybe this business between 32 and 64 bit systems again. Who knows. Anyway on my computer it does some mutations, sees if that makes an improvement, if not undoes. I need to decide an optimizer for something I'm doing. I'm not very happy with the code anyway, also I th...
- Feb 19, 2019 1:39
- Forum: Sources, Examples, Tips and Tricks
- Topic: Numerical optimizer
- Replies: 25
- Views: 5444
Numerical optimizer
function hash64(h as ulongint) as ulongint h = ( h xor ( h shr 30 ) ) * &hBF58476D1CE4E5B9 h = ( h xor ( h shr 27 ) ) * &h94D049BB133111EB return h xor ( h shr 31 ) end function type rnd256 as ulongint s0,s1,s2,s3 declare sub init() declare function next64() as ulongint declare function nex...
- Feb 19, 2019 1:26
- Forum: Libraries & Headers
- Topic: FFHT library (Walsh Hadamard transform)
- Replies: 0
- Views: 6084
FFHT library (Walsh Hadamard transform)
https://github.com/FALCONN-LIB/FFHT The code compiles to 2 objects. In linux you have to use ar to make a libwht.a static library from the objects. wht.bi file: #inclib "wht" declare sub fht_float alias "fht_float" (x as single ptr,ln2size as ulongint) declare sub fht_double ali...
- Feb 18, 2019 22:21
- Forum: Community Discussion
- Topic: Building FreeBASIC 1.06 Release
- Replies: 46
- Views: 12032
Re: Building FreeBASIC 1.06 Release
I am almost certain that this is due to libncurses/libtinfo library on my build system being different from the same named shared library on your system. I chose Ubuntu 14.04 as the build system because it's same as what is used on Travis-CI server (what checks the compiler build when we make pull ...
- Feb 18, 2019 14:35
- Forum: Community Discussion
- Topic: Building FreeBASIC 1.06 Release
- Replies: 46
- Views: 12032
Re: Building FreeBASIC 1.06 Release
I got this little bit of weirdness when compiling with 1.06 Linux 64 as just released: fbc -O 3 "RNG3.bas" (in directory: /initrd/mnt/dev_save/FB/code) fbc: Symbol `ospeed' has different size in shared object, consider re-linking Compilation finished successfully. The code still works fine.
- Feb 17, 2019 12:31
- Forum: Linux
- Topic: Two fbgfx bugs on Linux
- Replies: 8
- Views: 8369
Re: Two fbgfx bugs on Linux
I wasn't able to use FB for a while with Xenial Linux. I thought that was the end of it. However with the new ScPup64 Linux version the graphics are working again. Okay............
- Feb 03, 2019 13:58
- Forum: General
- Topic: RND breadth
- Replies: 42
- Views: 5643
Re: RND breadth
If the uniform random numbers fall on a line between 0 and 1 then you will get less than 0.5 (ie anywhere on the lower half) half the time, less than 0.1 (anywhere on the lower tenth) one over ten of the time, less than 0.01 one over a hundred of the time etc. If you want an equal probability of get...
- Jan 14, 2019 1:31
- Forum: Game Dev
- Topic: GOAP: A Basic AI Tutorial
- Replies: 32
- Views: 21010
Re: GOAP: A Basic AI Tutorial
Behavior trees are often used in more advanced games:
https://en.wikipedia.org/wiki/Behavior_ ... control%29
https://en.wikipedia.org/wiki/Behavior_ ... control%29
- Jan 14, 2019 1:27
- Forum: Projects
- Topic: glvideotexture_chung video to 3D openGL textures conversion
- Replies: 6
- Views: 2903
Re: glvideotexture_chung video to 3D openGL textures conversion
Very technically creative. Maybe you can explore genetic algorithms and neural networks a bit. If I remember correctly you did write some neural network code one time.
- Dec 27, 2018 3:01
- Forum: Beginners
- Topic: Optimization quirks
- Replies: 6
- Views: 1792
Re: Optimization quirks
There are no bugs in gcc. The bug is people assuming overflows etc are valid c code when they are not. The c compiler knows you will never overflow an integer operation, hence it can assume the carry flag is clear at the end of that operation. Should you do 2's complement arithmetic where overflows ...
- Nov 01, 2018 23:41
- Forum: General
- Topic: Bernard Widynski's Middle Square Weyl Sequence RNG (MsWs)
- Replies: 106
- Views: 11384
Re: Bernard Widynski's Middle Square Weyl Sequence RNG (MsWs)
Nice RNG algorithm. I must remember it. There is a 128 bit multiply in the AMD 64 instruction set that you can use for fixed point calculations. A random 64 bit number by (n+1) will give a result between 0 and n in the register that contains the high 64 bits of the 128 bit result. Not perfect but ge...
- Sep 27, 2018 13:23
- Forum: General
- Topic: SSE2: pand xmm3, 31?
- Replies: 49
- Views: 5263
Re: SSE2: pand xmm3, 31?
You can do a movd with an ordinary register
It's quite slow, about 20 clock cycle I think
Code: Select all
mov eax,31
movd xmm0,eax
- Sep 26, 2018 23:13
- Forum: General
- Topic: PRNGs randomness versus uniformity.
- Replies: 8
- Views: 1789
Re: PRNGs randomness versus uniformity.
The upper bits of a LCG where you use only every second value seems good for uniformity. I also have experimented with using the bswap instruction with LCG. If you generate permutations from a RNG the distribution of those permutations seems like a good test but of course only works on very small se...