Skip to main content

IAR Embedded Workbench for RISC-V 3.40

__fp_xor_signNN

In this section:
Syntax
float  __fp_xor_sign32(float  value, float  sign);
double __fp_xor_sign64(double value, double sign);
Description

Returns the argument value with the sign bit combined from the sign bits of value and sign (using the exclusive operator), using the instruction sgnjx.s (32-bit FPU) or sgnjx.d (64-bit FPU). A compatible FPU must be available.

Example
__fp_xor_sign64( 1.0,  3.0) =>  1.0
__fp_xor_sign64( 1.0, -3.0) => -1.0
__fp_xor_sign64(-1.0,  3.0) => -1.0
__fp_xor_sign64(-1.0, -3.0) =>  1.0

Note

To use intrinsic functions in an application, you must include the header file(s) where they are declared, see Summary of intrinsic functions.