Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
s_propagateNaNF64UI.c File Reference
#include <stdbool.h>
#include <stdint.h>
#include "platform.h"
#include "internals.h"
#include "specialize.h"
#include "softfloat.h"
Include dependency graph for s_propagateNaNF64UI.c:

Go to the source code of this file.

Functions

uint_fast64_t softfloat_propagateNaNF64UI (uint_fast64_t uiA, uint_fast64_t uiB)
 

Function Documentation

◆ softfloat_propagateNaNF64UI()

uint_fast64_t softfloat_propagateNaNF64UI ( uint_fast64_t uiA,
uint_fast64_t uiB )

Definition at line 51 of file s_propagateNaNF64UI.c.

52{
53 bool isSigNaNA, isSigNaNB;
54 uint_fast64_t uiNonsigA, uiNonsigB, uiMagA, uiMagB;
55
56 /*------------------------------------------------------------------------
57 *------------------------------------------------------------------------*/
58 isSigNaNA = softfloat_isSigNaNF64UI( uiA );
59 isSigNaNB = softfloat_isSigNaNF64UI( uiB );
60 /*------------------------------------------------------------------------
61 | Make NaNs non-signaling.
62 *------------------------------------------------------------------------*/
63 uiNonsigA = uiA | UINT64_C( 0x0008000000000000 );
64 uiNonsigB = uiB | UINT64_C( 0x0008000000000000 );
65 /*------------------------------------------------------------------------
66 *------------------------------------------------------------------------*/
67 if ( isSigNaNA | isSigNaNB ) {
69 if ( isSigNaNA ) {
70 if ( isSigNaNB ) goto returnLargerMag;
71 return isNaNF64UI( uiB ) ? uiNonsigB : uiNonsigA;
72 } else {
73 return isNaNF64UI( uiA ) ? uiNonsigA : uiNonsigB;
74 }
75 }
76 returnLargerMag:
77 uiMagA = uiA & UINT64_C( 0x7FFFFFFFFFFFFFFF );
78 uiMagB = uiB & UINT64_C( 0x7FFFFFFFFFFFFFFF );
79 if ( uiMagA < uiMagB ) return uiNonsigB;
80 if ( uiMagB < uiMagA ) return uiNonsigA;
81 return (uiNonsigA < uiNonsigB) ? uiNonsigA : uiNonsigB;
82
83}
void softfloat_raiseFlags(uint_fast8_t flags)
#define softfloat_isSigNaNF64UI(uiA)
Definition specialize.h:165
#define isNaNF64UI(a)
Definition internals.h:130
@ softfloat_flag_invalid
Definition softfloat.h:89
uint64_t uint_fast64_t
Definition stdint.h:157
#define UINT64_C(val)
Definition stdint.h:284
Here is the call graph for this function: