Home
last modified time | relevance | path

Searched refs:m_apm_data (Results 1 – 10 of 10) sorted by relevance

/haiku/src/libs/mapm/
H A Dmapmutil.c150 if ((atmp->m_apm_data = (UCHAR *)MAPM_MALLOC(84)) == NULL) in m_apm_init()
157 atmp->m_apm_data[0] = 0; in m_apm_init()
166 MAPM_FREE(atmp->m_apm_data); in m_apm_free()
319 M_get_div_rem_10((int)atmp->m_apm_data[0], &numdiv, &numrem); in M_apm_normalize()
329 ucp = atmp->m_apm_data; in M_apm_normalize()
340 memmove(atmp->m_apm_data, ucp, (index + 1 - i)); in M_apm_normalize()
348 M_get_div_rem_10((int)atmp->m_apm_data[i+1], &numdiv, &numrem2); in M_apm_normalize()
349 atmp->m_apm_data[i] = 10 * numrem + numdiv; in M_apm_normalize()
364 ucp = atmp->m_apm_data + index; in M_apm_normalize()
379 M_get_div_rem_10((int)atmp->m_apm_data[index], &numdiv, &numrem); in M_apm_normalize()
[all …]
H A Dmapm_add.c142 r->m_apm_data[j] += carry + M_work2->m_apm_data[j]; in m_apm_add()
144 if (r->m_apm_data[j] >= 100) in m_apm_add()
146 r->m_apm_data[j] -= 100; in m_apm_add()
165 r->m_apm_data[j] += carry + M_work1->m_apm_data[j]; in m_apm_add()
167 if (r->m_apm_data[j] >= 100) in m_apm_add()
169 r->m_apm_data[j] -= 100; in m_apm_add()
278 itmp = (int)r->m_apm_data[j] - ((int)M_work2->m_apm_data[j] + borrow); in m_apm_subtract()
282 r->m_apm_data[j] = (UCHAR)itmp; in m_apm_subtract()
287 r->m_apm_data[j] = (UCHAR)(100 + itmp); in m_apm_subtract()
304 itmp = (int)r->m_apm_data[j] - ((int)M_work1->m_apm_data[j] + borrow); in m_apm_subtract()
[all …]
H A Dmapm_div.c158 if (b->m_apm_data[0] >= 50) in M_apm_sdivide()
165 k = 100 / (b->m_apm_data[0] + 1); in M_apm_sdivide()
177 b0 = 100 * (int)M_div_workb->m_apm_data[0]; in M_apm_sdivide()
180 b0 += M_div_workb->m_apm_data[1]; in M_apm_sdivide()
193 if ((vp = MAPM_REALLOC(r->m_apm_data, (k + 32))) == NULL) in M_apm_sdivide()
201 r->m_apm_data = (UCHAR *)vp; in M_apm_sdivide()
214 r->m_apm_data[0] = 10; in M_apm_sdivide()
239 trial_numer = 10000L * (long)M_div_worka->m_apm_data[0]; in M_apm_sdivide()
243 trial_numer += 100 * M_div_worka->m_apm_data[1] in M_apm_sdivide()
244 + M_div_worka->m_apm_data[2]; in M_apm_sdivide()
[all …]
H A Dmapmutl2.c101 ii = (int)aa->m_apm_data[ii]; in m_apm_is_even()
125 z->m_apm_data[0] = 0; in M_set_to_zero()
150 if ((vp = MAPM_REALLOC(dest->m_apm_data, (j + 32))) == NULL) in m_apm_copy()
158 dest->m_apm_data = (UCHAR *)vp; in m_apm_copy()
165 memcpy(dest->m_apm_data, src->m_apm_data, j); in m_apm_copy()
207 if (ltmp->m_apm_data[i] > rtmp->m_apm_data[i]) in m_apm_compare()
210 if (ltmp->m_apm_data[i] < rtmp->m_apm_data[i]) in m_apm_compare()
H A Dmapm_mul.c122 if ((vp = MAPM_REALLOC(r->m_apm_data, (ii + 32))) == NULL) in m_apm_multiply()
130 r->m_apm_data = (UCHAR *)vp; in m_apm_multiply()
136 cp = r->m_apm_data; in m_apm_multiply()
145 ai = (int)a->m_apm_data[--ii]; in m_apm_multiply()
149 itmp = ai * b->m_apm_data[--jj]; in m_apm_multiply()
H A Dmapmfmul.c360 if ((vp = MAPM_REALLOC(rr->m_apm_data, (k + 32))) == NULL) in M_fast_multiply()
368 rr->m_apm_data = (UCHAR *)vp; in M_fast_multiply()
373 M_fmul_div_conq(rr->m_apm_data, M_ain->m_apm_data, in M_fast_multiply()
374 M_bin->m_apm_data, ii); in M_fast_multiply()
388 M_fast_mul_fft(rr->m_apm_data, M_ain->m_apm_data, in M_fast_multiply()
389 M_bin->m_apm_data, ii); in M_fast_multiply()
395 M_fmul_div_conq(rr->m_apm_data, M_ain->m_apm_data, in M_fast_multiply()
396 M_bin->m_apm_data, ii); in M_fast_multiply()
400 M_fast_mul_fft(rr->m_apm_data, M_ain->m_apm_data, in M_fast_multiply()
401 M_bin->m_apm_data, ii); in M_fast_multiply()
H A Dmapm_set.c154 atmp->m_apm_data[ii] = 10 * ch + *p++ - '0'; in m_apm_set_long()
257 if ((vp = MAPM_REALLOC(ctmp->m_apm_data, (j + 32))) == NULL) in m_apm_set_string()
265 ctmp->m_apm_data = (UCHAR *)vp; in m_apm_set_string()
288 ctmp->m_apm_data[i] = ch; in m_apm_set_string()
289 ctmp->m_apm_data[i+1] = 0; in m_apm_set_string()
383 M_get_div_rem_10((int)ctmp->m_apm_data[index],&numdiv,&numrem); in m_apm_to_string()
H A Dmapm_fpf.c346 ucp = ctmp->m_apm_data; in m_apm_to_fixpt_string()
432 if (atmp->m_apm_data[0] >= 50) /* digit >= 5, round up */ in M_apm_round_fixpt()
435 btmp->m_apm_data[0] = 10; in M_apm_round_fixpt()
H A Dmapmistr.c116 ucp = mtmp->m_apm_data; in m_apm_to_integer_string()
/haiku/headers/libs/mapm/
H A Dm_apm.h174 UCHAR *m_apm_data; member