
<A NAME=COMBINELOGS>

<TITLE>COMBINELOGS</TITLE></A>
<b><a href=r37_idx.html>INDEX</a></b><p><p>



<B>COMBINELOGS</B> _ _ _  _ _ _  _ _ _  _ _ _ <B>switch</B><P>
<P>
 
 <P>
<P>
In many cases it is desirable to expand product arguments of logarithms, 
or collect a sum of logarithms into a single logarithm. Since these are 
inverse operations, it is not possible to provide rules for doing both at 
the same time and preserve the REDUCE concept of idempotent evaluation. 
As an alternative, REDUCE provides two switches 
<A HREF=r37_0285.html>expandlogs</A> and 
<em>combinelogs</em> to carry out these operations. 
 <P> <H3> 
examples: </H3>
<P><PRE><TT>
on expandlogs; 

log(x*y); 

  LOG(X) + LOG(Y) 


on combinelogs; 

ws; 

  LOG(X*Y)

</TT></PRE><P><P>
<P>
At the present time, it is possible to have both switches on at once, 
which could lead to infinite recursion. However, an expression is 
switched from one form to the other in this case. Users should not rely 
on this behavior, since it may change in the next release. 
<P>
<P>
<P>
