#include "stdio.h" #include "math.h" #define PI 3.14159265358979323846 /* The number of ways to tile an MxN rectangle with 1x2 dominos is 2^(M*N/2) times the product of { cos^2(m*pi/(M+1)) + cos^2(n*pi/(N+1)) } ^ (1/4) over all m,n in the range 0