19 #ifndef RAPIDJSON_DTOA_ 20 #define RAPIDJSON_DTOA_ 31 RAPIDJSON_DIAG_OFF(effc++)
32 RAPIDJSON_DIAG_OFF(array-bounds)
36 while (rest < wp_w && delta - rest >= ten_kappa &&
37 (rest + ten_kappa < wp_w ||
38 wp_w - rest > rest + ten_kappa - wp_w)) {
47 if (
n < 100)
return 2;
48 if (
n < 1000)
return 3;
49 if (
n < 10000)
return 4;
50 if (
n < 100000)
return 5;
51 if (
n < 1000000)
return 6;
52 if (
n < 10000000)
return 7;
53 if (
n < 100000000)
return 8;
61 static const uint32_t kPow10[] = { 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000 };
72 case 9: d =
p1 / 100000000;
p1 %= 100000000;
break;
73 case 8: d =
p1 / 10000000;
p1 %= 10000000;
break;
74 case 7: d =
p1 / 1000000;
p1 %= 1000000;
break;
75 case 6: d =
p1 / 100000;
p1 %= 100000;
break;
76 case 5: d =
p1 / 10000;
p1 %= 10000;
break;
77 case 4: d =
p1 / 1000;
p1 %= 1000;
break;
78 case 3: d =
p1 / 100;
p1 %= 100;
break;
79 case 2: d =
p1 / 10;
p1 %= 10;
break;
80 case 1: d =
p1;
p1 = 0;
break;
84 buffer[(*len)++] =
static_cast<char>(
'0' +
static_cast<char>(d));
98 char d =
static_cast<char>(
p2 >> -one.
e);
100 buffer[(*len)++] =
static_cast<char>(
'0' + d);
105 int index = -
static_cast<int>(kappa);
118 const DiyFp W =
v.Normalize() * c_mk;
119 DiyFp Wp = w_p * c_mk;
120 DiyFp Wm = w_m * c_mk;
133 *
buffer++ =
static_cast<char>(
'0' +
static_cast<char>(
K / 100));
145 *
buffer++ =
static_cast<char>(
'0' +
static_cast<char>(
K));
151 const int kk =
length + k;
153 if (0 <= k && kk <= 21) {
155 for (
int i =
length; i < kk; i++)
161 else if (0 < kk && kk <= 21) {
165 if (0 > k + maxDecimalPlaces) {
168 for (
int i = kk + maxDecimalPlaces; i > kk + 1; i--)
176 else if (-6 < kk && kk <= 0) {
178 const int offset = 2 - kk;
182 for (
int i = 2; i <
offset; i++)
184 if (
length - kk > maxDecimalPlaces) {
187 for (
int i = maxDecimalPlaces + 1; i > 2; i--)
195 else if (kk < -maxDecimalPlaces) {
245 #endif // RAPIDJSON_DTOA_ uint64_t f
Definition: diyfp.h:160
char * dtoa(double value, char *buffer, int maxDecimalPlaces=324)
Definition: dtoa.h:216
GLuint buffer
Definition: glext.h:6555
GLenum GLsizei len
Definition: glext.h:7389
int e
Definition: diyfp.h:161
void NormalizedBoundaries(DiyFp *minus, DiyFp *plus) const
Definition: diyfp.h:130
#define RAPIDJSON_NAMESPACE_END
provide custom rapidjson namespace (closing expression)
Definition: rapidjson.h:119
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro pixld1_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl else error unsupported endif endm macro pixld2_s mem_operand if mov asr add asl add asl mov asr sub UNIT_X add asl mov asr add asl add asl mov asr add UNIT_X add asl else pixld1_s mem_operand pixld1_s mem_operand endif endm macro pixld0_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl endif endm macro pixld_s_internal mem_operand if mem_operand pixld2_s mem_operand pixdeinterleave basereg elseif mem_operand elseif mem_operand elseif mem_operand elseif mem_operand pixld0_s mem_operand else pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else error unsupported mem_operand if bpp mem_operand endif endm macro vuzp8 reg2 vuzp d d ®2 endm macro vzip8 reg2 vzip d d ®2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld [DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld W[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro fetch_mask_pixblock pixld mask_basereg pixblock_size MASK endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp local skip1 beq endif SRC MASK if dst_r_bpp DST_R else add endif PF add sub
Definition: pixman-arm-neon-asm.h:477
bool Sign() const
Definition: ieee754.h:37
unsigned CountDecimalDigit32(uint32_t n)
Definition: dtoa.h:44
float4 p1
Definition: notHere.h:1
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition: rapidjson.h:402
Definition: document.h:391
char * WriteExponent(int K, char *buffer)
Definition: dtoa.h:126
bool IsZero() const
Definition: ieee754.h:45
GLuint index
Definition: glext.h:6671
void GrisuRound(char *buffer, int len, uint64_t delta, uint64_t rest, uint64_t ten_kappa, uint64_t wp_w)
Definition: dtoa.h:35
const GLdouble * v
Definition: glext.h:6391
#define RAPIDJSON_NAMESPACE_BEGIN
provide custom rapidjson namespace (opening expression)
Definition: rapidjson.h:116
float4 p2
Definition: local.h:1
DiyFp GetCachedPower(int e, int *K)
Definition: diyfp.h:226
const char * GetDigitsLut()
Definition: itoa.h:23
GLsizei const GLfloat * value
Definition: glext.h:6709
void DigitGen(const DiyFp &W, const DiyFp &Mp, uint64_t delta, char *buffer, int *len, int *K)
Definition: dtoa.h:60
Definition: netplay_private.h:956
char * Prettify(char *buffer, int length, int k, int maxDecimalPlaces)
Definition: dtoa.h:150
Definition: video4linux2.c:51
GLintptr offset
Definition: glext.h:6560
unsigned __int64 uint64_t
Definition: stdint.h:136
GLenum GLuint GLenum GLsizei length
Definition: glext.h:6233
GLdouble n
Definition: glext.h:8396
unsigned int uint32_t
Definition: stdint.h:126
void Grisu2(double value, char *buffer, int *length, int *K)
Definition: dtoa.h:112