xsmaxjdp
Vector Scalar Maximum of Double-Precision Floating-Point Values with Java Rounding
Compares two double-precision floating-point values and returns the larger one, with specific handling for zero and NaN values.
Details
Computes the maximum of two double-precision floating-point scalar values using Java-compliant semantics, where -0.0 is greater than +0.0, and NaN handling follows Java rules. The result is stored in the target VSR. This instruction is part of the VSX category and does not update CR or XER.
Pseudocode Operation
XT_dp ← maxj_dp(XA_dp, XB_dp)
Programming Note
xsmaxjdp can be used to implement the Java max() function for single-precision and double-precision arguments. Despite Java not recognizing the concept of exception status, VXSNAN is set to 1 if either operand is an SNaN.
Example
Encoding
Operands
-
XT
Target -
XA
Src A -
XB
Src B