FCOSA
Operation
Approximates cosine in radians over the reduced interval from minus pi/4 to pi/4.
Assembler Syntax
FCOSA.{S|D}(z) Fn(s), Fn(d)
Privilege
Unprivileged
Required CPUID flags
FP
FPTRANSA
Repeat eligibility
REP eligible
Computes the \(\cos(x)\) reference in radians over finite \(x\) with \(|x| \le \pi/4\) after DAZ and writes an implementation-bounded S- or D-format approximation under the selected FPTRANSA accuracy contract.
The required FPTRANSA_ACCURACY contract is 0x0002.
Special values
-
Infinite source or source magnitude above \(\pi/4\): NV is generated and the result is the architectural default quiet NaN.
-
Zero source: the result is positive one.
Exact anchors
-
\(\cos(+0) = +1\)
-
\(\cos(-0) = +1\)
Required properties
-
even
-
nondecreasing on \([-\pi/4, 0]\) and nonincreasing on \([0, \pi/4]\)
-
result is in \([\sqrt{2}/2, 1]\)
2.75in
Encodings
FCOSA.{S|D}(z) Fn(s), Fn(d)
Format: Instruction format for FCOSA.{S|D}(z) Fn(s), Fn(d)