1 /* -*- Mode: maxima; Package: MAXIMA -*- */
3 ;; Copyright Leo Butler (leo.butler@member.fsf.org) 2013
4 ;; Released under the terms of GPLv2
11 in_or_out=true -> test if op is in o
12 in_or_out=false -> test if op is not o
14 sm_check_for_ops(o,in_or_out) ::= buildq([o:if atom(o) then {o} else o, in_or_out:in_or_out],
16 is(numberp(e) and e<0 and e#-1) or is(not(atom(e)) and member(op(e),o)=in_or_out)));
19 sm_brace_in_exponent -> put a brace around all exponents
21 apply(matchdeclare,[[sm_x],true,sm_y,sm_check_for_ops({set},false)]);
22 defrule(sm_brace_in_exponent,sm_x^sm_y,sm_x^{sm_y});
23 sm_rules:['sm_brace_in_exponent];
25 /* end of smath.mac */