This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <time.h> | |
static const char mon_name[12][3] = { | |
"Jan", "Feb", "Mar", "Apr", "May", "Jun", | |
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec" | |
}; | |
int | |
main(void) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#define E2(...) E1(E1(E1(E1(E1(E1(E1(E1(E1(E1(__VA_ARGS__)))))))))) | |
#define E1(...) __VA_ARGS__ | |
#define EMPTY() | |
#define DEFER1(m) m EMPTY() | |
#define APPLY3(F,a,m,k) F(a,0,m,k), F(a,1,m,k), F(a,2,m,k), \ | |
F(a,3,m,k), F(a,4,m,k), F(a,5,m,k), \ | |
F(a,6,m,k), F(a,7,m,k), F(a,8,m,k), \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#define E2(...) E1(E1(E1(E1(E1(E1(E1(E1(E1(E1(__VA_ARGS__)))))))))) | |
#define E1(...) __VA_ARGS__ | |
#define EMPTY() | |
#define DEFER1(m) m EMPTY() | |
#define APPLY3(F,a,x,y,v) F(a,0,x,y,v), F(a,1,x,y,v), F(a,2,x,y,v), \ | |
F(a,3,x,y,v), F(a,4,x,y,v), F(a,5,x,y,v), \ | |
F(a,6,x,y,v), F(a,7,x,y,v), F(a,8,x,y,v), \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
i,j,k,L; | |
#include <time.h> | |
float X,Y,Z,l,t,x,y,z, | |
A,S,C;r(X,Y)float*X,*Y;{A | |
=*X,S=sin(l),C=cos(l);*X=A*C | |
-*Y*S,*Y=A*S+*Y *C;}main() | |
{char*p,s[L=( W+1)*H]; | |
printf("\x1b" "[2J");r | |
:p=s;for(i=0; i<H;++i, | |
*p++=10)for(j =0;j<W; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct list { struct list *list; }; | |
struct list * | |
list(struct list *list) | |
{ | |
list: | |
if (list->list && (list = list->list)) | |
goto list; | |
return list; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 5.2 Uniform real distribution ----------------------------------------------- | |
* | |
* Generating uniform random floating-point numbers might seem easy at first | |
* glance, just cast the output of a PRNG to the desired float type and divide | |
* by the biggest possible output of the PRNG to obtain a random float between | |
* 0 and 1 that can now be scaled up. | |
* Though as before this straightforward approach is biased. | |
* | |
* For the next part, I assume you are already acquainted with the IEEE 754 |
NewerOlder