Lines Matching full:2

22 __MATH_POS_NUMBERS :=  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 \
44 $(if $(subst $(got),,$(2))$(subst $(2),,$(got))$(MATH_TEST_ERROR), \
45 $(if $(MATH_TEST_ERROR),$(warning $(MATH_TEST_ERROR)),$(warning $$$1 '$(got)' != '$(2)')) \
55 $(if $(subst $(MATH_TEST_ERROR),,$(2))$(subst $(2),,$(MATH_TEST_ERROR)), \
56 $(warning '$(MATH_TEST_ERROR)' != '$(2)') \
67 $(if $(word 2,$(1)),$(call math-error,Multiple words in a single argument: $(1))) \
73 $(if $(word 2,$(1)),$(call math-error,Multiple words in a single argument: $(1))) \
78 $(call math-expect-true,(call math_is_number,2))
81 $(call math-expect-error,(call math_is_number,1 2),Multiple words in a single argument: 1 2)
82 $(call math-expect-error,(call math_is_number,no 2),Multiple words in a single argument: no 2)
87 $(call math-expect-error,(call math_is_zero,1 2),Multiple words in a single argument: 1 2)
88 $(call math-expect-error,(call math_is_zero,no 2),Multiple words in a single argument: no 2)
100 $(call math-expect-error,(call _math_check_valid,1 2),Multiple words in a single argument: 1 2)
102 # return a list containing integers ranging from [$(1),$(2)]
105 $(call _math_check_valid,$(1))$(call _math_check_valid,$(2)) \
107 $(wordlist $(if $(call math_is_zero,$(1)),1,$(1)),$(2),$(__MATH_POS_NUMBERS)))
112 $(call math-expect,(call int_range_list,1,2),1 2)
113 $(call math-expect,(call int_range_list,2,1),)
117 # Returns the greater of $1 or $2.
118 # If $1 or $2 is not a positive integer <= 100, then an error is generated.
120 $(strip $(call _math_check_valid,$(1)) $(call _math_check_valid,$(2)) \
121 $(lastword $(filter $(1) $(2),$(__MATH_NUMBERS))))
126 $(call math-expect-error,(call math_max,1 2,3),Multiple words in a single argument: 1 2)
134 $(if $(filter $(1),$(call math_max,$(1),$(2))),true)
138 $(if $(call math_gt_or_eq,$(2),$(1)),,true)
142 $(if $(call math_gt_or_eq,$(1),$(2)),,true)
145 $(call math-expect-true,(call math_gt_or_eq, 2, 1))
147 $(call math-expect-false,(call math_gt_or_eq, 1, 2))
163 $(call math-expect,(call inc_and_print,a),2)
168 # Returns the words in $2 that are numbers and are less than $1
171 $(foreach n,$2, \
177 $(call math-expect,(call numbers_less_than,0,0 1 2 3),)
178 $(call math-expect,(call numbers_less_than,1,0 2 1 3),0)
179 $(call math-expect,(call numbers_less_than,2,0 2 1 3),0 1)
180 $(call math-expect,(call numbers_less_than,3,0 2 1 3),0 2 1)
181 $(call math-expect,(call numbers_less_than,4,0 2 1 3),0 2 1 3)
182 $(call math-expect,(call numbers_less_than,3,0 2 1 3 2),0 2 1 2)
184 # Returns the words in $2 that are numbers and are greater or equal to $1
187 $(foreach n,$2, \
193 $(call math-expect,(call numbers_greater_or_equal_to,4,0 1 2 3),)
194 $(call math-expect,(call numbers_greater_or_equal_to,3,0 2 1 3),3)
195 $(call math-expect,(call numbers_greater_or_equal_to,2,0 2 1 3),2 3)
196 $(call math-expect,(call numbers_greater_or_equal_to,1,0 2 1 3),2 1 3)
197 $(call math-expect,(call numbers_greater_or_equal_to,0,0 2 1 3),0 2 1 3)
198 $(call math-expect,(call numbers_greater_or_equal_to,1,0 2 1 3 2),2 1 3 2)
213 $(subst xx,x,$(join $(1),$(2)))
220 $(filter-out $(words $(2)),$(words $(call _int_max,$(1),$(2))))
227 $(filter $(words $(1)),$(words $(2)))
234 $(call _int_greater-than,$(1),$(2))$(call _int_equal,$(1),$(2))
238 $(words $(call _int_encode,$(1)) $(call _int_encode,$(2)))
249 $(if $(call _int_greater-or-equal,$(call _int_encode,$(1)),$(call _int_encode,$(2))),\
250 $(words $(filter-out xx,$(join $(call _int_encode,$(1)),$(call _int_encode,$(2))))),\
251 $(call math-error,subtract underflow $(1) - $(2))))
262 $(words $(foreach a,$(call _int_encode,$(1)),$(call _int_encode,$(2))))
274 $(if $(filter 0,$(2)),$(call math-error,division by zero is not allowed!),$(strip \
275 $(if $(call _int_greater-or-equal,$(call _int_encode,$(1)),$(call _int_encode,$(2))), \
276 $(call int_plus,$(call int_divide,$(call int_subtract,$(1),$(2)),$(2)),1),0)))
282 $(call math-expect,(call int_divide,1,2),0)