void tst_mpff() { disable_trace("mpff"); enable_trace("mpff_trace"); // enable_trace("mpff_bug"); // enable_trace("mpff_to_mpq"); // tst_div(2); tst_prev_power_2(); tst_decimal(); tst_div_core(679, 396, 279, 756, 2, 0); tst_limits(2); tst_limits(4); tst_sgn(2); tst_sgn(4); tst_sgn(8); tst_power(2); tst_power(4); tst_power(18); tst_capacity(2); tst_capacity(4); tst_capacity(8); tst_capacity(16); tst_set64(1000, 2); tst_set64(1000, 4); tst_set64(1000, 6); tst_bug2(); tst_sub(1000, 1024, 2); tst_sub(1000, 1024, 4); tst_div(1000, 1024, 2, true); tst_div(1000, 1024, 4, true); tst_mul(1000, 1024, 2); tst_mul(1000, 1024, 4); tst_add(1000, 1024, 2); tst_add(1000, 1024, 4); tst_sub(1000, UINT_MAX, 2); tst_sub(1000, UINT_MAX, 4); tst_div(1000, UINT_MAX, 2, true); tst_div(1000, UINT_MAX, 4, true); tst_mul(1000, UINT_MAX, 2); tst_mul(1000, UINT_MAX, 4); tst_add(1000, UINT_MAX, 2); tst_add(1000, UINT_MAX, 4); tst_bug2(); tst_bug(); tst_add_core(1,1, 1,1); tst_add_core(1,3, 2,3); tst1(); tst2(); tst3(); tst4(); tst5(); tst6(); tst7(); }
int main(void) { Py_Initialize(); PyRun_SimpleString( "import PyIDL\n" "import MyCalc\n" "PyIDL.Register('IDL:Calc:1.0', MyCalc.MyCalc)\n" ); tst_div(); tst_add(); Py_Finalize(); return 0; }