2 * Copyright (C) 1987-2008 Sun Microsystems, Inc. All Rights Reserved.
3 * Copyright (C) 2008-2009 Robert Ancell
5 * This program is free software: you can redistribute it and/or modify it under
6 * the terms of the GNU General Public License as published by the Free Software
7 * Foundation, either version 2 of the License, or (at your option) any later
8 * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
15 #include <glib/gi18n.h>
17 /* If we're not using GNU C, elide __attribute__ */
19 # define __attribute__(x) /*NOTHING*/
22 #define min(a, b) ((a) <= (b) ? (a) : (b))
23 #define max(a, b) ((a) >= (b) ? (a) : (b))
25 //2E0 BELOW ENSURES AT LEAST ONE GUARD DIGIT
26 //MP.t = (int) ((float) (accuracy) * log((float)10.) / log((float) MP_BASE) + (float) 2.0);
27 //if (MP.t > MP_SIZE) {
28 // mperr("MP_SIZE TOO SMALL IN CALL TO MPSET, INCREASE MP_SIZE AND DIMENSIONS OF MP ARRAYS TO AT LEAST %d ***", MP.t);
33 void mperr(const char *format
, ...) __attribute__((format(printf
, 1, 2)));
34 void mp_gcd(int64_t *, int64_t *);
35 void mp_normalize(MPNumber
*);
36 void convert_to_radians(const MPNumber
*x
, MPAngleUnit unit
, MPNumber
*z
);
37 void convert_from_radians(const MPNumber
*x
, MPAngleUnit unit
, MPNumber
*z
);
39 #endif /* MP_INTERNAL_H */