Lines Matching +full:abs +full:- +full:range
2 * Copyright 2012-15 Advanced Micro Devices, Inc.
33 #define LLONG_MIN (-LLONG_MAX - 1ll)
41 #define LLONG_MAX (-1LL>>1)
47 * represented as fixed-point numbers.
103 * result = -arg
109 res.value = -arg.value; in dc_fixpt_neg()
116 * result = abs(arg) := (arg >= 0) ? arg : -arg
229 arg.value = -arg.value; in dc_fixpt_shr()
232 arg.value = -arg.value; in dc_fixpt_shr()
249 ASSERT(((arg1.value >= 0) && (LLONG_MAX - arg1.value >= arg2.value)) || in dc_fixpt_add()
250 ((arg1.value < 0) && (LLONG_MIN - arg1.value <= arg2.value))); in dc_fixpt_add()
268 * result = arg1 - arg2
277 res.value = arg1.value - arg2.value; in dc_fixpt_sub()
284 * result = arg1 - arg2
362 * internally it's normalized to [-2pi...2pi] range.
372 * internally it's normalized to [-2pi...2pi] range.
382 * and should be in [-2pi...2pi] range -
383 * passing arguments outside that range
398 * Currently, function is verified for abs(arg) <= 1.
407 * Currently, abs(arg) should be less than 1.
424 * Currently, abs(arg1) should be less than 1. Take care!
448 unsigned long long arg_value = arg.value > 0 ? arg.value : -arg.value; in dc_fixpt_floor()
453 return -(int)(arg_value >> FIXED31_32_BITS_PER_FRACTIONAL_PART); in dc_fixpt_floor()
462 unsigned long long arg_value = arg.value > 0 ? arg.value : -arg.value; in dc_fixpt_round()
466 ASSERT(LLONG_MAX - (long long)arg_value >= summand); in dc_fixpt_round()
473 return -(int)(arg_value >> FIXED31_32_BITS_PER_FRACTIONAL_PART); in dc_fixpt_round()
482 unsigned long long arg_value = arg.value > 0 ? arg.value : -arg.value; in dc_fixpt_ceil()
484 const long long summand = dc_fixpt_one.value - in dc_fixpt_ceil()
487 ASSERT(LLONG_MAX - (long long)arg_value >= summand); in dc_fixpt_ceil()
494 return -(int)(arg_value >> FIXED31_32_BITS_PER_FRACTIONAL_PART); in dc_fixpt_ceil()
527 arg.value = -arg.value; in dc_fixpt_truncate()
528 arg.value &= (~0ULL) << (FIXED31_32_BITS_PER_FRACTIONAL_PART - frac_bits); in dc_fixpt_truncate()
530 arg.value = -arg.value; in dc_fixpt_truncate()