Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Simple Prng

Name: Anonymous 2014-05-13 1:00


// uses/requires a seed between 0 & 1
// returns values in range -1 to +1
function randout = sprng(n, seed, offset = 10)
randout = sin( ([1:n] .+ (offset + seed)) .^ 2.0 );
endfunction;

Name: Anonymous 2014-05-13 22:32

>>13
Its domain is making programming easier for retarded engineers who barely took programming 101.

Indices start at 1, retarded slicing syntax, everything is a matrix, most computations are numeric, shitty interfaces for people who actually know programming, It's a huge hack pulled out the ass of an electrical engineer.

If you want decent mathematical software that's able to do good symbolic manipulation, is homoiconic and doesn't suck as much Matlab/Scilab/Octave, try Mathematica.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List