Jump to content

Arithmetic evaluation: Difference between revisions

m
→‎{{header|REXX}}: aligned bullet points, added verbage.
(Updated D entry)
m (→‎{{header|REXX}}: aligned bullet points, added verbage.)
Line 3,831:
=={{header|REXX}}==
Several additional operators are supported as well as several forms of exponentiated numbers:
:::*   '''^'''       exponentiation,   as well as   '''**'''
:::*   '''//'''       remainder division
:::*   '''%'''     integer division
:::* &nbsp; '''<big>÷</big>''' &nbsp; &nbsp; &nbsp; in addition to &nbsp; '''<big>/</big>'''
:::* &nbsp; '''&amp;''' &nbsp; &nbsp; for logical &nbsp; '''andAND'''
:::* &nbsp; '''|''' &nbsp; &nbsp; &nbsp; for logical &nbsp; '''orOR'''
:::* &nbsp; '''&amp;&amp;''' &nbsp; &nbsp; for logical &nbsp; '''XOR'''
:::* &nbsp; '''||''' &nbsp; &nbsp; &nbsp; for concatenation
:::* &nbsp; '''[ &nbsp; ] &nbsp; &nbsp; { &nbsp; }''' &nbsp; &nbsp; as grouping symbols, &nbsp; as well as &nbsp; '''( &nbsp; )'''
:::* &nbsp; 12.3e+44 &nbsp; &nbsp; &nbsp; ("single" precision)
:::* &nbsp; 12.3E+44 &nbsp; &nbsp; &nbsp; ("single" precision)
:::* &nbsp; 12.3D+44 &nbsp; &nbsp; &nbsp; ("double" precision)
:::* &nbsp; 12.3Q+44 &nbsp; &nbsp; &nbsp; ("extended" or "quad" precision)
<lang rexx>/*REXX pgm evaluates an infix-type arithmetic expression & shows result.*/
nchars = '0123456789.eEdDqQ' /*possible parts of a #, sans ± */
Cookies help us deliver our services. By using our services, you agree to our use of cookies.