int i_num, i_den;
// Check non-nested radicals (n/d)^(m/n) in ex wrapper class:
- for (int i=0; i<200; ++i) { // FIXME: run to ~200
+ for (int i=0; i<200; ++i) {
for (int j=2; j<13; ++j) {
// construct an exponent 1/j...
numeric nm(1,j);
ex radical = pow(ex(num)/ex(den),ex(nm));
numeric floating = pow(num/den,nm);
// test the result:
- if (is_ex_of_type(radical,numeric)) {
+ if (is_a<numeric>(radical)) {
clog << "(" << num << "/" << den << ")^(" << nm
<< ") should have been a product, instead it's "
<< radical << endl;
errorflag = true;
}
- numeric ratio = ex_to_numeric(evalf(radical))/floating;
+ numeric ratio = ex_to<numeric>(abs(evalf(radical)))/floating;
if (ratio>1.0001 && ratio<0.9999) {
clog << "(" << num << "/" << den << ")^(" << nm
<< ") erroneously evaluated to " << radical;