Lines Matching refs:mp_float_t
44 STATIC mp_obj_t math_generic_1(mp_obj_t x_obj, mp_float_t (*f)(mp_float_t)) { in math_generic_1() argument
45 mp_float_t x = mp_obj_get_float(x_obj); in math_generic_1()
46 mp_float_t ans = f(x); in math_generic_1()
53 … mp_obj_t math_generic_2(mp_obj_t x_obj, mp_obj_t y_obj, mp_float_t (*f)(mp_float_t, mp_float_t)) { in math_generic_2() argument
54 mp_float_t x = mp_obj_get_float(x_obj); in math_generic_2()
55 mp_float_t y = mp_obj_get_float(y_obj); in math_generic_2()
56 mp_float_t ans = f(x, y); in math_generic_2()
93 mp_float_t MICROPY_FLOAT_C_FUN(log2)(mp_float_t x) { in MICROPY_FLOAT_C_FUN()
102 mp_float_t pow_func(mp_float_t x, mp_float_t y) { in MATH_FUN_1()
150 mp_float_t atan2_func(mp_float_t x, mp_float_t y) { in MATH_FUN_2()
163 STATIC mp_float_t MICROPY_FLOAT_C_FUN(copysign_func)(mp_float_t x, mp_float_t y) { in MATH_FUN_2()
168 STATIC mp_float_t MICROPY_FLOAT_C_FUN(fabs_func)(mp_float_t x) { in MATH_FUN_2()
176 mp_float_t fmod_func(mp_float_t x, mp_float_t y) { in MATH_FUN_1()
214 const mp_float_t a = mp_obj_get_float(pos_args[0]); in MATH_FUN_2()
215 const mp_float_t b = mp_obj_get_float(pos_args[1]); in MATH_FUN_2()
216 const mp_float_t rel_tol = args[ARG_rel_tol].u_obj == MP_OBJ_NULL in MATH_FUN_2()
217 ? (mp_float_t)1e-9 : mp_obj_get_float(args[ARG_rel_tol].u_obj); in MATH_FUN_2()
218 const mp_float_t abs_tol = mp_obj_get_float(args[ARG_abs_tol].u_obj); in MATH_FUN_2()
219 if (rel_tol < (mp_float_t)0.0 || abs_tol < (mp_float_t)0.0) { in MATH_FUN_2()
225 const mp_float_t difference = MICROPY_FLOAT_C_FUN(fabs)(a - b); in MATH_FUN_2()
243 mp_float_t x = mp_obj_get_float(args[0]); in mp_math_log()
244 if (x <= (mp_float_t)0.0) { in mp_math_log()
247 mp_float_t l = MICROPY_FLOAT_C_FUN(log)(x); in mp_math_log()
251 mp_float_t base = mp_obj_get_float(args[1]); in mp_math_log()
252 if (base <= (mp_float_t)0.0) { in mp_math_log()
254 } else if (base == (mp_float_t)1.0) { in mp_math_log()
267 mp_float_t significand = MICROPY_FLOAT_C_FUN(frexp)(mp_obj_get_float(x_obj), &int_exponent); in mp_math_frexp()
277 mp_float_t int_part = 0.0; in mp_math_modf()
278 mp_float_t x = mp_obj_get_float(x_obj); in mp_math_modf()
279 mp_float_t fractional_part = MICROPY_FLOAT_C_FUN(modf)(x, &int_part); in mp_math_modf()