"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "value.c" between
calc-2.12.7.2.tar.bz2 and calc-2.12.7.6.tar.bz2

About: Calc is a C-style arbitrary precision calculator.

value.c  (calc-2.12.7.2.tar.bz2):value.c  (calc-2.12.7.6.tar.bz2)
skipping to change at line 1848 skipping to change at line 1848
} }
/* raise something with a real exponent */ /* raise something with a real exponent */
switch (v1->v_type) { switch (v1->v_type) {
case V_NUM: case V_NUM:
if (qiszero(v1->v_num)) { if (qiszero(v1->v_num)) {
if (qisneg(real_v2)) { if (qisneg(real_v2)) {
*vres = error_value(E_1OVER0); *vres = error_value(E_1OVER0);
break; break;
} }
/* 0 ^ non-neg is zero, including 0^0 */ /* 0 ^ non-neg is 1, including 0^0 */
vres->v_type = V_NUM; vres->v_type = V_NUM;
vres->v_num = qlink(&_qzero_); vres->v_num = qlink(&_qone_);
} else if (qisint(real_v2)) { } else if (qisint(real_v2)) {
vres->v_num = qpowi(v1->v_num, real_v2); vres->v_num = qpowi(v1->v_num, real_v2);
} else { } else {
vres->v_type = V_NUM; vres->v_type = V_NUM;
vres->v_num = qlink(&_qzero_); vres->v_num = qlink(&_qzero_);
powervalue(v1, v2, NULL, vres); powervalue(v1, v2, NULL, vres);
} }
break; break;
case V_COM: case V_COM:
if (qisint(real_v2)) { if (qisint(real_v2)) {
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)