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

Go to the source code of this file.

Functions

float64_t f64_add (float64_t a, float64_t b)
 

Function Documentation

◆ f64_add()

float64_t f64_add ( float64_t a,
float64_t b )

Definition at line 43 of file f64_add.c.

44{
45 union ui64_f64 uA;
46 uint_fast64_t uiA;
47 bool signA;
48 union ui64_f64 uB;
49 uint_fast64_t uiB;
50 bool signB;
51#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 2)
52 float64_t (*magsFuncPtr)( uint_fast64_t, uint_fast64_t, bool );
53#endif
54
55 uA.f = a;
56 uiA = uA.ui;
57 signA = signF64UI( uiA );
58 uB.f = b;
59 uiB = uB.ui;
60 signB = signF64UI( uiB );
61#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
62 if ( signA == signB ) {
63 return softfloat_addMagsF64( uiA, uiB, signA );
64 } else {
65 return softfloat_subMagsF64( uiA, uiB, signA );
66 }
67#else
68 magsFuncPtr =
69 (signA == signB) ? softfloat_addMagsF64 : softfloat_subMagsF64;
70 return (*magsFuncPtr)( uiA, uiB, signA );
71#endif
72
73}
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition pointer.h:1181
float64_t softfloat_subMagsF64(uint_fast64_t, uint_fast64_t, bool)
float64_t softfloat_addMagsF64(uint_fast64_t, uint_fast64_t, bool)
#define signF64UI(a)
Definition internals.h:125
uint64_t uint_fast64_t
Definition stdint.h:157
Here is the call graph for this function: