return "exponent less than 0";
c = 1;
while (--right_side_val >= 0)
- c *= rez;
+ c *= rez;
rez = c;
}
else if (right_side_val == 0)
};
#define ptr_to_rparen (&op_tokens[sizeof(op_tokens)-7])
-const char* FAST_FUNC
-endofname(const char *name)
-{
- if (!is_name(*name))
- return name;
- while (*++name) {
- if (!is_in_name(*name))
- break;
- }
- return name;
-}
-
static arith_t FAST_FUNC
evaluate_string(arith_state_t *math_state, const char *expr)
{
* integer stack.
* But for binary operators, "apply" everything on the operator
* stack until we find an operator with a lesser priority than the
- * one we have just extracted.
+ * one we have just extracted. If op is right-associative,
+ * then stop "applying" on the equal priority too.
* Left paren is given the lowest priority so it will never be
* "applied" in this way.
- * if associativity is right and priority eq, applied also skip
*/
prec = PREC(op);
if ((prec > 0 && prec < UNARYPREC) || prec == SPEC_PREC) {