<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://learn.cemetech.net/index.php?action=history&amp;feed=atom&amp;title=TI-BASIC%3ANegative</id>
	<title>TI-BASIC:Negative - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://learn.cemetech.net/index.php?action=history&amp;feed=atom&amp;title=TI-BASIC%3ANegative"/>
	<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=TI-BASIC:Negative&amp;action=history"/>
	<updated>2026-04-17T08:07:46Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.3</generator>
	<entry>
		<id>http://learn.cemetech.net/index.php?title=TI-BASIC:Negative&amp;diff=1157&amp;oldid=prev</id>
		<title>Maintenance script: Initial automated import</title>
		<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=TI-BASIC:Negative&amp;diff=1157&amp;oldid=prev"/>
		<updated>2016-02-24T18:37:37Z</updated>

		<summary type="html">&lt;p&gt;Initial automated import&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Template:TI-BASIC:Command&lt;br /&gt;
|picture=NEGATIVE.GIF&lt;br /&gt;
|summary=Returns the negative value of a number.&lt;br /&gt;
|syntax=‾&amp;#039;&amp;#039;value&amp;#039;&amp;#039;&lt;br /&gt;
|location=Press [(-)]&lt;br /&gt;
|compatibility=TI-83/84/+/SE&lt;br /&gt;
|size=1 byte&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The ‾ (negative) operator takes one number, variable, or expression and negates its value, thus returning the negative equivalent of it. The ‾ operator appears higher in the order of operations than both the [[TI-BASIC:Operators#relational|relational]] and [[TI-BASIC:Operators#logical|logical]] operators, so it will be executed first. In addition, it has the same order of operation as the other [[TI-BASIC:Operators#math|math]] operators, so the calculator simply executes them left to right in the order that they appear.&lt;br /&gt;
&lt;br /&gt;
 :‾1&lt;br /&gt;
            -1&lt;br /&gt;
 &lt;br /&gt;
 :5→X&lt;br /&gt;
 :‾3(X+2&lt;br /&gt;
            -21&lt;br /&gt;
 &lt;br /&gt;
 :‾2→A:‾3→B&lt;br /&gt;
 :AB&lt;br /&gt;
            6&lt;br /&gt;
&lt;br /&gt;
= Optimization =&lt;br /&gt;
&lt;br /&gt;
When adding a negative number to a positive number, switch the two numbers around and change the addition to subtraction. This allows you to get rid of the ‾ sign and save a byte.&lt;br /&gt;
&lt;br /&gt;
 :‾A+B→C&lt;br /&gt;
 can be&lt;br /&gt;
 :B-A→C&lt;br /&gt;
&lt;br /&gt;
This is not always the case, however: if you subtract a command that uses a lot of parentheses and is followed by a newline/colon/STO→ arrow, it&amp;#039;d save space to put the subtraction at the beginning of the line. For instance:&lt;br /&gt;
&lt;br /&gt;
 :inString(Ans,sub(Str1,1,1+int(log(A))))-1&lt;br /&gt;
 can be&lt;br /&gt;
 :‾1+inString(Ans,sub(Str1,1,1+int(log(A&lt;br /&gt;
&lt;br /&gt;
= Error Conditions =&lt;br /&gt;
&lt;br /&gt;
If an &amp;#039;&amp;#039;&amp;#039;[[TI-BASIC:Errors#syntax|ERR:SYNTAX]]&amp;#039;&amp;#039;&amp;#039; is being thrown near a subtraction or negation where there should be no errors, check to make sure that ‾ (negation) and - (subtraction) were not swapped by mistake.&lt;br /&gt;
&lt;br /&gt;
= Related Commands =&lt;br /&gt;
&lt;br /&gt;
* + ([[TI-BASIC:Add|Add]])&lt;br /&gt;
* - ([[TI-BASIC:Subtract|Subtract]])&lt;br /&gt;
* * ([[TI-BASIC:Multiply|Multiply]])&lt;br /&gt;
* / ([[TI-BASIC:Divide|Divide]])[[Category:TI-BASIC]]&lt;br /&gt;
[[Category:TIBD]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>