#include <math.h>#include "machine.h"#include "sciprint.h"Include dependency graph for kiss.c:

Go to the source code of this file.
Defines | |
| #define | znew (z=36969*(z&65535)+(z>>16)) |
| #define | wnew (w=18000*(w&65535)+(w>>16)) |
| #define | MWC ((znew<<16)+wnew ) |
| #define | CONG (jcong=69069*jcong+1234567) |
| #define | SHR3 (jsr^=(jsr<<17), jsr^=(jsr>>13), jsr^=(jsr<<5)) |
| #define | KISS ((MWC^CONG)+SHR3) |
Functions | |
| unsigned long | kiss () |
| void sciprint | __PARAMS ((char *fmt,...)) |
| int | set_state_kiss (double g1, double g2, double g3, double g4) |
| void | get_state_kiss (double g[]) |
Variables | |
| static unsigned long | z = 362436069 |
| static unsigned long | w = 521288629 |
| static unsigned long | jsr = 123456789 |
| static unsigned long | jcong = 380116160 |
| #define KISS ((MWC^CONG)+SHR3) |
| void sciprint __PARAMS | ( | (char *fmt,...) | ) |
| void get_state_kiss | ( | double | g[] | ) |
| unsigned long kiss | ( | ) |
| int set_state_kiss | ( | double | g1, | |
| double | g2, | |||
| double | g3, | |||
| double | g4 | |||
| ) |
Definition at line 49 of file kiss.c.
References jcong, jsr, long, sciprint(), w, and z.
Referenced by RandI().
00050 { 00051 if (g1 == floor(g1) && g2 == floor(g2) && 00052 g3 == floor(g3) && g4 == floor(g4) && 00053 0.0 <= g1 && g1 <= 4294967295.0 && 00054 0.0 <= g2 && g2 <= 4294967295.0 && 00055 0.0 <= g3 && g3 <= 4294967295.0 && 00056 0.0 <= g4 && g4 <= 4294967295.0 ) 00057 { 00058 z = (unsigned long) g1; 00059 w = (unsigned long) g2; 00060 jsr = (unsigned long) g3; 00061 jcong = (unsigned long) g4; 00062 return ( 1 ); 00063 } 00064 else 00065 { 00066 sciprint("\n\r bad seeds for kiss, must be integers in [0,2^32-1]\n\r"); 00067 return ( 0 ); 00068 } 00069 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 40 of file kiss.c.
Referenced by c_abs(), c_cos(), c_exp(), c_log(), c_sin(), c_sqrt(), callf(), cds(), clcg2(), createblklist(), d_cnjg(), d_imag(), d_mod(), delay4(), dmtree(), drawGrayplotEntity(), DrawMerge3d(), dsort(), dsslti4(), edgetrig(), f_back(), fcoldg(), Fibo_sim(), get_state_kiss(), intsplin3d(), l_write(), lbit_cshift(), mkbitcon(), Objmove(), plot3dn(), qbit_cshift(), r_cnjg(), r_imag(), r_mod(), sci_beta(), sciblk4(), set_state_kiss(), therm_sim(), wr_equiv_init(), XmuAreaAnd(), XmuAreaCopy(), XmuAreaNot(), XmuAreaOrXor(), XmuDestroyScanlineList(), XmuDestroySegmentList(), XmuOptimizeScanline(), XmuScanlineAnd(), XmuScanlineAndSegment(), XmuScanlineCopy(), XmuScanlineEqu(), XmuScanlineNot(), XmuScanlineOr(), XmuScanlineOrSegment(), XmuScanlineXor(), XmuScanlineXorSegment(), XmuValidScanline(), z_abs(), z_cos(), z_exp(), z_log(), z_sin(), z_sqrt(), and zoom_box().
1.5.1