jot.c (9d288406f538c1c8c580c6679a95b34869398988) | jot.c (28c4ca5ce62e557799ce99ced1b086f776b671c4) |
---|---|
1/*- 2 * Copyright (c) 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 82 unchanged lines hidden (view full) --- 91 long id; 92 register double *x = &xd; 93 register double *y = &yd; 94 register long *i = &id; 95 96 getargs(argc, argv); 97 if (randomize) { 98 *x = (ender - begin) * (ender > begin ? 1 : -1); | 1/*- 2 * Copyright (c) 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 82 unchanged lines hidden (view full) --- 91 long id; 92 register double *x = &xd; 93 register double *y = &yd; 94 register long *i = &id; 95 96 getargs(argc, argv); 97 if (randomize) { 98 *x = (ender - begin) * (ender > begin ? 1 : -1); |
99 srandom((unsigned) s); | 99 srandom((unsigned long) s); |
100 for (*i = 1; *i <= reps || infinity; (*i)++) { 101 *y = (double) random() / LONG_MAX; 102 putdata(*y * *x + begin, reps - *i); 103 } 104 } 105 else 106 for (*i = 1, *x = begin; *i <= reps || infinity; (*i)++, *x += s) 107 putdata(*x, reps - *i); --- 287 unchanged lines hidden --- | 100 for (*i = 1; *i <= reps || infinity; (*i)++) { 101 *y = (double) random() / LONG_MAX; 102 putdata(*y * *x + begin, reps - *i); 103 } 104 } 105 else 106 for (*i = 1, *x = begin; *i <= reps || infinity; (*i)++, *x += s) 107 putdata(*x, reps - *i); --- 287 unchanged lines hidden --- |