comparison src/number-gmp.c @ 5739:a2912073be85

Support bignums with MPIR. Add documentation on the bignum, ratio, and bigfloat implementations. See xemacs-patches message with ID <CAHCOHQkytZao7Uk9ggeo1HKKJtN1bqO054X2mPsGYyQFjbHrZA@mail.gmail.com> and following messages.
author Jerry James <james@xemacs.org>
date Wed, 19 Jun 2013 09:30:30 -0600
parents 3192994c49ca
children
comparison
equal deleted inserted replaced
5738:f6af091ac654 5739:a2912073be85
1 /* Numeric types for XEmacs using the GNU MP library. 1 /* Numeric types for XEmacs using the GMP or MPIR library.
2 Copyright (C) 2004 Jerry James. 2 Copyright (C) 2004,2013 Jerry James.
3 3
4 This file is part of XEmacs. 4 This file is part of XEmacs.
5 5
6 XEmacs is free software: you can redistribute it and/or modify it 6 XEmacs is free software: you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by the 7 under the terms of the GNU General Public License as published by the
139 { 139 {
140 xfree (ptr); 140 xfree (ptr);
141 } 141 }
142 142
143 void 143 void
144 init_number_gmp () 144 init_number_gmp (void)
145 { 145 {
146 mp_set_memory_functions ((void *(*) (size_t)) xmalloc, gmp_realloc, 146 mp_set_memory_functions ((void *(*) (size_t)) xmalloc, gmp_realloc,
147 gmp_free); 147 gmp_free);
148 148
149 /* Numbers with smaller exponents than this are printed in scientific 149 /* Numbers with smaller exponents than this are printed in scientific