[BACK]Return to allfuns.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / gmp / mpbsd / tests

Annotation of OpenXM_contrib/gmp/mpbsd/tests/allfuns.c, Revision 1.1.1.1

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>