Ignore:
Timestamp:
Dec 20, 2000, 11:54:25 AM (22 years ago)
Branches:
(u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
Children:
24d587c69f03ebf0b0771f514b3c9bc6364a93ed
Parents:
40c7ec80c05f1294b97ec9974f0c5c5a0a35f186
Message:
```change setGMPFloatDigits

Location:
Singular
Files:
5 edited

Unmodified
Removed
• ## Singular/gnumpfl.h

 r40c7ec8 *  Computer Algebra System SINGULAR     * ****************************************/ /* \$Id: gnumpfl.h,v 1.7 2000-12-15 18:49:29 Singular Exp \$ */ /* \$Id: gnumpfl.h,v 1.8 2000-12-20 10:54:24 pohl Exp \$ */ /* * ABSTRACT: computations with GMP floating-point numbers nMapFunc  ngfSetMap(ring src, ring dst); void setGMPFloatDigits( size_t digits ); void setGMPFloatDigits( size_t digits, size_t rest ); #endif
• ## Singular/mpr_complex.cc

 r40c7ec8 *  Computer Algebra System SINGULAR     * ****************************************/ /* \$Id: mpr_complex.cc,v 1.29 2000-12-18 15:44:41 obachman Exp \$ */ /* \$Id: mpr_complex.cc,v 1.30 2000-12-20 10:54:24 pohl Exp \$ */ /* *  digits - the number of output digits (basis 10) *  the size of mantissa consists of two parts: *    the "output" part and the "zero" part. *    the "output" part a and the "rest" part b. *  According to the GMP-precision digits is *  recomputed to bits (basis 2). *    | a - b | < | a | * 0.1^digits . *  In this case we have a - b = 0 . *  The epsilon e is e=0.1^(digits+rest) with *  1+e != 1, but 1+0.1*e = 1. */ void setGMPFloatDigits( size_t digits ) void setGMPFloatDigits( size_t digits, size_t rest ) { size_t bits = 1 + (size_t) ((float)digits * 3.5); size_t db = bits+bits; bits= bits>64?bits:64; size_t rb = 1 + (size_t) ((float)rest * 3.5); size_t db = bits+rb; gmp_output_digits= digits; mpf_set_default_prec( db );
• ## Singular/mpr_complex.h

 r40c7ec8 *  Computer Algebra System SINGULAR     * ****************************************/ /* \$Id: mpr_complex.h,v 1.15 2000-06-30 11:25:38 pohl Exp \$ */ /* \$Id: mpr_complex.h,v 1.16 2000-12-20 10:54:24 pohl Exp \$ */ /* #define CTOF 4 void setGMPFloatDigits( size_t digits ); void setGMPFloatDigits( size_t digits, size_t rest ); size_t getGMPFloatDigits();
• ## Singular/mpr_inout.cc

 r40c7ec8 ****************************************/ /* \$Id: mpr_inout.cc,v 1.11 2000-10-05 15:16:58 Singular Exp \$ */ /* \$Id: mpr_inout.cc,v 1.12 2000-12-20 10:54:25 pohl Exp \$ */ /* else if ( !(rField_is_R()||rField_is_long_R()||rField_is_long_C()) ) { setGMPFloatDigits( (unsigned long int)v->Data() ); unsigned long int ii=(unsigned long int)v->Data(); setGMPFloatDigits( ii, ii ); } v= v->next; if ( !(rField_is_R()||rField_is_long_R()||rField_is_long_C()) ) { setGMPFloatDigits( (unsigned long int)arg2->Data() ); unsigned long int ii = (unsigned long int)arg2->Data(); setGMPFloatDigits( ii, ii ); }
• ## Singular/numbers.cc

 r40c7ec8 *  Computer Algebra System SINGULAR      * *****************************************/ /* \$Id: numbers.cc,v 1.34 2000-12-19 18:31:44 obachman Exp \$ */ /* \$Id: numbers.cc,v 1.35 2000-12-20 10:54:25 pohl Exp \$ */ /* else if (rField_is_long_R(r)) { setGMPFloatDigits(r->ch_flags); setGMPFloatDigits(r->ch_flags,r->ch_flags); } /* -------------- long C -----------------------*/ else if (rField_is_long_C(r)) { setGMPFloatDigits(r->ch_flags); setGMPFloatDigits(r->ch_flags,r->ch_flags); } #ifdef TEST
Note: See TracChangeset for help on using the changeset viewer.