File r37/lisp/csl/html/r37_0269.html artifact ae4c44c136 part of check-in a57e59ec0d



<A NAME=BALANCED_MOD>

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



<B>BALANCED\_MOD</B> _ _ _  _ _ _  _ _ _  _ _ _ <B>switch</B><P>
<P>
 
 <P>
<P>

<A HREF=r37_0305.html>modular</A>numbers are normally produced in the range [0,.
..&lt;n&gt;), 
where 
&lt;n&gt; is the current modulus. With <em>balanced_mod</em> on, the range 
[-&lt;n&gt;/2,&lt;n&gt;/2], or more precisely 
[-floor((&lt;n&gt;-1)/2), ceiling((&lt;n&gt;-1)/2)], is used instead. 
<P>
<P>
 <P> <H3> 
examples: </H3>
<P><PRE><TT>
setmod 7; 

  1 


on modular; 

4; 

  4 


on balanced_mod; 

4; 

  -3

</TT></PRE><P>

REDUCE Historical
REDUCE Sourceforge Project | Historical SVN Repository | GitHub Mirror | SourceHut Mirror | NotABug Mirror | Chisel Mirror | Chisel RSS ]