Changeset f945d2b in git


Ignore:
Timestamp:
May 10, 2010, 4:20:29 PM (14 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
8f8b75ff2d7cc88aeebc50d7d64014233ac37f86
Parents:
58aa4572233ccdc8c2d5cbbc3538f5dc115b62d9
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2010-05-10 16:20:29+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 11:52:54+01:00
Message:
no mpf_pow? using mpf_pow_ui... + correct operator^ overloading (resp. its usage)
Location:
coeffs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • coeffs/gnumpfl.cc

    r58aa457 rf945d2b  
    210210    return;
    211211  }
    212   else if ( ngfIsZero(x) ) // 0^e, e>0
     212  else if ( ngfIsZero(x, r) ) // 0^e, e>0
    213213  {
    214214    *u=ngfInit(0, r);
     
    223223    return;
    224224  }
    225   f = new gmp_float();
    226   f = (*(gmp_float*)x)^exp;
    227   return (number)f;
     225  return (number) ( new gmp_float( (*(gmp_float*)x)^exp ) );
    228226}
    229227
  • coeffs/mpr_complex.h

    r58aa457 rf945d2b  
    105105  friend gmp_float operator / ( const gmp_float & a, const gmp_float & b );
    106106
    107   inline gmp_float operator ^ ( const gmp_float & a, const int exp )
     107  inline gmp_float operator ^ ( const int exp ) const
    108108  {
    109109    mpf_t b;
    110110    mpf_init(b);
    111     mpf_pow( b, a.t, (unsigned long)exp );
    112     return (gmp_float)b;
     111    mpf_pow_ui( b, this->t, (unsigned long)exp );
     112    return gmp_float(b);
    113113  };
    114114
Note: See TracChangeset for help on using the changeset viewer.