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

Go to the source code of this file.

Functions

uint32_t softfloat_approxRecipSqrt32_1 (unsigned int oddExpA, uint32_t a)
 

Variables

const uint16_t softfloat_approxRecipSqrt_1k0s []
 
const uint16_t softfloat_approxRecipSqrt_1k1s []
 

Function Documentation

◆ softfloat_approxRecipSqrt32_1()

uint32_t softfloat_approxRecipSqrt32_1 ( unsigned int oddExpA,
uint32_t a )

Definition at line 45 of file s_approxRecipSqrt32_1.c.

46{
47 int index;
48 uint16_t eps, r0;
49 uint_fast32_t ESqrR0;
52 uint32_t sqrSigma0;
53
54 index = (a>>27 & 0xE) + oddExpA;
55 eps = (uint16_t) (a>>12);
58 >>20);
59 ESqrR0 = (uint_fast32_t) r0 * r0;
60 if ( ! oddExpA ) ESqrR0 <<= 1;
61 sigma0 = ~(uint_fast32_t) (((uint32_t) ESqrR0 * (uint_fast64_t) a)>>23);
62 r = ((uint_fast32_t) r0<<16) + ((r0 * (uint_fast64_t) sigma0)>>25);
63 sqrSigma0 = ((uint_fast64_t) sigma0 * sigma0)>>32;
64 r += ((uint32_t) ((r>>1) + (r>>3) - ((uint_fast32_t) r0<<14))
65 * (uint_fast64_t) sqrSigma0)
66 >>48;
67 if ( ! (r & 0x80000000) ) r = 0x80000000;
68 return r;
69
70}
const mie::Vuint & r
Definition bn.cpp:28
#define sigma0(x)
Definition hash_impl.h:21
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition pointer.h:1181
const uint16_t softfloat_approxRecipSqrt_1k0s[]
const uint16_t softfloat_approxRecipSqrt_1k1s[]
unsigned short uint16_t
Definition stdint.h:125
unsigned int uint32_t
Definition stdint.h:126
uint64_t uint_fast64_t
Definition stdint.h:157
uint32_t uint_fast32_t
Definition stdint.h:156

Variable Documentation

◆ softfloat_approxRecipSqrt_1k0s

const uint16_t softfloat_approxRecipSqrt_1k0s[]
extern

Definition at line 41 of file s_approxRecipSqrt_1Ks.c.

41 {
42 0xB4C9, 0xFFAB, 0xAA7D, 0xF11C, 0xA1C5, 0xE4C7, 0x9A43, 0xDA29,
43 0x93B5, 0xD0E5, 0x8DED, 0xC8B7, 0x88C6, 0xC16D, 0x8424, 0xBAE1
44};

◆ softfloat_approxRecipSqrt_1k1s

const uint16_t softfloat_approxRecipSqrt_1k1s[]
extern

Definition at line 45 of file s_approxRecipSqrt_1Ks.c.

45 {
46 0xA5A5, 0xEA42, 0x8C21, 0xC62D, 0x788F, 0xAA7F, 0x6928, 0x94B6,
47 0x5CC7, 0x8335, 0x52A6, 0x74E2, 0x4A3E, 0x68FE, 0x432B, 0x5EFD
48};