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

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

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

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