User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

cl:functions:math-subtract [2019/06/15 02:00]
cl:functions:math-subtract [2019/08/19 17:00] (current)
Line 1: Line 1:
 +====== Function - ======
 +
 +====Syntax====
 +  * **-** //number// → //​negation//​
 +  * **-** //minuend ''&​rest''​ subtrahends''​+''//​ → //​difference//​
 +
 +====Arguments and Values====
 +  * //number//, //​minuend//,​ //​subtrahend//​ - a //​[[CL:​Glossary:​number]]//​.
 +  * //​negation//,​ //​difference//​ - a //​[[CL:​Glossary:​number]]//​.
 +
 +====Description====
 +The //​[[CL:​Glossary:​function]]//​ **[[CL:​Functions:​-]]** performs arithmetic subtraction and negation.
 +
 +If only one //number// is supplied, the negation of that //number// is returned.
 +
 +If more than one //​[[CL:​Glossary:​argument]]//​ is given, it subtracts all of the //​subtrahends//​ from the //minuend// and returns the result.
 +
 +The //​[[CL:​Glossary:​function]]//​ **[[CL:​Functions:​-]]** performs necessary type conversions.
 +
 +====Examples====
 +<​blockquote>​
 +(- 55.55) <​r>​-55.55 </r>
 +(- #c(3 -5)) <​r>#​C(-3 5) </r>
 +(- 0) <r>0 </r>
 +([[CL:​Functions:​eql]] (- 0.0) -0.0) <​r>//​[[CL:​Glossary:​true]]//​ </r>
 +(- #c(100 45) #c(0 45)) <​r>​100 </r>
 +(- 10 1 2 3 4) <r>0 </r>
 +</​blockquote>​
 +
 +====Affected By====
 +None.
 +
 +====Exceptional Situations====
 +Might signal **[[CL:​Types:​type-error]]** if some //​[[CL:​Glossary:​argument]]//​ is not a //​[[CL:​Glossary:​number]]//​. Might signal **[[CL:​Types:​arithmetic-error]]**.
 +
 +====See Also====
 +  * {\secref\NumericOperations}
 +  * {\secref\RationalComputations}
 +  * {\secref\FloatingPointComputations}
 +  * {\secref\ComplexComputations}
 +
 +====Notes====
 +None.