source: libcfa/src/gmp.hfa @ 200fcb3

aaron-thesisarm-ehcleanup-dtorsdeferred_resnjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprno_listpersistent-indexer
Last change on this file since 200fcb3 was 200fcb3, checked in by Peter A. Buhr <pabuhr@…>, 3 years ago

add auto newline to sout, change endl to nl

  • Property mode set to 100644
File size: 18.6 KB
Line 
1//
2// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
3//
4// The contents of this file are covered under the licence agreement in the
5// file "LICENCE" distributed with Cforall.
6//
7// gmp --
8//
9// Author           : Peter A. Buhr
10// Created On       : Tue Apr 19 08:43:43 2016
11// Last Modified By : Peter A. Buhr
12// Last Modified On : Tue Dec  4 23:25:51 2018
13// Update Count     : 22
14//
15
16// https://gmplib.org/gmp-man-6.1.1.pdf
17
18#pragma once
19
20#include <gmp.h>                                                                                // GNU multi-precise integers
21#include <fstream.hfa>                                                                          // sout
22
23struct Int { mpz_t mpz; };                                                              // wrap GMP implementation
24
25// constructor
26static inline void ?{}( Int & this ) { mpz_init( this.mpz ); }
27static inline void ?{}( Int & this, Int init ) { mpz_init_set( this.mpz, init.mpz ); }
28static inline void ?{}( Int & this, zero_t ) { mpz_init_set_si( this.mpz, 0 ); }
29static inline void ?{}( Int & this, one_t ) { mpz_init_set_si( this.mpz, 1 ); }
30static inline void ?{}( Int & this, signed long int init ) { mpz_init_set_si( this.mpz, init ); }
31static inline void ?{}( Int & this, unsigned long int init ) { mpz_init_set_ui( this.mpz, init ); }
32static inline void ?{}( Int & this, const char * val ) { if ( mpz_init_set_str( this.mpz, val, 0 ) ) abort(); }
33static inline void ^?{}( Int & this ) { mpz_clear( this.mpz ); }
34
35// literal
36static inline Int ?`mp( signed long int init ) { return (Int){ init }; }
37static inline Int ?`mp( unsigned long int init ) { return (Int){ init }; }
38static inline Int ?`mp( const char * init ) { return (Int){ init }; }
39
40// assignment
41static inline Int ?=?( Int & lhs, Int rhs ) { mpz_set( lhs.mpz, rhs.mpz ); return lhs; }
42static inline Int ?=?( Int & lhs, long int rhs ) { mpz_set_si( lhs.mpz, rhs ); return lhs; }
43static inline Int ?=?( Int & lhs, unsigned long int rhs ) { mpz_set_ui( lhs.mpz, rhs ); return lhs; }
44static inline Int ?=?( Int & lhs, const char * rhs ) { if ( mpz_set_str( lhs.mpz, rhs, 0 ) ) { printf( "invalid string conversion\n" ); abort(); } return lhs; }
45
46static inline char ?=?( char & lhs, Int rhs ) { char val = mpz_get_si( rhs.mpz ); lhs = val; return lhs; }
47static inline short int ?=?( short int & lhs, Int rhs ) { short int val = mpz_get_si( rhs.mpz ); lhs = val; return lhs; }
48static inline int ?=?( int & lhs, Int rhs ) { int val = mpz_get_si( rhs.mpz ); lhs = val; return lhs; }
49static inline long int ?=?( long int & lhs, Int rhs ) { long int val = mpz_get_si( rhs.mpz ); lhs = val; return lhs; }
50static inline unsigned char ?=?( unsigned char & lhs, Int rhs ) { unsigned char val = mpz_get_ui( rhs.mpz ); lhs = val; return lhs; }
51static inline unsigned short int ?=?( unsigned short int & lhs, Int rhs ) { unsigned short int val = mpz_get_ui( rhs.mpz ); lhs = val; return lhs; }
52static inline unsigned int ?=?( unsigned int & lhs, Int rhs ) { unsigned int val = mpz_get_ui( rhs.mpz ); lhs = val; return lhs; }
53static inline unsigned long int ?=?( unsigned long int & lhs, Int rhs ) { unsigned long int val = mpz_get_ui( rhs.mpz ); lhs = val; return lhs; }
54
55// conversions
56static inline long int narrow( Int val ) { return mpz_get_si( val.mpz ); }
57static inline unsigned long int narrow( Int val ) { return mpz_get_ui( val.mpz ); }
58
59// comparison
60static inline int ?==?( Int oper1, Int oper2 ) { return mpz_cmp( oper1.mpz, oper2.mpz ) == 0; }
61static inline int ?==?( Int oper1, long int oper2 ) { return mpz_cmp_si( oper1.mpz, oper2 ) == 0; }
62static inline int ?==?( long int oper2, Int oper1 ) { return mpz_cmp_si( oper1.mpz, oper2 ) == 0; }
63static inline int ?==?( Int oper1, unsigned long int oper2 ) { return mpz_cmp_ui( oper1.mpz, oper2 ) == 0; }
64static inline int ?==?( unsigned long int oper2, Int oper1 ) { return mpz_cmp_ui( oper1.mpz, oper2 ) == 0; }
65
66static inline int ?!=?( Int oper1, Int oper2 ) { return ! ( oper1 == oper2 ); }
67static inline int ?!=?( Int oper1, long int oper2 ) { return ! ( oper1 == oper2 ); }
68static inline int ?!=?( long int oper1, Int oper2 ) { return ! ( oper1 == oper2 ); }
69static inline int ?!=?( Int oper1, unsigned long int oper2 ) { return ! ( oper1 == oper2 ); }
70static inline int ?!=?( unsigned long int oper1, Int oper2 ) { return ! ( oper1 == oper2 ); }
71
72static inline int ?<?( Int oper1, Int oper2 ) { return mpz_cmp( oper1.mpz, oper2.mpz ) < 0; }
73static inline int ?<?( Int oper1, long int oper2 ) { return mpz_cmp_si( oper1.mpz, oper2 ) < 0; }
74static inline int ?<?( long int oper2, Int oper1 ) { return mpz_cmp_si( oper1.mpz, oper2 ) < 0; }
75static inline int ?<?( Int oper1, unsigned long int oper2 ) { return mpz_cmp_ui( oper1.mpz, oper2 ) < 0; }
76static inline int ?<?( unsigned long int oper2, Int oper1 ) { return mpz_cmp_ui( oper1.mpz, oper2 ) < 0; }
77
78static inline int ?<=?( Int oper1, Int oper2 ) { return mpz_cmp( oper1.mpz, oper2.mpz ) <= 0; }
79static inline int ?<=?( Int oper1, long int oper2 ) { return mpz_cmp_si( oper1.mpz, oper2 ) <= 0; }
80static inline int ?<=?( long int oper2, Int oper1 ) { return mpz_cmp_si( oper1.mpz, oper2 ) <= 0; }
81static inline int ?<=?( Int oper1, unsigned long int oper2 ) { return mpz_cmp_ui( oper1.mpz, oper2 ) <= 0; }
82static inline int ?<=?( unsigned long int oper2, Int oper1 ) { return mpz_cmp_ui( oper1.mpz, oper2 ) <= 0; }
83
84static inline int ?>?( Int oper1, Int oper2 ) { return ! ( oper1 <= oper2 ); }
85static inline int ?>?( Int oper1, long int oper2 ) { return ! ( oper1 <= oper2 ); }
86static inline int ?>?( long int oper1, Int oper2 ) { return ! ( oper1 <= oper2 ); }
87static inline int ?>?( Int oper1, unsigned long int oper2 ) { return ! ( oper1 <= oper2 ); }
88static inline int ?>?( unsigned long int oper1, Int oper2 ) { return ! ( oper1 <= oper2 ); }
89
90static inline int ?>=?( Int oper1, Int oper2 ) { return ! ( oper1 < oper2 ); }
91static inline int ?>=?( Int oper1, long int oper2 ) { return ! ( oper1 < oper2 ); }
92static inline int ?>=?( long int oper1, Int oper2 ) { return ! ( oper1 < oper2 ); }
93static inline int ?>=?( Int oper1, unsigned long int oper2 ) { return ! ( oper1 < oper2 ); }
94static inline int ?>=?( unsigned long int oper1, Int oper2 ) { return ! ( oper1 < oper2 ); }
95
96// arithmetic
97static inline Int +?( Int oper ) { Int pos; mpz_set( pos.mpz, oper.mpz ); return pos; }
98static inline Int -?( Int oper ) { Int neg; mpz_neg( neg.mpz, oper.mpz ); return neg; }
99static inline Int ~?( Int oper ) { Int comp; mpz_com( comp.mpz, oper.mpz ); return comp; }
100
101static inline Int ?&?( Int oper1, Int oper2 ) { Int conjunction; mpz_and( conjunction.mpz, oper1.mpz, oper2.mpz ); return conjunction; }
102static inline Int ?&?( Int oper1, long int oper2 ) { Int conjunction, temp; mpz_set_si( temp.mpz, oper2 ); mpz_and( conjunction.mpz, oper1.mpz, temp.mpz ); return conjunction; }
103static inline Int ?&?( long int oper1, Int oper2 ) { Int conjunction, temp; mpz_set_si( temp.mpz, oper1 ); mpz_and( conjunction.mpz, temp.mpz, oper2.mpz ); return conjunction; }
104static inline Int ?&?( Int oper1, unsigned long int oper2 ) { Int conjunction, temp; mpz_set_ui( temp.mpz, oper2 ); mpz_and( conjunction.mpz, oper1.mpz, temp.mpz ); return conjunction; }
105static inline Int ?&?( unsigned long int oper1, Int oper2 ) { Int conjunction, temp; mpz_set_ui( temp.mpz, oper1 ); mpz_and( conjunction.mpz, temp.mpz, oper2.mpz ); return conjunction; }
106static inline Int ?&=?( Int & lhs, Int rhs ) { return lhs = lhs & rhs; }
107
108static inline Int ?|?( Int oper1, Int oper2 ) { Int disjunction; mpz_ior( disjunction.mpz, oper1.mpz, oper2.mpz ); return disjunction; }
109static inline Int ?|?( Int oper1, long int oper2 ) { Int disjunction, temp; mpz_set_si( temp.mpz, oper2 ); mpz_ior( disjunction.mpz, oper1.mpz, temp.mpz ); return disjunction; }
110static inline Int ?|?( long int oper1, Int oper2 ) { Int disjunction, temp; mpz_set_si( temp.mpz, oper1 ); mpz_ior( disjunction.mpz, temp.mpz, oper2.mpz ); return disjunction; }
111static inline Int ?|?( Int oper1, unsigned long int oper2 ) { Int disjunction, temp; mpz_set_ui( temp.mpz, oper2 ); mpz_ior( disjunction.mpz, oper1.mpz, temp.mpz ); return disjunction; }
112static inline Int ?|?( unsigned long int oper1, Int oper2 ) { Int disjunction, temp; mpz_set_ui( temp.mpz, oper1 ); mpz_ior( disjunction.mpz, temp.mpz, oper2.mpz ); return disjunction; }
113static inline Int ?|=?( Int & lhs, Int rhs ) { return lhs = lhs | rhs; }
114
115static inline Int ?^?( Int oper1, Int oper2 ) { Int disjunction; mpz_xor( disjunction.mpz, oper1.mpz, oper2.mpz ); return disjunction; }
116static inline Int ?^?( Int oper1, long int oper2 ) { Int disjunction, temp; mpz_set_si( temp.mpz, oper2 ); mpz_ior( disjunction.mpz, oper1.mpz, temp.mpz ); return disjunction; }
117static inline Int ?^?( long int oper1, Int oper2 ) { Int disjunction, temp; mpz_set_si( temp.mpz, oper1 ); mpz_ior( disjunction.mpz, temp.mpz, oper2.mpz ); return disjunction; }
118static inline Int ?^?( Int oper1, unsigned long int oper2 ) { Int disjunction, temp; mpz_set_ui( temp.mpz, oper2 ); mpz_ior( disjunction.mpz, oper1.mpz, temp.mpz ); return disjunction; }
119static inline Int ?^?( unsigned long int oper1, Int oper2 ) { Int disjunction, temp; mpz_set_ui( temp.mpz, oper1 ); mpz_ior( disjunction.mpz, temp.mpz, oper2.mpz ); return disjunction; }
120static inline Int ?^=?( Int & lhs, Int rhs ) { return lhs = lhs ^ rhs; }
121
122static inline Int ?+?( Int addend1, Int addend2 ) { Int sum; mpz_add( sum.mpz, addend1.mpz, addend2.mpz ); return sum; }
123static inline Int ?+?( Int addend1, long int addend2 ) { Int sum; if ( addend2 >= 0 ) mpz_add_ui( sum.mpz, addend1.mpz, addend2 ); else mpz_sub_ui( sum.mpz, addend1.mpz, -addend2 ); return sum; }
124static inline Int ?+?( long int addend2, Int addend1 ) { Int sum; if ( addend2 >= 0 ) mpz_add_ui( sum.mpz, addend1.mpz, addend2 ); else mpz_sub_ui( sum.mpz, addend1.mpz, -addend2 ); return sum; }
125static inline Int ?+?( Int addend1, unsigned long int addend2 ) { Int sum; mpz_add_ui( sum.mpz, addend1.mpz, addend2 ); return sum; }
126static inline Int ?+?( unsigned long int addend2, Int addend1 ) { Int sum; mpz_add_ui( sum.mpz, addend1.mpz, addend2 ); return sum; }
127static inline Int ?+=?( Int & lhs, Int rhs ) { return lhs = lhs + rhs; }
128static inline Int ?+=?( Int & lhs, long int rhs ) { return lhs = lhs + rhs; }
129static inline Int ?+=?( Int & lhs, unsigned long int rhs ) { return lhs = lhs + rhs; }
130static inline Int ++?( Int & lhs ) { return lhs += 1; }
131static inline Int ?++( Int & lhs ) { Int ret = lhs; lhs += 1; return ret; }
132
133static inline Int ?-?( Int minuend, Int subtrahend ) { Int diff; mpz_sub( diff.mpz, minuend.mpz, subtrahend.mpz ); return diff; }
134static inline Int ?-?( Int minuend, long int subtrahend ) { Int diff; if ( subtrahend >= 0 ) mpz_sub_ui( diff.mpz, minuend.mpz, subtrahend ); else mpz_add_ui( diff.mpz, minuend.mpz, -subtrahend ); return diff; }
135static inline Int ?-?( long int minuend, Int subtrahend ) { Int diff; if ( subtrahend >= 0 ) mpz_ui_sub( diff.mpz, minuend, subtrahend.mpz ); else { mpz_add_ui( diff.mpz, subtrahend.mpz, -minuend ); mpz_neg( diff.mpz, diff.mpz ); } return diff; }
136static inline Int ?-?( Int minuend, unsigned long int subtrahend ) { Int diff; mpz_sub_ui( diff.mpz, minuend.mpz, subtrahend ); return diff; }
137static inline Int ?-?( unsigned long int minuend, Int subtrahend ) { Int diff; mpz_ui_sub( diff.mpz, minuend, subtrahend.mpz ); return diff; }
138static inline Int ?-=?( Int & lhs, Int rhs ) { return lhs = lhs - rhs; }
139static inline Int ?-=?( Int & lhs, long int rhs ) { return lhs = lhs - rhs; }
140static inline Int ?-=?( Int & lhs, unsigned long int rhs ) { return lhs = lhs - rhs; }
141static inline Int --?( Int & lhs ) { return lhs -= 1; }
142static inline Int ?--( Int & lhs ) { Int ret = lhs; lhs -= 1; return ret; }
143
144static inline Int ?*?( Int multiplicator, Int multiplicand ) { Int product; mpz_mul( product.mpz, multiplicator.mpz, multiplicand.mpz ); return product; }
145static inline Int ?*?( Int multiplicator, long int multiplicand ) { Int product; mpz_mul_si( product.mpz, multiplicator.mpz, multiplicand ); return product; }
146static inline Int ?*?( long int multiplicand, Int multiplicator ) { Int product; mpz_mul_si( product.mpz, multiplicator.mpz, multiplicand ); return product; }
147static inline Int ?*?( Int multiplicator, unsigned long int multiplicand ) { Int product; mpz_mul_ui( product.mpz, multiplicator.mpz, multiplicand ); return product; }
148static inline Int ?*?( unsigned long int multiplicand, Int multiplicator ) { Int product; mpz_mul_ui( product.mpz, multiplicator.mpz, multiplicand ); return product; }
149static inline Int ?*=?( Int & lhs, Int rhs ) { return lhs = lhs * rhs; }
150static inline Int ?*=?( Int & lhs, long int rhs ) { return lhs = lhs * rhs; }
151static inline Int ?*=?( Int & lhs, unsigned long int rhs ) { return lhs = lhs * rhs; }
152
153// some code for operators "/" and "%" taken from g++ gmpxx.h
154static inline Int ?/?( Int dividend, Int divisor ) { Int quotient; mpz_tdiv_q( quotient.mpz, dividend.mpz, divisor.mpz ); return quotient; }
155static inline Int ?/?( Int dividend, unsigned long int divisor ) { Int quotient; mpz_tdiv_q_ui( quotient.mpz, dividend.mpz, divisor ); return quotient; }
156static inline Int ?/?( unsigned long int dividend, Int divisor ) {
157        Int quotient;
158    if ( mpz_sgn( divisor.mpz ) >= 0 ) {
159                if ( mpz_fits_ulong_p( divisor.mpz ) )
160                        mpz_set_ui( quotient.mpz, dividend / mpz_get_ui( divisor.mpz ) );
161                else
162                        mpz_set_ui( quotient.mpz, 0 );
163        } else {
164                mpz_neg( quotient.mpz, divisor.mpz );
165                if ( mpz_fits_ulong_p( quotient.mpz ) ) {
166                        mpz_set_ui( quotient.mpz, dividend / mpz_get_ui( quotient.mpz ) );
167                        mpz_neg( quotient.mpz, quotient.mpz );
168                } else
169                        mpz_set_ui( quotient.mpz, 0 );
170        } // if
171        return quotient;
172} // ?/?
173static inline Int ?/?( Int dividend, long int divisor ) {
174        Int quotient;
175    if ( divisor >= 0 )
176                mpz_tdiv_q_ui( quotient.mpz, dividend.mpz, divisor );
177    else {
178                mpz_tdiv_q_ui( quotient.mpz, dividend.mpz, -divisor );
179                mpz_neg( quotient.mpz, quotient.mpz );
180        } // if
181        return quotient;
182} // ?/?
183static inline Int ?/?( long int dividend, Int divisor ) {
184        Int quotient;
185    if ( mpz_fits_slong_p( divisor.mpz ) )
186                mpz_set_si( quotient.mpz, dividend / mpz_get_si( divisor.mpz ) );
187    else {
188        // if divisor is bigger than a long then the quotient must be zero, unless dividend==LONG_MIN and
189        // dividend==-LONG_MIN in which case the quotient is -1
190        mpz_set_si( quotient.mpz, mpz_cmpabs_ui( divisor.mpz, (dividend >= 0 ? dividend : -dividend)) == 0 ? -1 : 0 );
191        } // if
192        return quotient;
193} // ?/?
194static inline Int ?/=?( Int & lhs, Int rhs ) { return lhs = lhs / rhs; }
195static inline Int ?/=?( Int & lhs, long int rhs ) { return lhs = lhs / rhs; }
196static inline Int ?/=?( Int & lhs, unsigned long int rhs ) { return lhs = lhs / rhs; }
197
198static inline [ Int, Int ] div( Int dividend, Int divisor ) { Int quotient, remainder; mpz_fdiv_qr( quotient.mpz, remainder.mpz, dividend.mpz, divisor.mpz ); return [ quotient, remainder ]; }
199static inline [ Int, Int ] div( Int dividend, unsigned long int divisor ) { Int quotient, remainder; mpz_fdiv_qr_ui( quotient.mpz, remainder.mpz, dividend.mpz, divisor ); return [ quotient, remainder ]; }
200
201static inline Int ?%?( Int dividend, Int divisor ) { Int remainder; mpz_tdiv_r( remainder.mpz, dividend.mpz, divisor.mpz ); return remainder; }
202static inline Int ?%?( Int dividend, unsigned long int divisor ) { Int remainder; mpz_tdiv_r_ui( remainder.mpz, dividend.mpz, divisor ); return remainder; }
203static inline Int ?%?( unsigned long int dividend, Int divisor ) {
204        Int remainder;
205    if ( mpz_sgn( divisor.mpz ) >= 0 ) {
206                if ( mpz_fits_ulong_p( divisor.mpz ) )
207                        mpz_set_ui( remainder.mpz, dividend % mpz_get_ui( divisor.mpz ) );
208                else
209                        mpz_set_ui( remainder.mpz, dividend );
210        } else {
211                mpz_neg( remainder.mpz, divisor.mpz );
212                if ( mpz_fits_ulong_p( remainder.mpz ) )
213                        mpz_set_ui( remainder.mpz, dividend % mpz_get_ui( remainder.mpz ) );
214                else
215                        mpz_set_ui( remainder.mpz, dividend );
216        } // if
217        return remainder;
218} // ?%?
219static inline Int ?%?( Int dividend, long int divisor ) {
220        Int remainder;
221    mpz_tdiv_r_ui( remainder.mpz, dividend.mpz, (divisor >= 0 ? divisor : -divisor));
222        return remainder;
223} // ?%?
224static inline Int ?%?( long int dividend, Int divisor ) {
225        Int remainder;
226    if ( mpz_fits_slong_p( divisor.mpz ) )
227                mpz_set_si( remainder.mpz, dividend % mpz_get_si( divisor.mpz ) );
228        else {
229                // if divisor is bigger than a long then the remainder is dividend unchanged, unless dividend==LONG_MIN and
230                // dividend==-LONG_MIN in which case the remainder is 0
231        mpz_set_si( remainder.mpz, mpz_cmpabs_ui( divisor.mpz, (dividend >= 0 ? dividend : -dividend)) == 0 ? 0 : dividend);
232        } // if
233        return remainder;
234} // ?%?
235static inline Int ?%=?( Int & lhs, Int rhs ) { return lhs = lhs % rhs; }
236static inline Int ?%=?( Int & lhs, long int rhs ) { return lhs = lhs % rhs; }
237static inline Int ?%=?( Int & lhs, unsigned long int rhs ) { return lhs = lhs % rhs; }
238
239static inline Int ?<<?( Int shiften, mp_bitcnt_t shift ) { Int shifted; mpz_mul_2exp( shifted.mpz, shiften.mpz, shift ); return shifted; }
240static inline Int ?<<=?( Int & lhs, mp_bitcnt_t shift ) { return lhs = lhs << shift; }
241static inline Int ?>>?( Int shiften, mp_bitcnt_t shift ) { Int shifted; mpz_fdiv_q_2exp( shifted.mpz, shiften.mpz, shift ); return shifted; }
242static inline Int ?>>=?( Int & lhs, mp_bitcnt_t shift ) { return lhs = lhs >> shift; }
243
244// number functions
245static inline Int abs( Int oper ) { Int positive; mpz_abs( positive.mpz, oper.mpz ); return positive; }
246static inline Int fact( unsigned long int N ) { Int factorial; mpz_fac_ui( factorial.mpz, N ); return factorial; }
247static inline Int gcd( Int oper1, Int oper2 ) { Int gcdret; mpz_gcd( gcdret.mpz, oper1.mpz, oper2.mpz ); return gcdret; }
248static inline Int pow( Int base, unsigned long int exponent ) { Int power; mpz_pow_ui( power.mpz, base.mpz, exponent ); return power; }
249static inline Int pow( unsigned long int base, unsigned long int exponent ) { Int power; mpz_ui_pow_ui( power.mpz, base, exponent ); return power; }
250static inline void srandom( gmp_randstate_t state ) { gmp_randinit_default( state ); }
251static inline Int random( gmp_randstate_t state, mp_bitcnt_t n ) { Int rand; mpz_urandomb( rand.mpz, state, n ); return rand; }
252static inline Int random( gmp_randstate_t state, Int n ) { Int rand; mpz_urandomm( rand.mpz, state, n.mpz ); return rand; }
253static inline Int random( gmp_randstate_t state, mp_size_t max_size ) { Int rand; mpz_random( rand.mpz, max_size ); return rand; }
254static inline int sgn( Int oper ) { return mpz_sgn( oper.mpz ); }
255static inline Int sqrt( Int oper ) { Int root; mpz_sqrt( root.mpz, oper.mpz ); return root; }
256
257// I/O
258static inline forall( dtype istype | istream( istype ) )
259istype & ?|?( istype & is, Int & mp ) {
260        gmp_scanf( "%Zd", &mp );
261        return is;
262} // ?|?
263
264static inline forall( dtype ostype | ostream( ostype ) ) {
265        ostype & ?|?( ostype & os, Int mp ) {
266                if ( sepPrt( os ) ) fmt( os, "%s", sepGetCur( os ) );
267                gmp_printf( "%Zd", mp.mpz );
268                sepOn( os );
269                return os;
270        } // ?|?
271
272        void ?|?( ostype & os, Int mp ) {
273                (ostype)(os | mp); if ( getANL( os ) ) nl( os );
274        } // ?|?
275} // distribution
276
277// Local Variables: //
278// mode: c //
279// tab-width: 4 //
280// End: //
Note: See TracBrowser for help on using the repository browser.