mplisp

miniPicoLisp with FFI and modules for Buddy BDD library, OpenGL, Gtk and GMP
git clone https://logand.com/git/mplisp.git/
Log | Files | Refs

gmp.ffi.c (38180B)


      1 /* Generated from gmp.ffi */
      2 
      3 #include "../pico.h"
      4 
      5 #include "gmp.h"
      6 
      7 any cfun_mpz_init(any ex) {
      8    any x = ex, y;
      9    x = cdr(x);
     10    y = EVAL(car(x));
     11    NeedNum(ex, y);
     12    mpz_ptr b1 = (mpz_ptr) unBox(y);
     13    mpz_init(b1);
     14    return Nil;
     15 }
     16 
     17 any cfun_mpz_init2(any ex) {
     18    any x = ex, y;
     19    x = cdr(x);
     20    y = EVAL(car(x));
     21    NeedNum(ex, y);
     22    mpz_ptr b1 = (mpz_ptr) unBox(y);
     23    x = cdr(x);
     24    y = EVAL(car(x));
     25    NeedNum(ex, y);
     26    ulong b2 = (ulong) unBox(y);
     27    mpz_init2(b1, b2);
     28    return Nil;
     29 }
     30 
     31 any cfun_mpz_clear(any ex) {
     32    any x = ex, y;
     33    x = cdr(x);
     34    y = EVAL(car(x));
     35    NeedNum(ex, y);
     36    mpz_ptr b1 = (mpz_ptr) unBox(y);
     37    mpz_clear(b1);
     38    return Nil;
     39 }
     40 
     41 any cfun_mpz_realloc2(any ex) {
     42    any x = ex, y;
     43    x = cdr(x);
     44    y = EVAL(car(x));
     45    NeedNum(ex, y);
     46    mpz_ptr b1 = (mpz_ptr) unBox(y);
     47    x = cdr(x);
     48    y = EVAL(car(x));
     49    NeedNum(ex, y);
     50    ulong b2 = (ulong) unBox(y);
     51    mpz_realloc2(b1, b2);
     52    return Nil;
     53 }
     54 
     55 any cfun_mpz_set(any ex) {
     56    any x = ex, y;
     57    x = cdr(x);
     58    y = EVAL(car(x));
     59    NeedNum(ex, y);
     60    mpz_ptr b1 = (mpz_ptr) unBox(y);
     61    x = cdr(x);
     62    y = EVAL(car(x));
     63    NeedNum(ex, y);
     64    mpz_ptr b2 = (mpz_ptr) unBox(y);
     65    mpz_set(b1, b2);
     66    return Nil;
     67 }
     68 
     69 any cfun_mpz_set_ui(any ex) {
     70    any x = ex, y;
     71    x = cdr(x);
     72    y = EVAL(car(x));
     73    NeedNum(ex, y);
     74    mpz_ptr b1 = (mpz_ptr) unBox(y);
     75    x = cdr(x);
     76    y = EVAL(car(x));
     77    NeedNum(ex, y);
     78    ulong b2 = (ulong) unBox(y);
     79    mpz_set_ui(b1, b2);
     80    return Nil;
     81 }
     82 
     83 any cfun_mpz_set_si(any ex) {
     84    any x = ex, y;
     85    x = cdr(x);
     86    y = EVAL(car(x));
     87    NeedNum(ex, y);
     88    mpz_ptr b1 = (mpz_ptr) unBox(y);
     89    x = cdr(x);
     90    y = EVAL(car(x));
     91    NeedNum(ex, y);
     92    long b2 = (long) unBox(y);
     93    mpz_set_si(b1, b2);
     94    return Nil;
     95 }
     96 
     97 any cfun_mpz_swap(any ex) {
     98    any x = ex, y;
     99    x = cdr(x);
    100    y = EVAL(car(x));
    101    NeedNum(ex, y);
    102    mpz_ptr b1 = (mpz_ptr) unBox(y);
    103    x = cdr(x);
    104    y = EVAL(car(x));
    105    NeedNum(ex, y);
    106    mpz_ptr b2 = (mpz_ptr) unBox(y);
    107    mpz_swap(b1, b2);
    108    return Nil;
    109 }
    110 
    111 any cfun_mpz_init_set(any ex) {
    112    any x = ex, y;
    113    x = cdr(x);
    114    y = EVAL(car(x));
    115    NeedNum(ex, y);
    116    mpz_ptr b1 = (mpz_ptr) unBox(y);
    117    x = cdr(x);
    118    y = EVAL(car(x));
    119    NeedNum(ex, y);
    120    mpz_ptr b2 = (mpz_ptr) unBox(y);
    121    mpz_init_set(b1, b2);
    122    return Nil;
    123 }
    124 
    125 any cfun_mpz_init_set_ui(any ex) {
    126    any x = ex, y;
    127    x = cdr(x);
    128    y = EVAL(car(x));
    129    NeedNum(ex, y);
    130    mpz_ptr b1 = (mpz_ptr) unBox(y);
    131    x = cdr(x);
    132    y = EVAL(car(x));
    133    NeedNum(ex, y);
    134    ulong b2 = (ulong) unBox(y);
    135    mpz_init_set_ui(b1, b2);
    136    return Nil;
    137 }
    138 
    139 any cfun_mpz_init_set_si(any ex) {
    140    any x = ex, y;
    141    x = cdr(x);
    142    y = EVAL(car(x));
    143    NeedNum(ex, y);
    144    mpz_ptr b1 = (mpz_ptr) unBox(y);
    145    x = cdr(x);
    146    y = EVAL(car(x));
    147    NeedNum(ex, y);
    148    long b2 = (long) unBox(y);
    149    mpz_init_set_si(b1, b2);
    150    return Nil;
    151 }
    152 
    153 any cfun_mpz_get_ui(any ex) {
    154    any x = ex, y;
    155    x = cdr(x);
    156    y = EVAL(car(x));
    157    NeedNum(ex, y);
    158    mpz_ptr b1 = (mpz_ptr) unBox(y);
    159    ulong z = mpz_get_ui(b1);
    160    return box(z);
    161 }
    162 
    163 any cfun_mpz_get_si(any ex) {
    164    any x = ex, y;
    165    x = cdr(x);
    166    y = EVAL(car(x));
    167    NeedNum(ex, y);
    168    mpz_ptr b1 = (mpz_ptr) unBox(y);
    169    long z = mpz_get_si(b1);
    170    return box(z);
    171 }
    172 
    173 any cfun_mpz_add(any ex) {
    174    any x = ex, y;
    175    x = cdr(x);
    176    y = EVAL(car(x));
    177    NeedNum(ex, y);
    178    mpz_ptr b1 = (mpz_ptr) unBox(y);
    179    x = cdr(x);
    180    y = EVAL(car(x));
    181    NeedNum(ex, y);
    182    mpz_ptr b2 = (mpz_ptr) unBox(y);
    183    x = cdr(x);
    184    y = EVAL(car(x));
    185    NeedNum(ex, y);
    186    mpz_ptr b3 = (mpz_ptr) unBox(y);
    187    mpz_add(b1, b2, b3);
    188    return Nil;
    189 }
    190 
    191 any cfun_mpz_add_ui(any ex) {
    192    any x = ex, y;
    193    x = cdr(x);
    194    y = EVAL(car(x));
    195    NeedNum(ex, y);
    196    mpz_ptr b1 = (mpz_ptr) unBox(y);
    197    x = cdr(x);
    198    y = EVAL(car(x));
    199    NeedNum(ex, y);
    200    mpz_ptr b2 = (mpz_ptr) unBox(y);
    201    x = cdr(x);
    202    y = EVAL(car(x));
    203    NeedNum(ex, y);
    204    ulong b3 = (ulong) unBox(y);
    205    mpz_add_ui(b1, b2, b3);
    206    return Nil;
    207 }
    208 
    209 any cfun_mpz_sub(any ex) {
    210    any x = ex, y;
    211    x = cdr(x);
    212    y = EVAL(car(x));
    213    NeedNum(ex, y);
    214    mpz_ptr b1 = (mpz_ptr) unBox(y);
    215    x = cdr(x);
    216    y = EVAL(car(x));
    217    NeedNum(ex, y);
    218    mpz_ptr b2 = (mpz_ptr) unBox(y);
    219    x = cdr(x);
    220    y = EVAL(car(x));
    221    NeedNum(ex, y);
    222    mpz_ptr b3 = (mpz_ptr) unBox(y);
    223    mpz_sub(b1, b2, b3);
    224    return Nil;
    225 }
    226 
    227 any cfun_mpz_sub_ui(any ex) {
    228    any x = ex, y;
    229    x = cdr(x);
    230    y = EVAL(car(x));
    231    NeedNum(ex, y);
    232    mpz_ptr b1 = (mpz_ptr) unBox(y);
    233    x = cdr(x);
    234    y = EVAL(car(x));
    235    NeedNum(ex, y);
    236    mpz_ptr b2 = (mpz_ptr) unBox(y);
    237    x = cdr(x);
    238    y = EVAL(car(x));
    239    NeedNum(ex, y);
    240    ulong b3 = (ulong) unBox(y);
    241    mpz_sub_ui(b1, b2, b3);
    242    return Nil;
    243 }
    244 
    245 any cfun_mpz_ui_sub(any ex) {
    246    any x = ex, y;
    247    x = cdr(x);
    248    y = EVAL(car(x));
    249    NeedNum(ex, y);
    250    mpz_ptr b1 = (mpz_ptr) unBox(y);
    251    x = cdr(x);
    252    y = EVAL(car(x));
    253    NeedNum(ex, y);
    254    ulong b2 = (ulong) unBox(y);
    255    x = cdr(x);
    256    y = EVAL(car(x));
    257    NeedNum(ex, y);
    258    mpz_ptr b3 = (mpz_ptr) unBox(y);
    259    mpz_ui_sub(b1, b2, b3);
    260    return Nil;
    261 }
    262 
    263 any cfun_mpz_mul(any ex) {
    264    any x = ex, y;
    265    x = cdr(x);
    266    y = EVAL(car(x));
    267    NeedNum(ex, y);
    268    mpz_ptr b1 = (mpz_ptr) unBox(y);
    269    x = cdr(x);
    270    y = EVAL(car(x));
    271    NeedNum(ex, y);
    272    mpz_ptr b2 = (mpz_ptr) unBox(y);
    273    x = cdr(x);
    274    y = EVAL(car(x));
    275    NeedNum(ex, y);
    276    mpz_ptr b3 = (mpz_ptr) unBox(y);
    277    mpz_mul(b1, b2, b3);
    278    return Nil;
    279 }
    280 
    281 any cfun_mpz_mul_si(any ex) {
    282    any x = ex, y;
    283    x = cdr(x);
    284    y = EVAL(car(x));
    285    NeedNum(ex, y);
    286    mpz_ptr b1 = (mpz_ptr) unBox(y);
    287    x = cdr(x);
    288    y = EVAL(car(x));
    289    NeedNum(ex, y);
    290    mpz_ptr b2 = (mpz_ptr) unBox(y);
    291    x = cdr(x);
    292    y = EVAL(car(x));
    293    NeedNum(ex, y);
    294    long b3 = (long) unBox(y);
    295    mpz_mul_si(b1, b2, b3);
    296    return Nil;
    297 }
    298 
    299 any cfun_mpz_mul_ui(any ex) {
    300    any x = ex, y;
    301    x = cdr(x);
    302    y = EVAL(car(x));
    303    NeedNum(ex, y);
    304    mpz_ptr b1 = (mpz_ptr) unBox(y);
    305    x = cdr(x);
    306    y = EVAL(car(x));
    307    NeedNum(ex, y);
    308    mpz_ptr b2 = (mpz_ptr) unBox(y);
    309    x = cdr(x);
    310    y = EVAL(car(x));
    311    NeedNum(ex, y);
    312    ulong b3 = (ulong) unBox(y);
    313    mpz_mul_ui(b1, b2, b3);
    314    return Nil;
    315 }
    316 
    317 any cfun_mpz_addmul(any ex) {
    318    any x = ex, y;
    319    x = cdr(x);
    320    y = EVAL(car(x));
    321    NeedNum(ex, y);
    322    mpz_ptr b1 = (mpz_ptr) unBox(y);
    323    x = cdr(x);
    324    y = EVAL(car(x));
    325    NeedNum(ex, y);
    326    mpz_ptr b2 = (mpz_ptr) unBox(y);
    327    x = cdr(x);
    328    y = EVAL(car(x));
    329    NeedNum(ex, y);
    330    mpz_ptr b3 = (mpz_ptr) unBox(y);
    331    mpz_addmul(b1, b2, b3);
    332    return Nil;
    333 }
    334 
    335 any cfun_mpz_addmul_ui(any ex) {
    336    any x = ex, y;
    337    x = cdr(x);
    338    y = EVAL(car(x));
    339    NeedNum(ex, y);
    340    mpz_ptr b1 = (mpz_ptr) unBox(y);
    341    x = cdr(x);
    342    y = EVAL(car(x));
    343    NeedNum(ex, y);
    344    mpz_ptr b2 = (mpz_ptr) unBox(y);
    345    x = cdr(x);
    346    y = EVAL(car(x));
    347    NeedNum(ex, y);
    348    ulong b3 = (ulong) unBox(y);
    349    mpz_addmul_ui(b1, b2, b3);
    350    return Nil;
    351 }
    352 
    353 any cfun_mpz_submul(any ex) {
    354    any x = ex, y;
    355    x = cdr(x);
    356    y = EVAL(car(x));
    357    NeedNum(ex, y);
    358    mpz_ptr b1 = (mpz_ptr) unBox(y);
    359    x = cdr(x);
    360    y = EVAL(car(x));
    361    NeedNum(ex, y);
    362    mpz_ptr b2 = (mpz_ptr) unBox(y);
    363    x = cdr(x);
    364    y = EVAL(car(x));
    365    NeedNum(ex, y);
    366    mpz_ptr b3 = (mpz_ptr) unBox(y);
    367    mpz_submul(b1, b2, b3);
    368    return Nil;
    369 }
    370 
    371 any cfun_mpz_submul_ui(any ex) {
    372    any x = ex, y;
    373    x = cdr(x);
    374    y = EVAL(car(x));
    375    NeedNum(ex, y);
    376    mpz_ptr b1 = (mpz_ptr) unBox(y);
    377    x = cdr(x);
    378    y = EVAL(car(x));
    379    NeedNum(ex, y);
    380    mpz_ptr b2 = (mpz_ptr) unBox(y);
    381    x = cdr(x);
    382    y = EVAL(car(x));
    383    NeedNum(ex, y);
    384    ulong b3 = (ulong) unBox(y);
    385    mpz_submul_ui(b1, b2, b3);
    386    return Nil;
    387 }
    388 
    389 any cfun_mpz_mul_2exp(any ex) {
    390    any x = ex, y;
    391    x = cdr(x);
    392    y = EVAL(car(x));
    393    NeedNum(ex, y);
    394    mpz_ptr b1 = (mpz_ptr) unBox(y);
    395    x = cdr(x);
    396    y = EVAL(car(x));
    397    NeedNum(ex, y);
    398    mpz_ptr b2 = (mpz_ptr) unBox(y);
    399    x = cdr(x);
    400    y = EVAL(car(x));
    401    NeedNum(ex, y);
    402    ulong b3 = (ulong) unBox(y);
    403    mpz_mul_2exp(b1, b2, b3);
    404    return Nil;
    405 }
    406 
    407 any cfun_mpz_neg(any ex) {
    408    any x = ex, y;
    409    x = cdr(x);
    410    y = EVAL(car(x));
    411    NeedNum(ex, y);
    412    mpz_ptr b1 = (mpz_ptr) unBox(y);
    413    x = cdr(x);
    414    y = EVAL(car(x));
    415    NeedNum(ex, y);
    416    mpz_ptr b2 = (mpz_ptr) unBox(y);
    417    mpz_neg(b1, b2);
    418    return Nil;
    419 }
    420 
    421 any cfun_mpz_abs(any ex) {
    422    any x = ex, y;
    423    x = cdr(x);
    424    y = EVAL(car(x));
    425    NeedNum(ex, y);
    426    mpz_ptr b1 = (mpz_ptr) unBox(y);
    427    x = cdr(x);
    428    y = EVAL(car(x));
    429    NeedNum(ex, y);
    430    mpz_ptr b2 = (mpz_ptr) unBox(y);
    431    mpz_abs(b1, b2);
    432    return Nil;
    433 }
    434 
    435 any cfun_mpz_cdiv_r(any ex) {
    436    any x = ex, y;
    437    x = cdr(x);
    438    y = EVAL(car(x));
    439    NeedNum(ex, y);
    440    mpz_ptr b1 = (mpz_ptr) unBox(y);
    441    x = cdr(x);
    442    y = EVAL(car(x));
    443    NeedNum(ex, y);
    444    mpz_ptr b2 = (mpz_ptr) unBox(y);
    445    x = cdr(x);
    446    y = EVAL(car(x));
    447    NeedNum(ex, y);
    448    mpz_ptr b3 = (mpz_ptr) unBox(y);
    449    mpz_cdiv_r(b1, b2, b3);
    450    return Nil;
    451 }
    452 
    453 any cfun_mpz_cdiv_qr(any ex) {
    454    any x = ex, y;
    455    x = cdr(x);
    456    y = EVAL(car(x));
    457    NeedNum(ex, y);
    458    mpz_ptr b1 = (mpz_ptr) unBox(y);
    459    x = cdr(x);
    460    y = EVAL(car(x));
    461    NeedNum(ex, y);
    462    mpz_ptr b2 = (mpz_ptr) unBox(y);
    463    x = cdr(x);
    464    y = EVAL(car(x));
    465    NeedNum(ex, y);
    466    mpz_ptr b3 = (mpz_ptr) unBox(y);
    467    x = cdr(x);
    468    y = EVAL(car(x));
    469    NeedNum(ex, y);
    470    mpz_ptr b4 = (mpz_ptr) unBox(y);
    471    mpz_cdiv_qr(b1, b2, b3, b4);
    472    return Nil;
    473 }
    474 
    475 any cfun_mpz_cdiv_q_ui(any ex) {
    476    any x = ex, y;
    477    x = cdr(x);
    478    y = EVAL(car(x));
    479    NeedNum(ex, y);
    480    mpz_ptr b1 = (mpz_ptr) unBox(y);
    481    x = cdr(x);
    482    y = EVAL(car(x));
    483    NeedNum(ex, y);
    484    mpz_ptr b2 = (mpz_ptr) unBox(y);
    485    x = cdr(x);
    486    y = EVAL(car(x));
    487    NeedNum(ex, y);
    488    ulong b3 = (ulong) unBox(y);
    489    ulong z = mpz_cdiv_q_ui(b1, b2, b3);
    490    return box(z);
    491 }
    492 
    493 any cfun_mpz_cdiv_r_ui(any ex) {
    494    any x = ex, y;
    495    x = cdr(x);
    496    y = EVAL(car(x));
    497    NeedNum(ex, y);
    498    mpz_ptr b1 = (mpz_ptr) unBox(y);
    499    x = cdr(x);
    500    y = EVAL(car(x));
    501    NeedNum(ex, y);
    502    mpz_ptr b2 = (mpz_ptr) unBox(y);
    503    x = cdr(x);
    504    y = EVAL(car(x));
    505    NeedNum(ex, y);
    506    ulong b3 = (ulong) unBox(y);
    507    ulong z = mpz_cdiv_r_ui(b1, b2, b3);
    508    return box(z);
    509 }
    510 
    511 any cfun_mpz_cdiv_qr_ui(any ex) {
    512    any x = ex, y;
    513    x = cdr(x);
    514    y = EVAL(car(x));
    515    NeedNum(ex, y);
    516    mpz_ptr b1 = (mpz_ptr) unBox(y);
    517    x = cdr(x);
    518    y = EVAL(car(x));
    519    NeedNum(ex, y);
    520    mpz_ptr b2 = (mpz_ptr) unBox(y);
    521    x = cdr(x);
    522    y = EVAL(car(x));
    523    NeedNum(ex, y);
    524    mpz_ptr b3 = (mpz_ptr) unBox(y);
    525    x = cdr(x);
    526    y = EVAL(car(x));
    527    NeedNum(ex, y);
    528    ulong b4 = (ulong) unBox(y);
    529    ulong z = mpz_cdiv_qr_ui(b1, b2, b3, b4);
    530    return box(z);
    531 }
    532 
    533 any cfun_mpz_cdiv_ui(any ex) {
    534    any x = ex, y;
    535    x = cdr(x);
    536    y = EVAL(car(x));
    537    NeedNum(ex, y);
    538    mpz_ptr b1 = (mpz_ptr) unBox(y);
    539    x = cdr(x);
    540    y = EVAL(car(x));
    541    NeedNum(ex, y);
    542    ulong b2 = (ulong) unBox(y);
    543    ulong z = mpz_cdiv_ui(b1, b2);
    544    return box(z);
    545 }
    546 
    547 any cfun_mpz_cdiv_q_2exp(any ex) {
    548    any x = ex, y;
    549    x = cdr(x);
    550    y = EVAL(car(x));
    551    NeedNum(ex, y);
    552    mpz_ptr b1 = (mpz_ptr) unBox(y);
    553    x = cdr(x);
    554    y = EVAL(car(x));
    555    NeedNum(ex, y);
    556    mpz_ptr b2 = (mpz_ptr) unBox(y);
    557    x = cdr(x);
    558    y = EVAL(car(x));
    559    NeedNum(ex, y);
    560    ulong b3 = (ulong) unBox(y);
    561    mpz_cdiv_q_2exp(b1, b2, b3);
    562    return Nil;
    563 }
    564 
    565 any cfun_mpz_cdiv_r_2exp(any ex) {
    566    any x = ex, y;
    567    x = cdr(x);
    568    y = EVAL(car(x));
    569    NeedNum(ex, y);
    570    mpz_ptr b1 = (mpz_ptr) unBox(y);
    571    x = cdr(x);
    572    y = EVAL(car(x));
    573    NeedNum(ex, y);
    574    mpz_ptr b2 = (mpz_ptr) unBox(y);
    575    x = cdr(x);
    576    y = EVAL(car(x));
    577    NeedNum(ex, y);
    578    ulong b3 = (ulong) unBox(y);
    579    mpz_cdiv_r_2exp(b1, b2, b3);
    580    return Nil;
    581 }
    582 
    583 any cfun_mpz_fdiv_q(any ex) {
    584    any x = ex, y;
    585    x = cdr(x);
    586    y = EVAL(car(x));
    587    NeedNum(ex, y);
    588    mpz_ptr b1 = (mpz_ptr) unBox(y);
    589    x = cdr(x);
    590    y = EVAL(car(x));
    591    NeedNum(ex, y);
    592    mpz_ptr b2 = (mpz_ptr) unBox(y);
    593    x = cdr(x);
    594    y = EVAL(car(x));
    595    NeedNum(ex, y);
    596    mpz_ptr b3 = (mpz_ptr) unBox(y);
    597    mpz_fdiv_q(b1, b2, b3);
    598    return Nil;
    599 }
    600 
    601 any cfun_mpz_fdiv_r(any ex) {
    602    any x = ex, y;
    603    x = cdr(x);
    604    y = EVAL(car(x));
    605    NeedNum(ex, y);
    606    mpz_ptr b1 = (mpz_ptr) unBox(y);
    607    x = cdr(x);
    608    y = EVAL(car(x));
    609    NeedNum(ex, y);
    610    mpz_ptr b2 = (mpz_ptr) unBox(y);
    611    x = cdr(x);
    612    y = EVAL(car(x));
    613    NeedNum(ex, y);
    614    mpz_ptr b3 = (mpz_ptr) unBox(y);
    615    mpz_fdiv_r(b1, b2, b3);
    616    return Nil;
    617 }
    618 
    619 any cfun_mpz_fdiv_qr(any ex) {
    620    any x = ex, y;
    621    x = cdr(x);
    622    y = EVAL(car(x));
    623    NeedNum(ex, y);
    624    mpz_ptr b1 = (mpz_ptr) unBox(y);
    625    x = cdr(x);
    626    y = EVAL(car(x));
    627    NeedNum(ex, y);
    628    mpz_ptr b2 = (mpz_ptr) unBox(y);
    629    x = cdr(x);
    630    y = EVAL(car(x));
    631    NeedNum(ex, y);
    632    mpz_ptr b3 = (mpz_ptr) unBox(y);
    633    x = cdr(x);
    634    y = EVAL(car(x));
    635    NeedNum(ex, y);
    636    mpz_ptr b4 = (mpz_ptr) unBox(y);
    637    mpz_fdiv_qr(b1, b2, b3, b4);
    638    return Nil;
    639 }
    640 
    641 any cfun_mpz_fdiv_q_ui(any ex) {
    642    any x = ex, y;
    643    x = cdr(x);
    644    y = EVAL(car(x));
    645    NeedNum(ex, y);
    646    mpz_ptr b1 = (mpz_ptr) unBox(y);
    647    x = cdr(x);
    648    y = EVAL(car(x));
    649    NeedNum(ex, y);
    650    mpz_ptr b2 = (mpz_ptr) unBox(y);
    651    x = cdr(x);
    652    y = EVAL(car(x));
    653    NeedNum(ex, y);
    654    ulong b3 = (ulong) unBox(y);
    655    ulong z = mpz_fdiv_q_ui(b1, b2, b3);
    656    return box(z);
    657 }
    658 
    659 any cfun_mpz_fdiv_r_ui(any ex) {
    660    any x = ex, y;
    661    x = cdr(x);
    662    y = EVAL(car(x));
    663    NeedNum(ex, y);
    664    mpz_ptr b1 = (mpz_ptr) unBox(y);
    665    x = cdr(x);
    666    y = EVAL(car(x));
    667    NeedNum(ex, y);
    668    mpz_ptr b2 = (mpz_ptr) unBox(y);
    669    x = cdr(x);
    670    y = EVAL(car(x));
    671    NeedNum(ex, y);
    672    ulong b3 = (ulong) unBox(y);
    673    ulong z = mpz_fdiv_r_ui(b1, b2, b3);
    674    return box(z);
    675 }
    676 
    677 any cfun_mpz_fdiv_qr_ui(any ex) {
    678    any x = ex, y;
    679    x = cdr(x);
    680    y = EVAL(car(x));
    681    NeedNum(ex, y);
    682    mpz_ptr b1 = (mpz_ptr) unBox(y);
    683    x = cdr(x);
    684    y = EVAL(car(x));
    685    NeedNum(ex, y);
    686    mpz_ptr b2 = (mpz_ptr) unBox(y);
    687    x = cdr(x);
    688    y = EVAL(car(x));
    689    NeedNum(ex, y);
    690    mpz_ptr b3 = (mpz_ptr) unBox(y);
    691    x = cdr(x);
    692    y = EVAL(car(x));
    693    NeedNum(ex, y);
    694    ulong b4 = (ulong) unBox(y);
    695    ulong z = mpz_fdiv_qr_ui(b1, b2, b3, b4);
    696    return box(z);
    697 }
    698 
    699 any cfun_mpz_fdiv_ui(any ex) {
    700    any x = ex, y;
    701    x = cdr(x);
    702    y = EVAL(car(x));
    703    NeedNum(ex, y);
    704    mpz_ptr b1 = (mpz_ptr) unBox(y);
    705    x = cdr(x);
    706    y = EVAL(car(x));
    707    NeedNum(ex, y);
    708    ulong b2 = (ulong) unBox(y);
    709    ulong z = mpz_fdiv_ui(b1, b2);
    710    return box(z);
    711 }
    712 
    713 any cfun_mpz_fdiv_q_2exp(any ex) {
    714    any x = ex, y;
    715    x = cdr(x);
    716    y = EVAL(car(x));
    717    NeedNum(ex, y);
    718    mpz_ptr b1 = (mpz_ptr) unBox(y);
    719    x = cdr(x);
    720    y = EVAL(car(x));
    721    NeedNum(ex, y);
    722    mpz_ptr b2 = (mpz_ptr) unBox(y);
    723    x = cdr(x);
    724    y = EVAL(car(x));
    725    NeedNum(ex, y);
    726    ulong b3 = (ulong) unBox(y);
    727    mpz_fdiv_q_2exp(b1, b2, b3);
    728    return Nil;
    729 }
    730 
    731 any cfun_mpz_fdiv_r_2exp(any ex) {
    732    any x = ex, y;
    733    x = cdr(x);
    734    y = EVAL(car(x));
    735    NeedNum(ex, y);
    736    mpz_ptr b1 = (mpz_ptr) unBox(y);
    737    x = cdr(x);
    738    y = EVAL(car(x));
    739    NeedNum(ex, y);
    740    mpz_ptr b2 = (mpz_ptr) unBox(y);
    741    x = cdr(x);
    742    y = EVAL(car(x));
    743    NeedNum(ex, y);
    744    ulong b3 = (ulong) unBox(y);
    745    mpz_fdiv_r_2exp(b1, b2, b3);
    746    return Nil;
    747 }
    748 
    749 any cfun_mpz_tdiv_q(any ex) {
    750    any x = ex, y;
    751    x = cdr(x);
    752    y = EVAL(car(x));
    753    NeedNum(ex, y);
    754    mpz_ptr b1 = (mpz_ptr) unBox(y);
    755    x = cdr(x);
    756    y = EVAL(car(x));
    757    NeedNum(ex, y);
    758    mpz_ptr b2 = (mpz_ptr) unBox(y);
    759    x = cdr(x);
    760    y = EVAL(car(x));
    761    NeedNum(ex, y);
    762    mpz_ptr b3 = (mpz_ptr) unBox(y);
    763    mpz_tdiv_q(b1, b2, b3);
    764    return Nil;
    765 }
    766 
    767 any cfun_mpz_tdiv_r(any ex) {
    768    any x = ex, y;
    769    x = cdr(x);
    770    y = EVAL(car(x));
    771    NeedNum(ex, y);
    772    mpz_ptr b1 = (mpz_ptr) unBox(y);
    773    x = cdr(x);
    774    y = EVAL(car(x));
    775    NeedNum(ex, y);
    776    mpz_ptr b2 = (mpz_ptr) unBox(y);
    777    x = cdr(x);
    778    y = EVAL(car(x));
    779    NeedNum(ex, y);
    780    mpz_ptr b3 = (mpz_ptr) unBox(y);
    781    mpz_tdiv_r(b1, b2, b3);
    782    return Nil;
    783 }
    784 
    785 any cfun_mpz_tdiv_qr(any ex) {
    786    any x = ex, y;
    787    x = cdr(x);
    788    y = EVAL(car(x));
    789    NeedNum(ex, y);
    790    mpz_ptr b1 = (mpz_ptr) unBox(y);
    791    x = cdr(x);
    792    y = EVAL(car(x));
    793    NeedNum(ex, y);
    794    mpz_ptr b2 = (mpz_ptr) unBox(y);
    795    x = cdr(x);
    796    y = EVAL(car(x));
    797    NeedNum(ex, y);
    798    mpz_ptr b3 = (mpz_ptr) unBox(y);
    799    x = cdr(x);
    800    y = EVAL(car(x));
    801    NeedNum(ex, y);
    802    mpz_ptr b4 = (mpz_ptr) unBox(y);
    803    mpz_tdiv_qr(b1, b2, b3, b4);
    804    return Nil;
    805 }
    806 
    807 any cfun_mpz_tdiv_q_ui(any ex) {
    808    any x = ex, y;
    809    x = cdr(x);
    810    y = EVAL(car(x));
    811    NeedNum(ex, y);
    812    mpz_ptr b1 = (mpz_ptr) unBox(y);
    813    x = cdr(x);
    814    y = EVAL(car(x));
    815    NeedNum(ex, y);
    816    mpz_ptr b2 = (mpz_ptr) unBox(y);
    817    x = cdr(x);
    818    y = EVAL(car(x));
    819    NeedNum(ex, y);
    820    ulong b3 = (ulong) unBox(y);
    821    ulong z = mpz_tdiv_q_ui(b1, b2, b3);
    822    return box(z);
    823 }
    824 
    825 any cfun_mpz_tdiv_r_ui(any ex) {
    826    any x = ex, y;
    827    x = cdr(x);
    828    y = EVAL(car(x));
    829    NeedNum(ex, y);
    830    mpz_ptr b1 = (mpz_ptr) unBox(y);
    831    x = cdr(x);
    832    y = EVAL(car(x));
    833    NeedNum(ex, y);
    834    mpz_ptr b2 = (mpz_ptr) unBox(y);
    835    x = cdr(x);
    836    y = EVAL(car(x));
    837    NeedNum(ex, y);
    838    ulong b3 = (ulong) unBox(y);
    839    ulong z = mpz_tdiv_r_ui(b1, b2, b3);
    840    return box(z);
    841 }
    842 
    843 any cfun_mpz_tdiv_qr_ui(any ex) {
    844    any x = ex, y;
    845    x = cdr(x);
    846    y = EVAL(car(x));
    847    NeedNum(ex, y);
    848    mpz_ptr b1 = (mpz_ptr) unBox(y);
    849    x = cdr(x);
    850    y = EVAL(car(x));
    851    NeedNum(ex, y);
    852    mpz_ptr b2 = (mpz_ptr) unBox(y);
    853    x = cdr(x);
    854    y = EVAL(car(x));
    855    NeedNum(ex, y);
    856    mpz_ptr b3 = (mpz_ptr) unBox(y);
    857    x = cdr(x);
    858    y = EVAL(car(x));
    859    NeedNum(ex, y);
    860    ulong b4 = (ulong) unBox(y);
    861    ulong z = mpz_tdiv_qr_ui(b1, b2, b3, b4);
    862    return box(z);
    863 }
    864 
    865 any cfun_mpz_tdiv_ui(any ex) {
    866    any x = ex, y;
    867    x = cdr(x);
    868    y = EVAL(car(x));
    869    NeedNum(ex, y);
    870    mpz_ptr b1 = (mpz_ptr) unBox(y);
    871    x = cdr(x);
    872    y = EVAL(car(x));
    873    NeedNum(ex, y);
    874    ulong b2 = (ulong) unBox(y);
    875    ulong z = mpz_tdiv_ui(b1, b2);
    876    return box(z);
    877 }
    878 
    879 any cfun_mpz_tdiv_q_2exp(any ex) {
    880    any x = ex, y;
    881    x = cdr(x);
    882    y = EVAL(car(x));
    883    NeedNum(ex, y);
    884    mpz_ptr b1 = (mpz_ptr) unBox(y);
    885    x = cdr(x);
    886    y = EVAL(car(x));
    887    NeedNum(ex, y);
    888    mpz_ptr b2 = (mpz_ptr) unBox(y);
    889    x = cdr(x);
    890    y = EVAL(car(x));
    891    NeedNum(ex, y);
    892    ulong b3 = (ulong) unBox(y);
    893    mpz_tdiv_q_2exp(b1, b2, b3);
    894    return Nil;
    895 }
    896 
    897 any cfun_mpz_tdiv_r_2exp(any ex) {
    898    any x = ex, y;
    899    x = cdr(x);
    900    y = EVAL(car(x));
    901    NeedNum(ex, y);
    902    mpz_ptr b1 = (mpz_ptr) unBox(y);
    903    x = cdr(x);
    904    y = EVAL(car(x));
    905    NeedNum(ex, y);
    906    mpz_ptr b2 = (mpz_ptr) unBox(y);
    907    x = cdr(x);
    908    y = EVAL(car(x));
    909    NeedNum(ex, y);
    910    ulong b3 = (ulong) unBox(y);
    911    mpz_tdiv_r_2exp(b1, b2, b3);
    912    return Nil;
    913 }
    914 
    915 any cfun_mpz_mod(any ex) {
    916    any x = ex, y;
    917    x = cdr(x);
    918    y = EVAL(car(x));
    919    NeedNum(ex, y);
    920    mpz_ptr b1 = (mpz_ptr) unBox(y);
    921    x = cdr(x);
    922    y = EVAL(car(x));
    923    NeedNum(ex, y);
    924    mpz_ptr b2 = (mpz_ptr) unBox(y);
    925    x = cdr(x);
    926    y = EVAL(car(x));
    927    NeedNum(ex, y);
    928    mpz_ptr b3 = (mpz_ptr) unBox(y);
    929    mpz_mod(b1, b2, b3);
    930    return Nil;
    931 }
    932 
    933 any cfun_mpz_mod_ui(any ex) {
    934    any x = ex, y;
    935    x = cdr(x);
    936    y = EVAL(car(x));
    937    NeedNum(ex, y);
    938    mpz_ptr b1 = (mpz_ptr) unBox(y);
    939    x = cdr(x);
    940    y = EVAL(car(x));
    941    NeedNum(ex, y);
    942    mpz_ptr b2 = (mpz_ptr) unBox(y);
    943    x = cdr(x);
    944    y = EVAL(car(x));
    945    NeedNum(ex, y);
    946    ulong b3 = (ulong) unBox(y);
    947    ulong z = mpz_mod_ui(b1, b2, b3);
    948    return box(z);
    949 }
    950 
    951 any cfun_mpz_divexact(any ex) {
    952    any x = ex, y;
    953    x = cdr(x);
    954    y = EVAL(car(x));
    955    NeedNum(ex, y);
    956    mpz_ptr b1 = (mpz_ptr) unBox(y);
    957    x = cdr(x);
    958    y = EVAL(car(x));
    959    NeedNum(ex, y);
    960    mpz_ptr b2 = (mpz_ptr) unBox(y);
    961    x = cdr(x);
    962    y = EVAL(car(x));
    963    NeedNum(ex, y);
    964    mpz_ptr b3 = (mpz_ptr) unBox(y);
    965    mpz_divexact(b1, b2, b3);
    966    return Nil;
    967 }
    968 
    969 any cfun_mpz_divexact_ui(any ex) {
    970    any x = ex, y;
    971    x = cdr(x);
    972    y = EVAL(car(x));
    973    NeedNum(ex, y);
    974    mpz_ptr b1 = (mpz_ptr) unBox(y);
    975    x = cdr(x);
    976    y = EVAL(car(x));
    977    NeedNum(ex, y);
    978    mpz_ptr b2 = (mpz_ptr) unBox(y);
    979    x = cdr(x);
    980    y = EVAL(car(x));
    981    NeedNum(ex, y);
    982    ulong b3 = (ulong) unBox(y);
    983    mpz_divexact_ui(b1, b2, b3);
    984    return Nil;
    985 }
    986 
    987 any cfun_mpz_divisible_p(any ex) {
    988    any x = ex, y;
    989    x = cdr(x);
    990    y = EVAL(car(x));
    991    NeedNum(ex, y);
    992    mpz_ptr b1 = (mpz_ptr) unBox(y);
    993    x = cdr(x);
    994    y = EVAL(car(x));
    995    NeedNum(ex, y);
    996    mpz_ptr b2 = (mpz_ptr) unBox(y);
    997    int z = mpz_divisible_p(b1, b2);
    998    return box(z);
    999 }
   1000 
   1001 any cfun_mpz_divisible_ui_p(any ex) {
   1002    any x = ex, y;
   1003    x = cdr(x);
   1004    y = EVAL(car(x));
   1005    NeedNum(ex, y);
   1006    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1007    x = cdr(x);
   1008    y = EVAL(car(x));
   1009    NeedNum(ex, y);
   1010    ulong b2 = (ulong) unBox(y);
   1011    int z = mpz_divisible_ui_p(b1, b2);
   1012    return box(z);
   1013 }
   1014 
   1015 any cfun_mpz_divisible_2exp_p(any ex) {
   1016    any x = ex, y;
   1017    x = cdr(x);
   1018    y = EVAL(car(x));
   1019    NeedNum(ex, y);
   1020    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1021    x = cdr(x);
   1022    y = EVAL(car(x));
   1023    NeedNum(ex, y);
   1024    ulong b2 = (ulong) unBox(y);
   1025    int z = mpz_divisible_2exp_p(b1, b2);
   1026    return box(z);
   1027 }
   1028 
   1029 any cfun_mpz_congruent_p(any ex) {
   1030    any x = ex, y;
   1031    x = cdr(x);
   1032    y = EVAL(car(x));
   1033    NeedNum(ex, y);
   1034    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1035    x = cdr(x);
   1036    y = EVAL(car(x));
   1037    NeedNum(ex, y);
   1038    mpz_ptr b2 = (mpz_ptr) unBox(y);
   1039    x = cdr(x);
   1040    y = EVAL(car(x));
   1041    NeedNum(ex, y);
   1042    mpz_ptr b3 = (mpz_ptr) unBox(y);
   1043    int z = mpz_congruent_p(b1, b2, b3);
   1044    return box(z);
   1045 }
   1046 
   1047 any cfun_mpz_congruent_ui_p(any ex) {
   1048    any x = ex, y;
   1049    x = cdr(x);
   1050    y = EVAL(car(x));
   1051    NeedNum(ex, y);
   1052    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1053    x = cdr(x);
   1054    y = EVAL(car(x));
   1055    NeedNum(ex, y);
   1056    ulong b2 = (ulong) unBox(y);
   1057    x = cdr(x);
   1058    y = EVAL(car(x));
   1059    NeedNum(ex, y);
   1060    ulong b3 = (ulong) unBox(y);
   1061    int z = mpz_congruent_ui_p(b1, b2, b3);
   1062    return box(z);
   1063 }
   1064 
   1065 any cfun_mpz_congruent_2exp_p(any ex) {
   1066    any x = ex, y;
   1067    x = cdr(x);
   1068    y = EVAL(car(x));
   1069    NeedNum(ex, y);
   1070    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1071    x = cdr(x);
   1072    y = EVAL(car(x));
   1073    NeedNum(ex, y);
   1074    mpz_ptr b2 = (mpz_ptr) unBox(y);
   1075    x = cdr(x);
   1076    y = EVAL(car(x));
   1077    NeedNum(ex, y);
   1078    ulong b3 = (ulong) unBox(y);
   1079    int z = mpz_congruent_2exp_p(b1, b2, b3);
   1080    return box(z);
   1081 }
   1082 
   1083 any cfun_mpz_powm(any ex) {
   1084    any x = ex, y;
   1085    x = cdr(x);
   1086    y = EVAL(car(x));
   1087    NeedNum(ex, y);
   1088    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1089    x = cdr(x);
   1090    y = EVAL(car(x));
   1091    NeedNum(ex, y);
   1092    mpz_ptr b2 = (mpz_ptr) unBox(y);
   1093    x = cdr(x);
   1094    y = EVAL(car(x));
   1095    NeedNum(ex, y);
   1096    mpz_ptr b3 = (mpz_ptr) unBox(y);
   1097    x = cdr(x);
   1098    y = EVAL(car(x));
   1099    NeedNum(ex, y);
   1100    mpz_ptr b4 = (mpz_ptr) unBox(y);
   1101    mpz_powm(b1, b2, b3, b4);
   1102    return Nil;
   1103 }
   1104 
   1105 any cfun_mpz_powm_ui(any ex) {
   1106    any x = ex, y;
   1107    x = cdr(x);
   1108    y = EVAL(car(x));
   1109    NeedNum(ex, y);
   1110    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1111    x = cdr(x);
   1112    y = EVAL(car(x));
   1113    NeedNum(ex, y);
   1114    mpz_ptr b2 = (mpz_ptr) unBox(y);
   1115    x = cdr(x);
   1116    y = EVAL(car(x));
   1117    NeedNum(ex, y);
   1118    ulong b3 = (ulong) unBox(y);
   1119    x = cdr(x);
   1120    y = EVAL(car(x));
   1121    NeedNum(ex, y);
   1122    mpz_ptr b4 = (mpz_ptr) unBox(y);
   1123    mpz_powm_ui(b1, b2, b3, b4);
   1124    return Nil;
   1125 }
   1126 
   1127 any cfun_mpz_pow_ui(any ex) {
   1128    any x = ex, y;
   1129    x = cdr(x);
   1130    y = EVAL(car(x));
   1131    NeedNum(ex, y);
   1132    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1133    x = cdr(x);
   1134    y = EVAL(car(x));
   1135    NeedNum(ex, y);
   1136    mpz_ptr b2 = (mpz_ptr) unBox(y);
   1137    x = cdr(x);
   1138    y = EVAL(car(x));
   1139    NeedNum(ex, y);
   1140    ulong b3 = (ulong) unBox(y);
   1141    mpz_pow_ui(b1, b2, b3);
   1142    return Nil;
   1143 }
   1144 
   1145 any cfun_mpz_ui_pow_ui(any ex) {
   1146    any x = ex, y;
   1147    x = cdr(x);
   1148    y = EVAL(car(x));
   1149    NeedNum(ex, y);
   1150    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1151    x = cdr(x);
   1152    y = EVAL(car(x));
   1153    NeedNum(ex, y);
   1154    ulong b2 = (ulong) unBox(y);
   1155    x = cdr(x);
   1156    y = EVAL(car(x));
   1157    NeedNum(ex, y);
   1158    ulong b3 = (ulong) unBox(y);
   1159    mpz_ui_pow_ui(b1, b2, b3);
   1160    return Nil;
   1161 }
   1162 
   1163 any cfun_mpz_root(any ex) {
   1164    any x = ex, y;
   1165    x = cdr(x);
   1166    y = EVAL(car(x));
   1167    NeedNum(ex, y);
   1168    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1169    x = cdr(x);
   1170    y = EVAL(car(x));
   1171    NeedNum(ex, y);
   1172    mpz_ptr b2 = (mpz_ptr) unBox(y);
   1173    x = cdr(x);
   1174    y = EVAL(car(x));
   1175    NeedNum(ex, y);
   1176    ulong b3 = (ulong) unBox(y);
   1177    int z = mpz_root(b1, b2, b3);
   1178    return box(z);
   1179 }
   1180 
   1181 any cfun_mpz_rootrem(any ex) {
   1182    any x = ex, y;
   1183    x = cdr(x);
   1184    y = EVAL(car(x));
   1185    NeedNum(ex, y);
   1186    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1187    x = cdr(x);
   1188    y = EVAL(car(x));
   1189    NeedNum(ex, y);
   1190    mpz_ptr b2 = (mpz_ptr) unBox(y);
   1191    x = cdr(x);
   1192    y = EVAL(car(x));
   1193    NeedNum(ex, y);
   1194    mpz_ptr b3 = (mpz_ptr) unBox(y);
   1195    x = cdr(x);
   1196    y = EVAL(car(x));
   1197    NeedNum(ex, y);
   1198    ulong b4 = (ulong) unBox(y);
   1199    mpz_rootrem(b1, b2, b3, b4);
   1200    return Nil;
   1201 }
   1202 
   1203 any cfun_mpz_sqrt(any ex) {
   1204    any x = ex, y;
   1205    x = cdr(x);
   1206    y = EVAL(car(x));
   1207    NeedNum(ex, y);
   1208    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1209    x = cdr(x);
   1210    y = EVAL(car(x));
   1211    NeedNum(ex, y);
   1212    mpz_ptr b2 = (mpz_ptr) unBox(y);
   1213    mpz_sqrt(b1, b2);
   1214    return Nil;
   1215 }
   1216 
   1217 any cfun_mpz_sqrtrem(any ex) {
   1218    any x = ex, y;
   1219    x = cdr(x);
   1220    y = EVAL(car(x));
   1221    NeedNum(ex, y);
   1222    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1223    x = cdr(x);
   1224    y = EVAL(car(x));
   1225    NeedNum(ex, y);
   1226    mpz_ptr b2 = (mpz_ptr) unBox(y);
   1227    x = cdr(x);
   1228    y = EVAL(car(x));
   1229    NeedNum(ex, y);
   1230    mpz_ptr b3 = (mpz_ptr) unBox(y);
   1231    mpz_sqrtrem(b1, b2, b3);
   1232    return Nil;
   1233 }
   1234 
   1235 any cfun_mpz_perfect_power_p(any ex) {
   1236    any x = ex, y;
   1237    x = cdr(x);
   1238    y = EVAL(car(x));
   1239    NeedNum(ex, y);
   1240    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1241    int z = mpz_perfect_power_p(b1);
   1242    return box(z);
   1243 }
   1244 
   1245 any cfun_mpz_perfect_square_p(any ex) {
   1246    any x = ex, y;
   1247    x = cdr(x);
   1248    y = EVAL(car(x));
   1249    NeedNum(ex, y);
   1250    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1251    int z = mpz_perfect_square_p(b1);
   1252    return box(z);
   1253 }
   1254 
   1255 any cfun_mpz_probab_prime_p(any ex) {
   1256    any x = ex, y;
   1257    x = cdr(x);
   1258    y = EVAL(car(x));
   1259    NeedNum(ex, y);
   1260    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1261    x = cdr(x);
   1262    y = EVAL(car(x));
   1263    NeedNum(ex, y);
   1264    int b2 = (int) unBox(y);
   1265    int z = mpz_probab_prime_p(b1, b2);
   1266    return box(z);
   1267 }
   1268 
   1269 any cfun_mpz_nextprime(any ex) {
   1270    any x = ex, y;
   1271    x = cdr(x);
   1272    y = EVAL(car(x));
   1273    NeedNum(ex, y);
   1274    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1275    x = cdr(x);
   1276    y = EVAL(car(x));
   1277    NeedNum(ex, y);
   1278    mpz_ptr b2 = (mpz_ptr) unBox(y);
   1279    mpz_nextprime(b1, b2);
   1280    return Nil;
   1281 }
   1282 
   1283 any cfun_mpz_gcd(any ex) {
   1284    any x = ex, y;
   1285    x = cdr(x);
   1286    y = EVAL(car(x));
   1287    NeedNum(ex, y);
   1288    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1289    x = cdr(x);
   1290    y = EVAL(car(x));
   1291    NeedNum(ex, y);
   1292    mpz_ptr b2 = (mpz_ptr) unBox(y);
   1293    x = cdr(x);
   1294    y = EVAL(car(x));
   1295    NeedNum(ex, y);
   1296    mpz_ptr b3 = (mpz_ptr) unBox(y);
   1297    mpz_gcd(b1, b2, b3);
   1298    return Nil;
   1299 }
   1300 
   1301 any cfun_mpz_gcd_ui(any ex) {
   1302    any x = ex, y;
   1303    x = cdr(x);
   1304    y = EVAL(car(x));
   1305    NeedNum(ex, y);
   1306    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1307    x = cdr(x);
   1308    y = EVAL(car(x));
   1309    NeedNum(ex, y);
   1310    mpz_ptr b2 = (mpz_ptr) unBox(y);
   1311    x = cdr(x);
   1312    y = EVAL(car(x));
   1313    NeedNum(ex, y);
   1314    ulong b3 = (ulong) unBox(y);
   1315    ulong z = mpz_gcd_ui(b1, b2, b3);
   1316    return box(z);
   1317 }
   1318 
   1319 any cfun_mpz_gcdext(any ex) {
   1320    any x = ex, y;
   1321    x = cdr(x);
   1322    y = EVAL(car(x));
   1323    NeedNum(ex, y);
   1324    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1325    x = cdr(x);
   1326    y = EVAL(car(x));
   1327    NeedNum(ex, y);
   1328    mpz_ptr b2 = (mpz_ptr) unBox(y);
   1329    x = cdr(x);
   1330    y = EVAL(car(x));
   1331    NeedNum(ex, y);
   1332    mpz_ptr b3 = (mpz_ptr) unBox(y);
   1333    x = cdr(x);
   1334    y = EVAL(car(x));
   1335    NeedNum(ex, y);
   1336    mpz_ptr b4 = (mpz_ptr) unBox(y);
   1337    x = cdr(x);
   1338    y = EVAL(car(x));
   1339    NeedNum(ex, y);
   1340    mpz_ptr b5 = (mpz_ptr) unBox(y);
   1341    mpz_gcdext(b1, b2, b3, b4, b5);
   1342    return Nil;
   1343 }
   1344 
   1345 any cfun_mpz_lcm(any ex) {
   1346    any x = ex, y;
   1347    x = cdr(x);
   1348    y = EVAL(car(x));
   1349    NeedNum(ex, y);
   1350    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1351    x = cdr(x);
   1352    y = EVAL(car(x));
   1353    NeedNum(ex, y);
   1354    mpz_ptr b2 = (mpz_ptr) unBox(y);
   1355    x = cdr(x);
   1356    y = EVAL(car(x));
   1357    NeedNum(ex, y);
   1358    mpz_ptr b3 = (mpz_ptr) unBox(y);
   1359    mpz_lcm(b1, b2, b3);
   1360    return Nil;
   1361 }
   1362 
   1363 any cfun_mpz_lcm_ui(any ex) {
   1364    any x = ex, y;
   1365    x = cdr(x);
   1366    y = EVAL(car(x));
   1367    NeedNum(ex, y);
   1368    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1369    x = cdr(x);
   1370    y = EVAL(car(x));
   1371    NeedNum(ex, y);
   1372    mpz_ptr b2 = (mpz_ptr) unBox(y);
   1373    x = cdr(x);
   1374    y = EVAL(car(x));
   1375    NeedNum(ex, y);
   1376    ulong b3 = (ulong) unBox(y);
   1377    mpz_lcm_ui(b1, b2, b3);
   1378    return Nil;
   1379 }
   1380 
   1381 any cfun_mpz_invert(any ex) {
   1382    any x = ex, y;
   1383    x = cdr(x);
   1384    y = EVAL(car(x));
   1385    NeedNum(ex, y);
   1386    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1387    x = cdr(x);
   1388    y = EVAL(car(x));
   1389    NeedNum(ex, y);
   1390    mpz_ptr b2 = (mpz_ptr) unBox(y);
   1391    x = cdr(x);
   1392    y = EVAL(car(x));
   1393    NeedNum(ex, y);
   1394    mpz_ptr b3 = (mpz_ptr) unBox(y);
   1395    int z = mpz_invert(b1, b2, b3);
   1396    return box(z);
   1397 }
   1398 
   1399 any cfun_mpz_jacobi(any ex) {
   1400    any x = ex, y;
   1401    x = cdr(x);
   1402    y = EVAL(car(x));
   1403    NeedNum(ex, y);
   1404    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1405    x = cdr(x);
   1406    y = EVAL(car(x));
   1407    NeedNum(ex, y);
   1408    mpz_ptr b2 = (mpz_ptr) unBox(y);
   1409    int z = mpz_jacobi(b1, b2);
   1410    return box(z);
   1411 }
   1412 
   1413 any cfun_mpz_legendre(any ex) {
   1414    any x = ex, y;
   1415    x = cdr(x);
   1416    y = EVAL(car(x));
   1417    NeedNum(ex, y);
   1418    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1419    x = cdr(x);
   1420    y = EVAL(car(x));
   1421    NeedNum(ex, y);
   1422    mpz_ptr b2 = (mpz_ptr) unBox(y);
   1423    int z = mpz_legendre(b1, b2);
   1424    return box(z);
   1425 }
   1426 
   1427 any cfun_mpz_kronecker(any ex) {
   1428    any x = ex, y;
   1429    x = cdr(x);
   1430    y = EVAL(car(x));
   1431    NeedNum(ex, y);
   1432    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1433    x = cdr(x);
   1434    y = EVAL(car(x));
   1435    NeedNum(ex, y);
   1436    mpz_ptr b2 = (mpz_ptr) unBox(y);
   1437    int z = mpz_kronecker(b1, b2);
   1438    return box(z);
   1439 }
   1440 
   1441 any cfun_mpz_kronecker_si(any ex) {
   1442    any x = ex, y;
   1443    x = cdr(x);
   1444    y = EVAL(car(x));
   1445    NeedNum(ex, y);
   1446    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1447    x = cdr(x);
   1448    y = EVAL(car(x));
   1449    NeedNum(ex, y);
   1450    long b2 = (long) unBox(y);
   1451    int z = mpz_kronecker_si(b1, b2);
   1452    return box(z);
   1453 }
   1454 
   1455 any cfun_mpz_kronecker_ui(any ex) {
   1456    any x = ex, y;
   1457    x = cdr(x);
   1458    y = EVAL(car(x));
   1459    NeedNum(ex, y);
   1460    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1461    x = cdr(x);
   1462    y = EVAL(car(x));
   1463    NeedNum(ex, y);
   1464    ulong b2 = (ulong) unBox(y);
   1465    int z = mpz_kronecker_ui(b1, b2);
   1466    return box(z);
   1467 }
   1468 
   1469 any cfun_mpz_si_kronecker(any ex) {
   1470    any x = ex, y;
   1471    x = cdr(x);
   1472    y = EVAL(car(x));
   1473    NeedNum(ex, y);
   1474    long b1 = (long) unBox(y);
   1475    x = cdr(x);
   1476    y = EVAL(car(x));
   1477    NeedNum(ex, y);
   1478    mpz_ptr b2 = (mpz_ptr) unBox(y);
   1479    int z = mpz_si_kronecker(b1, b2);
   1480    return box(z);
   1481 }
   1482 
   1483 any cfun_mpz_ui_kronecker(any ex) {
   1484    any x = ex, y;
   1485    x = cdr(x);
   1486    y = EVAL(car(x));
   1487    NeedNum(ex, y);
   1488    ulong b1 = (ulong) unBox(y);
   1489    x = cdr(x);
   1490    y = EVAL(car(x));
   1491    NeedNum(ex, y);
   1492    mpz_ptr b2 = (mpz_ptr) unBox(y);
   1493    int z = mpz_ui_kronecker(b1, b2);
   1494    return box(z);
   1495 }
   1496 
   1497 any cfun_mpz_remove(any ex) {
   1498    any x = ex, y;
   1499    x = cdr(x);
   1500    y = EVAL(car(x));
   1501    NeedNum(ex, y);
   1502    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1503    x = cdr(x);
   1504    y = EVAL(car(x));
   1505    NeedNum(ex, y);
   1506    mpz_ptr b2 = (mpz_ptr) unBox(y);
   1507    x = cdr(x);
   1508    y = EVAL(car(x));
   1509    NeedNum(ex, y);
   1510    mpz_ptr b3 = (mpz_ptr) unBox(y);
   1511    ulong z = mpz_remove(b1, b2, b3);
   1512    return box(z);
   1513 }
   1514 
   1515 any cfun_mpz_fac_ui(any ex) {
   1516    any x = ex, y;
   1517    x = cdr(x);
   1518    y = EVAL(car(x));
   1519    NeedNum(ex, y);
   1520    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1521    x = cdr(x);
   1522    y = EVAL(car(x));
   1523    NeedNum(ex, y);
   1524    ulong b2 = (ulong) unBox(y);
   1525    mpz_fac_ui(b1, b2);
   1526    return Nil;
   1527 }
   1528 
   1529 any cfun_mpz_bin_ui(any ex) {
   1530    any x = ex, y;
   1531    x = cdr(x);
   1532    y = EVAL(car(x));
   1533    NeedNum(ex, y);
   1534    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1535    x = cdr(x);
   1536    y = EVAL(car(x));
   1537    NeedNum(ex, y);
   1538    mpz_ptr b2 = (mpz_ptr) unBox(y);
   1539    x = cdr(x);
   1540    y = EVAL(car(x));
   1541    NeedNum(ex, y);
   1542    ulong b3 = (ulong) unBox(y);
   1543    mpz_bin_ui(b1, b2, b3);
   1544    return Nil;
   1545 }
   1546 
   1547 any cfun_mpz_bin_uiui(any ex) {
   1548    any x = ex, y;
   1549    x = cdr(x);
   1550    y = EVAL(car(x));
   1551    NeedNum(ex, y);
   1552    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1553    x = cdr(x);
   1554    y = EVAL(car(x));
   1555    NeedNum(ex, y);
   1556    ulong b2 = (ulong) unBox(y);
   1557    x = cdr(x);
   1558    y = EVAL(car(x));
   1559    NeedNum(ex, y);
   1560    ulong b3 = (ulong) unBox(y);
   1561    mpz_bin_uiui(b1, b2, b3);
   1562    return Nil;
   1563 }
   1564 
   1565 any cfun_mpz_fib_ui(any ex) {
   1566    any x = ex, y;
   1567    x = cdr(x);
   1568    y = EVAL(car(x));
   1569    NeedNum(ex, y);
   1570    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1571    x = cdr(x);
   1572    y = EVAL(car(x));
   1573    NeedNum(ex, y);
   1574    ulong b2 = (ulong) unBox(y);
   1575    mpz_fib_ui(b1, b2);
   1576    return Nil;
   1577 }
   1578 
   1579 any cfun_mpz_fib2_ui(any ex) {
   1580    any x = ex, y;
   1581    x = cdr(x);
   1582    y = EVAL(car(x));
   1583    NeedNum(ex, y);
   1584    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1585    x = cdr(x);
   1586    y = EVAL(car(x));
   1587    NeedNum(ex, y);
   1588    mpz_ptr b2 = (mpz_ptr) unBox(y);
   1589    x = cdr(x);
   1590    y = EVAL(car(x));
   1591    NeedNum(ex, y);
   1592    ulong b3 = (ulong) unBox(y);
   1593    mpz_fib2_ui(b1, b2, b3);
   1594    return Nil;
   1595 }
   1596 
   1597 any cfun_mpz_lucnum_ui(any ex) {
   1598    any x = ex, y;
   1599    x = cdr(x);
   1600    y = EVAL(car(x));
   1601    NeedNum(ex, y);
   1602    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1603    x = cdr(x);
   1604    y = EVAL(car(x));
   1605    NeedNum(ex, y);
   1606    ulong b2 = (ulong) unBox(y);
   1607    mpz_lucnum_ui(b1, b2);
   1608    return Nil;
   1609 }
   1610 
   1611 any cfun_mpz_lucnum2_ui(any ex) {
   1612    any x = ex, y;
   1613    x = cdr(x);
   1614    y = EVAL(car(x));
   1615    NeedNum(ex, y);
   1616    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1617    x = cdr(x);
   1618    y = EVAL(car(x));
   1619    NeedNum(ex, y);
   1620    mpz_ptr b2 = (mpz_ptr) unBox(y);
   1621    x = cdr(x);
   1622    y = EVAL(car(x));
   1623    NeedNum(ex, y);
   1624    ulong b3 = (ulong) unBox(y);
   1625    mpz_lucnum2_ui(b1, b2, b3);
   1626    return Nil;
   1627 }
   1628 
   1629 any cfun_mpz_cmp(any ex) {
   1630    any x = ex, y;
   1631    x = cdr(x);
   1632    y = EVAL(car(x));
   1633    NeedNum(ex, y);
   1634    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1635    x = cdr(x);
   1636    y = EVAL(car(x));
   1637    NeedNum(ex, y);
   1638    mpz_ptr b2 = (mpz_ptr) unBox(y);
   1639    int z = mpz_cmp(b1, b2);
   1640    return box(z);
   1641 }
   1642 
   1643 any cfun_mpz_cmp_si(any ex) {
   1644    any x = ex, y;
   1645    x = cdr(x);
   1646    y = EVAL(car(x));
   1647    NeedNum(ex, y);
   1648    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1649    x = cdr(x);
   1650    y = EVAL(car(x));
   1651    NeedNum(ex, y);
   1652    long b2 = (long) unBox(y);
   1653    int z = mpz_cmp_si(b1, b2);
   1654    return box(z);
   1655 }
   1656 
   1657 any cfun_mpz_cmp_ui(any ex) {
   1658    any x = ex, y;
   1659    x = cdr(x);
   1660    y = EVAL(car(x));
   1661    NeedNum(ex, y);
   1662    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1663    x = cdr(x);
   1664    y = EVAL(car(x));
   1665    NeedNum(ex, y);
   1666    ulong b2 = (ulong) unBox(y);
   1667    int z = mpz_cmp_ui(b1, b2);
   1668    return box(z);
   1669 }
   1670 
   1671 any cfun_mpz_cmpabs(any ex) {
   1672    any x = ex, y;
   1673    x = cdr(x);
   1674    y = EVAL(car(x));
   1675    NeedNum(ex, y);
   1676    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1677    x = cdr(x);
   1678    y = EVAL(car(x));
   1679    NeedNum(ex, y);
   1680    mpz_ptr b2 = (mpz_ptr) unBox(y);
   1681    int z = mpz_cmpabs(b1, b2);
   1682    return box(z);
   1683 }
   1684 
   1685 any cfun_mpz_cmpabs_ui(any ex) {
   1686    any x = ex, y;
   1687    x = cdr(x);
   1688    y = EVAL(car(x));
   1689    NeedNum(ex, y);
   1690    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1691    x = cdr(x);
   1692    y = EVAL(car(x));
   1693    NeedNum(ex, y);
   1694    ulong b2 = (ulong) unBox(y);
   1695    int z = mpz_cmpabs_ui(b1, b2);
   1696    return box(z);
   1697 }
   1698 
   1699 any cfun_mpz_sgn(any ex) {
   1700    any x = ex, y;
   1701    x = cdr(x);
   1702    y = EVAL(car(x));
   1703    NeedNum(ex, y);
   1704    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1705    int z = mpz_sgn(b1);
   1706    return box(z);
   1707 }
   1708 
   1709 any cfun_mpz_and(any ex) {
   1710    any x = ex, y;
   1711    x = cdr(x);
   1712    y = EVAL(car(x));
   1713    NeedNum(ex, y);
   1714    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1715    x = cdr(x);
   1716    y = EVAL(car(x));
   1717    NeedNum(ex, y);
   1718    mpz_ptr b2 = (mpz_ptr) unBox(y);
   1719    x = cdr(x);
   1720    y = EVAL(car(x));
   1721    NeedNum(ex, y);
   1722    mpz_ptr b3 = (mpz_ptr) unBox(y);
   1723    mpz_and(b1, b2, b3);
   1724    return Nil;
   1725 }
   1726 
   1727 any cfun_mpz_ior(any ex) {
   1728    any x = ex, y;
   1729    x = cdr(x);
   1730    y = EVAL(car(x));
   1731    NeedNum(ex, y);
   1732    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1733    x = cdr(x);
   1734    y = EVAL(car(x));
   1735    NeedNum(ex, y);
   1736    mpz_ptr b2 = (mpz_ptr) unBox(y);
   1737    x = cdr(x);
   1738    y = EVAL(car(x));
   1739    NeedNum(ex, y);
   1740    mpz_ptr b3 = (mpz_ptr) unBox(y);
   1741    mpz_ior(b1, b2, b3);
   1742    return Nil;
   1743 }
   1744 
   1745 any cfun_mpz_xor(any ex) {
   1746    any x = ex, y;
   1747    x = cdr(x);
   1748    y = EVAL(car(x));
   1749    NeedNum(ex, y);
   1750    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1751    x = cdr(x);
   1752    y = EVAL(car(x));
   1753    NeedNum(ex, y);
   1754    mpz_ptr b2 = (mpz_ptr) unBox(y);
   1755    x = cdr(x);
   1756    y = EVAL(car(x));
   1757    NeedNum(ex, y);
   1758    mpz_ptr b3 = (mpz_ptr) unBox(y);
   1759    mpz_xor(b1, b2, b3);
   1760    return Nil;
   1761 }
   1762 
   1763 any cfun_mpz_com(any ex) {
   1764    any x = ex, y;
   1765    x = cdr(x);
   1766    y = EVAL(car(x));
   1767    NeedNum(ex, y);
   1768    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1769    x = cdr(x);
   1770    y = EVAL(car(x));
   1771    NeedNum(ex, y);
   1772    mpz_ptr b2 = (mpz_ptr) unBox(y);
   1773    mpz_com(b1, b2);
   1774    return Nil;
   1775 }
   1776 
   1777 any cfun_mpz_popcount(any ex) {
   1778    any x = ex, y;
   1779    x = cdr(x);
   1780    y = EVAL(car(x));
   1781    NeedNum(ex, y);
   1782    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1783    ulong z = mpz_popcount(b1);
   1784    return box(z);
   1785 }
   1786 
   1787 any cfun_mpz_hamdist(any ex) {
   1788    any x = ex, y;
   1789    x = cdr(x);
   1790    y = EVAL(car(x));
   1791    NeedNum(ex, y);
   1792    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1793    x = cdr(x);
   1794    y = EVAL(car(x));
   1795    NeedNum(ex, y);
   1796    mpz_ptr b2 = (mpz_ptr) unBox(y);
   1797    ulong z = mpz_hamdist(b1, b2);
   1798    return box(z);
   1799 }
   1800 
   1801 any cfun_mpz_scan0(any ex) {
   1802    any x = ex, y;
   1803    x = cdr(x);
   1804    y = EVAL(car(x));
   1805    NeedNum(ex, y);
   1806    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1807    x = cdr(x);
   1808    y = EVAL(car(x));
   1809    NeedNum(ex, y);
   1810    ulong b2 = (ulong) unBox(y);
   1811    ulong z = mpz_scan0(b1, b2);
   1812    return box(z);
   1813 }
   1814 
   1815 any cfun_mpz_scan1(any ex) {
   1816    any x = ex, y;
   1817    x = cdr(x);
   1818    y = EVAL(car(x));
   1819    NeedNum(ex, y);
   1820    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1821    x = cdr(x);
   1822    y = EVAL(car(x));
   1823    NeedNum(ex, y);
   1824    ulong b2 = (ulong) unBox(y);
   1825    ulong z = mpz_scan1(b1, b2);
   1826    return box(z);
   1827 }
   1828 
   1829 any cfun_mpz_setbit(any ex) {
   1830    any x = ex, y;
   1831    x = cdr(x);
   1832    y = EVAL(car(x));
   1833    NeedNum(ex, y);
   1834    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1835    x = cdr(x);
   1836    y = EVAL(car(x));
   1837    NeedNum(ex, y);
   1838    ulong b2 = (ulong) unBox(y);
   1839    mpz_setbit(b1, b2);
   1840    return Nil;
   1841 }
   1842 
   1843 any cfun_mpz_clrbit(any ex) {
   1844    any x = ex, y;
   1845    x = cdr(x);
   1846    y = EVAL(car(x));
   1847    NeedNum(ex, y);
   1848    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1849    x = cdr(x);
   1850    y = EVAL(car(x));
   1851    NeedNum(ex, y);
   1852    ulong b2 = (ulong) unBox(y);
   1853    mpz_clrbit(b1, b2);
   1854    return Nil;
   1855 }
   1856 
   1857 any cfun_mpz_combit(any ex) {
   1858    any x = ex, y;
   1859    x = cdr(x);
   1860    y = EVAL(car(x));
   1861    NeedNum(ex, y);
   1862    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1863    x = cdr(x);
   1864    y = EVAL(car(x));
   1865    NeedNum(ex, y);
   1866    ulong b2 = (ulong) unBox(y);
   1867    mpz_combit(b1, b2);
   1868    return Nil;
   1869 }
   1870 
   1871 any cfun_mpz_tstbit(any ex) {
   1872    any x = ex, y;
   1873    x = cdr(x);
   1874    y = EVAL(car(x));
   1875    NeedNum(ex, y);
   1876    mpz_ptr b1 = (mpz_ptr) unBox(y);
   1877    x = cdr(x);
   1878    y = EVAL(car(x));
   1879    NeedNum(ex, y);
   1880    ulong b2 = (ulong) unBox(y);
   1881    int z = mpz_tstbit(b1, b2);
   1882    return box(z);
   1883 }