#ifdef __linux__ lib "crypt"; #endif #include function test\calc1() : array { let numerator = 3 * 5 + 2; let denominator = 17; return div(numerator, denominator) as to_array(div, to_int(quot), to_int(rem) ); } function test\calc2() : array { let numerator = 4 + 5 * 2; let denominator = 14; return div(numerator, denominator) as to_array(div, to_int(quot), to_int(rem) ); } function test\calc3() : array { let numerator = -1 + 2 - 3 * 2; let denominator = -5; return div(numerator, denominator) as to_array(div, to_int(quot), to_int(rem) ); } function test\calc4() : array { let numerator = 1 * 5 / 5 * -1 / -1 * 10 / 5 + 4 * 2; let denominator = 10; return div(numerator, denominator) as to_array(div, to_int(quot), to_int(rem) ); } function test\calc5() : array { let numerator = 5 % 3; let denominator = 2; return div(numerator, denominator) as to_array(div, to_int(quot), to_int(rem) ); } function test\calc6() : array { let numerator = 5 % 3 + 1; let denominator = 3; return div(numerator, denominator) as to_array(div, to_int(quot), to_int(rem) ); } function test\calc7() : array { let numerator = 5 % (3 + 1); let denominator = 1; return div(numerator, denominator) as to_array(div, to_int(quot), to_int(rem) ); } function test\calc8() : array { let numerator = !0 + !0 + !0; let denominator = 3; return div(numerator, denominator) as to_array(div, to_int(quot), to_int(rem) ); } function test\calc9() : array { let numerator = 1 && 2; let denominator = 1; return div(numerator, denominator) as to_array(div, to_int(quot), to_int(rem) ); } function test\calc10() : array { let numerator = (1 | 2 | 4) & ~3; let denominator = 4; return div(numerator, denominator) as to_array(div, to_int(quot), to_int(rem) ); } function test\calc11() : array { let numerator = 1 + (1 + 1 < 2); let denominator = 1; return div(numerator, denominator) as to_array(div, to_int(quot), to_int(rem) ); } function test\calc12() : array { let numerator = 1 + (1 + 1 < 3); let denominator = 2; return div(numerator, denominator) as to_array(div, to_int(quot), to_int(rem) ); }