Lines Matching refs:arg1
143 * result = arg1 < arg2
145 static inline bool dc_fixpt_lt(struct fixed31_32 arg1, struct fixed31_32 arg2)
147 return arg1.value < arg2.value;
152 * result = arg1 <= arg2
154 static inline bool dc_fixpt_le(struct fixed31_32 arg1, struct fixed31_32 arg2)
156 return arg1.value <= arg2.value;
161 * result = arg1 == arg2
163 static inline bool dc_fixpt_eq(struct fixed31_32 arg1, struct fixed31_32 arg2)
165 return arg1.value == arg2.value;
170 * result = min(arg1, arg2) := (arg1 <= arg2) ? arg1 : arg2
172 static inline struct fixed31_32 dc_fixpt_min(struct fixed31_32 arg1, struct fixed31_32 arg2)
174 if (arg1.value <= arg2.value)
175 return arg1;
182 * result = max(arg1, arg2) := (arg1 <= arg2) ? arg2 : arg1
184 static inline struct fixed31_32 dc_fixpt_max(struct fixed31_32 arg1, struct fixed31_32 arg2)
186 if (arg1.value <= arg2.value)
189 return arg1;
253 * result = arg1 + arg2
255 static inline struct fixed31_32 dc_fixpt_add(struct fixed31_32 arg1, struct fixed31_32 arg2)
259 ASSERT(((arg1.value >= 0) && (LLONG_MAX - arg1.value >= arg2.value)) ||
260 ((arg1.value < 0) && (LLONG_MIN - arg1.value <= arg2.value)));
262 res.value = arg1.value + arg2.value;
269 * result = arg1 + arg2
271 static inline struct fixed31_32 dc_fixpt_add_int(struct fixed31_32 arg1, int arg2)
273 return dc_fixpt_add(arg1, dc_fixpt_from_int(arg2));
278 * result = arg1 - arg2
280 static inline struct fixed31_32 dc_fixpt_sub(struct fixed31_32 arg1, struct fixed31_32 arg2)
284 ASSERT(((arg2.value >= 0) && (LLONG_MIN + arg2.value <= arg1.value)) ||
285 ((arg2.value < 0) && (LLONG_MAX + arg2.value >= arg1.value)));
287 res.value = arg1.value - arg2.value;
294 * result = arg1 - arg2
296 static inline struct fixed31_32 dc_fixpt_sub_int(struct fixed31_32 arg1, int arg2)
298 return dc_fixpt_sub(arg1, dc_fixpt_from_int(arg2));
309 * result = arg1 * arg2
311 struct fixed31_32 dc_fixpt_mul(struct fixed31_32 arg1, struct fixed31_32 arg2);
316 * result = arg1 * arg2
318 static inline struct fixed31_32 dc_fixpt_mul_int(struct fixed31_32 arg1, int arg2)
320 return dc_fixpt_mul(arg1, dc_fixpt_from_int(arg2));
331 * result = arg1 / arg2
333 static inline struct fixed31_32 dc_fixpt_div_int(struct fixed31_32 arg1, long long arg2)
335 return dc_fixpt_from_fraction(arg1.value, dc_fixpt_from_int(arg2).value);
340 * result = arg1 / arg2
342 static inline struct fixed31_32 dc_fixpt_div(struct fixed31_32 arg1, struct fixed31_32 arg2)
344 return dc_fixpt_from_fraction(arg1.value, arg2.value);
431 * result = pow(arg1, arg2)
434 * Currently, abs(arg1) should be less than 1. Take care!
436 static inline struct fixed31_32 dc_fixpt_pow(struct fixed31_32 arg1, struct fixed31_32 arg2)
440 dc_fixpt_log(arg1),