/haiku/src/libs/mapm/ |
H A D | mapm_sin.c | 152 M_APM tmp7, tmp8, tmp9; in M_limit_angle_to_pi() local 156 tmp9 = M_get_stack_var(); in M_limit_angle_to_pi() 157 m_apm_copy(tmp9, MM_lc_PI); in M_limit_angle_to_pi() 159 if (m_apm_compare(aa, tmp9) == 1) /* > PI */ in M_limit_angle_to_pi() 164 m_apm_add(tmp7, aa, tmp9); in M_limit_angle_to_pi() 165 m_apm_integer_divide(tmp9, tmp7, MM_lc_2_PI); in M_limit_angle_to_pi() 166 m_apm_multiply(tmp8, tmp9, MM_lc_2_PI); in M_limit_angle_to_pi() 167 m_apm_subtract(tmp9, aa, tmp8); in M_limit_angle_to_pi() 168 m_apm_round(rr, places, tmp9); in M_limit_angle_to_pi() 174 tmp9->m_apm_sign = -1; in M_limit_angle_to_pi() [all …]
|
H A D | mapm5sin.c | 64 M_APM tmp8, tmp9; in M_5x_sin() local 67 tmp9 = M_get_stack_var(); in M_5x_sin() 69 m_apm_multiply(tmp9, x, MM_5x_125R); /* 1 / (5*5*5) */ in M_5x_sin() 70 M_raw_sin(tmp8, (places + 6), tmp9); in M_5x_sin() 71 M_5x_do_it(tmp9, (places + 4), tmp8); in M_5x_sin() 72 M_5x_do_it(tmp8, (places + 4), tmp9); in M_5x_sin() 80 M_APM tmp8, tmp9; in M_4x_cos() local 83 tmp9 = M_get_stack_var(); in M_4x_cos() 92 m_apm_multiply(tmp9, x, MM_5x_256R); /* 1 / (4*4*4*4) */ in M_4x_cos() 93 M_raw_cos(tmp8, (places + 8), tmp9); in M_4x_cos() [all …]
|
H A D | mapmsqrt.c | 92 M_APM last_x, guess, tmpN, tmp7, tmp8, tmp9; in m_apm_sqrt() local 111 tmp9 = M_get_stack_var(); in m_apm_sqrt() 142 m_apm_multiply(tmp9, tmpN, guess); in m_apm_sqrt() 143 m_apm_multiply(tmp8, tmp9, guess); in m_apm_sqrt() 145 m_apm_subtract(tmp9, MM_Three, tmp7); in m_apm_sqrt() 146 m_apm_multiply(tmp8, tmp9, guess); in m_apm_sqrt() 147 m_apm_multiply(tmp9, tmp8, MM_0_5); in m_apm_sqrt() 152 m_apm_round(guess, dplaces, tmp9); in m_apm_sqrt() 184 m_apm_multiply(tmp8, tmp9, tmpN); in m_apm_sqrt()
|
H A D | mapm_pow.c | 87 M_APM tmp8, tmp9; in m_apm_pow() local 142 tmp9 = M_get_stack_var(); in m_apm_pow() 160 m_apm_round(tmp9, (places + 8), M_last_xx_log); in m_apm_pow() 164 m_apm_log(tmp9, (places + 8), xx); in m_apm_pow() 171 m_apm_copy(M_last_xx_log, tmp9); in m_apm_pow() 174 m_apm_multiply(tmp8, tmp9, yy); in m_apm_pow()
|
H A D | mapm_exp.c | 162 M_APM tmp7, tmp8, tmp9; in m_apm_exp() local 178 tmp9 = M_get_stack_var(); in m_apm_exp() 189 M_raw_exp(tmp9, (places + 6), x); in m_apm_exp() 190 m_apm_round(r, places, tmp9); in m_apm_exp() 258 m_apm_multiply(tmp9, tmp7, MM_exp_512R); in m_apm_exp() 262 M_raw_exp(tmp8, dplaces, tmp9); in m_apm_exp() 274 m_apm_multiply(tmp9, tmp8, tmp8); in m_apm_exp() 275 m_apm_round(tmp8, dplaces, tmp9); in m_apm_exp() 285 m_apm_multiply(tmp9, tmp7, tmp8); in m_apm_exp() 286 m_apm_round(r, places, tmp9); in m_apm_exp()
|
H A D | mapmcbrt.c | 57 M_APM last_x, guess, tmpN, tmp7, tmp8, tmp9; in m_apm_cbrt() local 73 tmp9 = M_get_stack_var(); in m_apm_cbrt() 111 m_apm_multiply(tmp9, tmpN, tmp8); in m_apm_cbrt() 114 m_apm_subtract(tmp7, tmp8, tmp9); in m_apm_cbrt() 144 m_apm_multiply(tmp9, guess, guess); in m_apm_cbrt() 145 m_apm_multiply(tmp8, tmp9, tmpN); in m_apm_cbrt()
|
H A D | mapm_lg3.c | 85 M_APM tmp6, tmp7, tmp8, tmp9; in M_check_log_places() local 97 tmp9 = M_get_stack_var(); in M_check_log_places() 108 M_log_AGM_R_func(tmp9, dplaces, MM_One, tmp6); in M_check_log_places() 110 m_apm_subtract(MM_lc_log2, tmp9, tmp8); /* log(2) */ in M_check_log_places() 114 M_log_AGM_R_func(tmp9, dplaces, MM_One, tmp7); in M_check_log_places() 116 m_apm_subtract(MM_lc_log10, tmp9, tmp8); /* log(10) */ in M_check_log_places()
|
H A D | mapm_log.c | 132 M_APM tmp8, tmp9; in m_apm_log10() local 135 tmp9 = M_get_stack_var(); in m_apm_log10() 140 m_apm_log(tmp9, dplaces, aa); in m_apm_log10() 141 m_apm_multiply(tmp8, tmp9, MM_lc_log10R); in m_apm_log10()
|
H A D | mapmrsin.c | 129 M_APM sum, term, tmp7, tmp8, tmp9; in M_raw_cos() local 137 tmp9 = M_get_stack_var(); in M_raw_cos() 143 m_apm_round(tmp9, (places + 6), tmp8); in M_raw_cos() 157 m_apm_multiply(tmp8, term, tmp9); in M_raw_cos()
|
H A D | mapmasin.c | 204 M_APM tmp8, tmp9; in m_apm_arctan() local 225 tmp9 = M_get_stack_var(); in m_apm_arctan() 227 m_apm_multiply(tmp9, xx, xx); in m_apm_arctan() 228 m_apm_add(tmp8, tmp9, MM_One); in m_apm_arctan() 229 m_apm_sqrt(tmp9, (places + 6), tmp8); in m_apm_arctan() 230 m_apm_divide(tmp8, (places + 6), xx, tmp9); in m_apm_arctan()
|