Changeset f12d4f6 in git for kernel/mpr_complex.h
- Timestamp:
- Jul 29, 2004, 8:13:28 PM (20 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 3c63794435207b2517c26dcc850fdf2d4c32a64f
- Parents:
- 4a0d8619de8e3809d598fa74e5a0f8813326c7fe
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/mpr_complex.h
r4a0d86 rf12d4f6 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: mpr_complex.h,v 1. 2 2004-04-28 13:31:36Singular Exp $ */6 /* $Id: mpr_complex.h,v 1.3 2004-07-29 18:13:28 Singular Exp $ */ 7 7 8 8 /* … … 129 129 inline operator double() const { return mpf_get_d( t ); }; 130 130 131 #if 0 131 132 inline operator int() { return (int)mpf_get_d( t ); }; 132 133 inline operator int() const { return (int)mpf_get_d( t ); }; 134 #else 135 inline operator int() const 136 { if (mpf_fits_sint_p(t)) 137 { 138 gmp_float tmp(*this); 139 tmp+=gmp_float(0.5); 140 return (int)mpf_get_si( tmp.t ); 141 } 142 return 0; 143 }; 144 #endif 133 145 134 146 private:
Note: See TracChangeset
for help on using the changeset viewer.