Smart pascal source code
var
i, j: Integer;
var
ih, jh: Integer;
begin
for i := -1 to 1 do
begin
for j := -1 to 1 do
begin
WriteLn('**** ' + IntToStr(i) + ', ' + IntToStr(j) + ' : ');
if i = j then
WriteLn('=,');
if i <> j then
WriteLn('<>,');
if i < j then
WriteLn('<,');
if i <= j then
WriteLn('<=,');
if i > j then
WriteLn('>,');
if i >= j then
WriteLn('>=,');
WriteLn('');
end;
end;
for i := -1 to 1 do
begin
for j := -1 to 1 do
begin
ih := i * (1 shl 32);
jh := j * (1 shl 32);
WriteLn('**** ' + IntToStr(ih) + ', ' + IntToStr(jh) + ' : ');
if ih = jh then
WriteLn('=,');
if ih <> jh then
WriteLn('<>,');
if ih < jh then
WriteLn('<,');
if ih <= jh then
WriteLn('<=,');
if ih > jh then
WriteLn('>,');
if ih >= jh then
WriteLn('>=,');
WriteLn('');
end;
end;
for i := -1 to 1 do
begin
for j := -1 to 1 do
begin
ih := i + (1 shl 32);
jh := j + (1 shl 32);
WriteLn('**** ' + IntToStr(ih) + ', ' + IntToStr(jh) + ' : ');
if ih = jh then
WriteLn('=,');
if ih <> jh then
WriteLn('<>,');
if ih < jh then
WriteLn('<,');
if ih <= jh then
WriteLn('<=,');
if ih > jh then
WriteLn('>,');
if ih >= jh then
WriteLn('>=,');
WriteLn('');
end;
end;
for i := -1 to 1 do
begin
for j := -1 to 1 do
begin
ih := i - (1 shl 32);
jh := j - (1 shl 32);
WriteLn('**** ' + IntToStr(ih) + ', ' + IntToStr(jh) + ' : ');
if ih = jh then
WriteLn('=,');
if ih <> jh then
WriteLn('<>,');
if ih < jh then
WriteLn('<,');
if ih <= jh then
WriteLn('<=,');
if ih > jh then
WriteLn('>,');
if ih >= jh then
WriteLn('>=,');
WriteLn('');
end;
end;
{ <<< CONSOLE OUTPUTS >>>
**** -1, -1 : =, <=, >=,
**** -1, 0 : <>, <, <=,
**** -1, 1 : <>, <, <=,
**** 0, -1 : <>, >, >=,
**** 0, 0 : =, <=, >=,
**** 0, 1 : <>, <, <=,
**** 1, -1 : <>, >, >=,
**** 1, 0 : <>, >, >=,
**** 1, 1 : =, <=, >=,
**** -4294967296, -4294967296 : =, <=, >=,
**** -4294967296, 0 : <>, <, <=,
**** -4294967296, 4294967296 : <>, <, <=,
**** 0, -4294967296 : <>, >, >=,
**** 0, 0 : =, <=, >=,
**** 0, 4294967296 : <>, <, <=,
**** 4294967296, -4294967296 : <>, >, >=,
**** 4294967296, 0 : <>, >, >=,
**** 4294967296, 4294967296 : =, <=, >=,
**** 0, 0 : =, <=, >=,
**** 0, 1 : <>, <, <=,
**** 0, 2 : <>, <, <=,
**** 1, 0 : <>, >, >=,
**** 1, 1 : =, <=, >=,
**** 1, 2 : <>, <, <=,
**** 2, 0 : <>, >, >=,
**** 2, 1 : <>, >, >=,
**** 2, 2 : =, <=, >=,
**** -2, -2 : =, <=, >=,
**** -2, -1 : <>, <, <=,
**** -2, 0 : <>, <, <=,
**** -1, -2 : <>, >, >=,
**** -1, -1 : =, <=, >=,
**** -1, 0 : <>, <, <=,
**** 0, -2 : <>, >, >=,
**** 0, -1 : <>, >, >=,
**** 0, 0 : =, <=, >=,
}
var i = 0;
var j = 0;
var ih = 0;
var jh = 0;
for(i=-1;i<=1;i++) {
for(j=-1;j<=1;j++) {
WriteLn(("**** "+i.toString()+", "+j.toString()+" : "));
if (i==j) {
WriteLn("=,");
}
if (i!=j) {
WriteLn("<>,");
}
if (ij) {
WriteLn(">,");
}
if (i>=j) {
WriteLn(">=,");
}
WriteLn("");
}
}
for(i=-1;i<=1;i++) {
for(j=-1;j<=1;j++) {
ih = i*4294967296;
jh = j*4294967296;
WriteLn(("**** "+ih.toString()+", "+jh.toString()+" : "));
if (ih==jh) {
WriteLn("=,");
}
if (ih!=jh) {
WriteLn("<>,");
}
if (ihjh) {
WriteLn(">,");
}
if (ih>=jh) {
WriteLn(">=,");
}
WriteLn("");
}
}
for(i=-1;i<=1;i++) {
for(j=-1;j<=1;j++) {
ih = i+(1<<32);
jh = j+(1<<32);
WriteLn(("**** "+ih.toString()+", "+jh.toString()+" : "));
if (ih==jh) {
WriteLn("=,");
}
if (ih!=jh) {
WriteLn("<>,");
}
if (ihjh) {
WriteLn(">,");
}
if (ih>=jh) {
WriteLn(">=,");
}
WriteLn("");
}
}
for(i=-1;i<=1;i++) {
for(j=-1;j<=1;j++) {
ih = i-(1<<32);
jh = j-(1<<32);
WriteLn(("**** "+ih.toString()+", "+jh.toString()+" : "));
if (ih==jh) {
WriteLn("=,");
}
if (ih!=jh) {
WriteLn("<>,");
}
if (ihjh) {
WriteLn(">,");
}
if (ih>=jh) {
WriteLn(">=,");
}
WriteLn("");
}