Floating-Point Instructions Instructions
7 PTX instructions in this category - click any row for encoding, pseudocode, and full documentation.
| Mnemonic | Syntax | PTX Version | Summary |
|---|---|---|---|
| copysign | copysign.type d, a, b; | PTX ISA 2.0 | Copy sign bit of a into value of b, and return the result as d. |
| cos | cos.approx{.ftz}.f32 d, a; | PTX ISA 1.0 | Find the cosine of the angle a (in radians). |
| rcp | rcp.approx{.ftz}.f32 d, a; // fast, approximate reciprocal | PTX ISA 1.0 | Compute 1/a, store result in d. |
| rcp.approx.ftz.f64 | rcp.approx.ftz.f64 d, a; | PTX ISA 2.1 | Compute a fast, gross approximation to the reciprocal as follows: extract the most-significant 32 bits of.f64 operand a in 1.11.20 IEEE floating-point format (i.e., ignore the least-significant 32… |
| rsqrt.approx.ftz.f64 | rsqrt.approx.ftz.f64 d, a; | PTX ISA 4.0 | Compute a double-precision (.f64 ) approximation of the square root reciprocal of a value. The least significant 32 bits of the double-precision (.f64 |
| sqrt | sqrt.approx{.ftz}.f32 d, a; // fast, approximate square root | PTX ISA 1.0 | Compute sqrt( a ) and store the result in d. |
| testp | testp.op.type p, a; // result is .pred | PTX ISA 2.0 | testp tests common properties of floating-point numbers and returns a predicate value of 1 if True and 0 if False. |