1/* A test program doing nothing really, just linking to all the BSD MP 2 functions that're supposed to exist. 3 4Copyright 2000, 2001 Free Software Foundation, Inc. 5 6This file is part of the GNU MP Library. 7 8The GNU MP Library is free software; you can redistribute it and/or modify 9it under the terms of the GNU Lesser General Public License as published by 10the Free Software Foundation; either version 3 of the License, or (at your 11option) any later version. 12 13The GNU MP Library is distributed in the hope that it will be useful, but 14WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 15or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 16License for more details. 17 18You should have received a copy of the GNU Lesser General Public License 19along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ 20 21#include <stdio.h> 22#include <stdlib.h> 23#include "mp.h" 24 25int 26main (int argc, char *argv[]) 27{ 28 MINT *a, *b, *c, *d; 29 short h; 30 31 mp_set_memory_functions (NULL, NULL, NULL); 32 a = itom (123); 33 b = xtom ("DEADBEEF"); 34 c = itom (0); 35 d = itom (0); 36 move (a, b); 37 madd (a, b, c); 38 msub (a, b, c); 39 mult (a, b, c); 40 mdiv (b, a, c, d); 41 sdiv (b, 2, c, &h); 42 msqrt (a, c, d); 43 pow (b, a, a, c); 44 rpow (a, 3, c); 45 gcd (a, b, c); 46 mcmp (a, b); 47 if (argc > 1) 48 { 49 min (c); 50 mout (a); 51 } 52 mtox (b); 53 mfree(a); 54 55 exit (0); 56} 57