Edit

kc3-lang/libtommath/mtest/test.c~

Branch :

  • Show log

    Commit

  • Author : Tom St Denis
    Date : 2003-08-29 14:06:56
    Hash : 6e732340
    Message : added libtommath-0.26

  • mtest/test.c~
  • #include <stdio.h>
    #include "mpi.c"
    
    int main(void)
    {
       mp_int a, b;
       int ix;
       char buf[1024];
    
       mp_init(&a);
       mp_init(&b);
    
       mp_set(&a, 0x1B);
       mp_neg(&a, &a);
       ix = 0;
       mp_add_d(&a, ix, &b);
    
       mp_toradix(&b, buf, 64);
       printf("b == %s\n", buf);
       return 0;
    }