Programmer Guide/SPU Reference/ABS: Difference between revisions

From STX Wiki
Jump to navigationJump to search
m (1 revision: Initial import)
No edit summary
Line 1: Line 1:
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
====ABS====
Simple unary operators
 
:;<code>[ABS <var>a</var> OUT <var>y</var>]</code>:


Compute the absolute value of input <var>A</var>.
Compute the absolute value of input <var>A</var>.

Revision as of 10:32, 28 April 2011

Simple unary operators

[ABS a OUT y]

Compute the absolute value of input A. If A is a number: y = |A| If A is a vector: y[i] = |A[i]|

Usage:

ABS A

Inputs:
A
A number or vector.
Outputs:
Y
A number or vector (same as type of A).

Navigation menu

Personal tools