Day: April 1, 2005

Random numbers

April 1, 2005 Programs No comments

Random numbers in sfnoise and similar programs are now generated by portable code from Makoto Matsumoto and Takuji Nishimura (the “Mersenne Twister” algorithm). It is regarded as one of the most powerful algorithms and is the default random number generator in GSL.

sfmath

April 1, 2005 Programs No comments

sfmath can now work with complex numbers. Try something like
sfmath n1=100 type=complex output=”exp(I*x1)” | sfgraph screenratio=1 | xtpen
You cannot, however, mix float and complex files in the input. Use sfdd, sfrtoc, sfreal, sfimag and sfcmplx to convert between real and complex types.
sfmath n1=100 output=x1 | sfrtoc | sfmath output=”exp(I*input)” | sfgraph screenratio=1 | xtpen