Lines Matching full:call
30 math-error = $(call pretty-error,$(1))
55 math-expect-true = $(call math-expect,$(1),true)
56 math-expect-false = $(call math-expect,$(1),)
71 $(if $(1),,$(call math-error,Argument missing)) \
72 $(if $(word 2,$(1)),$(call math-error,Multiple words in a single argument: $(1))) \
79 $(if $(1),,$(call math-error,Argument missing)) \
80 $(if $(word 2,$(1)),$(call math-error,Multiple words in a single argument: $(1))) \
89 $(strip $(if $(call math_is_number_in_100,$(1)),true,$(call _math_ext_is_number,$(1))))
94 $(if $(word 2,$(1)),$(call math-error,Multiple words in a single argument: $(1))) \
98 $(call math-expect-true,(call math_is_number,0))
99 $(call math-expect-true,(call math_is_number,2))
100 $(call math-expect-true,(call math_is_number,202412))
101 $(call math-expect-false,(call math_is_number,foo))
102 $(call math-expect-false,(call math_is_number,-1))
103 $(call math-expect-error,(call math_is_number,1 2),Multiple words in a single argument: 1 2)
104 $(call math-expect-error,(call math_is_number,no 2),Multiple words in a single argument: no 2)
106 $(call math-expect-true,(call math_is_zero,0))
107 $(call math-expect-false,(call math_is_zero,1))
108 $(call math-expect-false,(call math_is_zero,foo))
109 $(call math-expect-error,(call math_is_zero,1 2),Multiple words in a single argument: 1 2)
110 $(call math-expect-error,(call math_is_zero,no 2),Multiple words in a single argument: no 2)
113 $(if $(call math_is_number_in_100,$(1)),,$(call math-error,Only non-negative integers <= 100 are su…
116 $(call math-expect,(call _math_check_valid,0))
117 $(call math-expect,(call _math_check_valid,1))
118 $(call math-expect,(call _math_check_valid,100))
119 $(call math-expect-error,(call _math_check_valid,-1),Only non-negative integers <= 100 are supporte…
120 $(call math-expect-error,(call _math_check_valid,101),Only non-negative integers <= 100 are support…
121 $(call math-expect-error,(call _math_check_valid,),Argument missing)
122 $(call math-expect-error,(call _math_check_valid,1 2),Multiple words in a single argument: 1 2)
127 $(call _math_check_valid,$(1))$(call _math_check_valid,$(2)) \
128 $(if $(call math_is_zero,$(1)),0)\
129 $(wordlist $(if $(call math_is_zero,$(1)),1,$(1)),$(2),$(__MATH_POS_NUMBERS)))
132 $(call math-expect,(call int_range_list,0,1),0 1)
133 $(call math-expect,(call int_range_list,1,1),1)
134 $(call math-expect,(call int_range_list,1,2),1 2)
135 $(call math-expect,(call int_range_list,2,1),)
136 $(call math-expect-error,(call int_range_list,1,101),Only non-negative integers <= 100 are supporte…
141 $(if $(call _math_ext_is_number,$(1)),,\
142 $(call math-error,Only non-negative integers are supported (not $(1)))) \
147 … $(call math-error,Only non-negative integers with less than 9 digits are supported (not $(1)))) \
149 $(call math-error,Only non-negative integers without leading zeros are supported (not $(1)))) \
153 $(call math-expect,(call _math_number_to_list,123),1 2 3)
154 $(call math-expect-error,(call _math_number_to_list,123 456),Multiple words in a single argument: 1…
155 $(call math-expect-error,(call _math_number_to_list,-123),Only non-negative integers are supported …
156 $(call math-expect-error,(call _math_number_to_list,002),Only non-negative integers without leading…
157 $(call math-expect-error,(call _math_number_to_list,1234567890),Only non-negative integers with les…
167 $(call math-expect,(call _math_1digit_comp,1,1))
168 $(call math-expect,(call _math_1digit_comp,0,9),-1)
169 $(call math-expect,(call _math_1digit_comp,3,1),1)
176 $(foreach num,$(call int_range_list,1,$(3)),\
177 $(if $(ans),,$(eval ans:=$(call _math_1digit_comp,$(word $(num),$(1)),$(word $(num),$(2)))))) \
185 $(eval num_list1:=$(call _math_number_to_list,$(1))) \
187 $(eval num_list2:=$(call _math_number_to_list,$(2))) \
189 $(eval comp:=$(call _math_1digit_comp,$(len1),$(len2))) \
190 $(if $(comp),$(comp),$(call _math_list_comp,$(num_list1),$(num_list2),$(len1))))
193 $(call math-expect,(call _math_ext_comp,5,10),-1)
194 $(call math-expect,(call _math_ext_comp,12345,12345))
195 $(call math-expect,(call _math_ext_comp,500,5),1)
196 $(call math-expect,(call _math_ext_comp,202404,202504),-1)
202 $(if $(filter truetrue,$(call math_is_number_in_100,$(1))$(call math_is_number_in_100,$(2))),\
204 $(if $(filter 1,$(call _math_ext_comp,$(1),$(2))),$(1),$(2))))
210 $(if $(filter truetrue,$(call math_is_number_in_100,$(1))$(call math_is_number_in_100,$(2))),\
212 $(if $(filter -1,$(call _math_ext_comp,$(1),$(2))),$(1),$(2))))
215 $(call math-expect-error,(call math_max),Argument missing)
216 $(call math-expect-error,(call math_max,1),Argument missing)
217 $(call math-expect-error,(call math_max,1 2,3),Multiple words in a single argument: 1 2)
218 $(call math-expect-error,(call math_min,1,2 3),Multiple words in a single argument: 2 3)
219 $(call math-expect,(call math_max,0,1),1)
220 $(call math-expect,(call math_max,1,0),1)
221 $(call math-expect,(call math_max,1,1),1)
222 $(call math-expect,(call math_max,5,42),42)
223 $(call math-expect,(call math_max,42,5),42)
224 $(call math-expect,(call math_min,0,1),0)
225 $(call math-expect,(call math_min,1,0),0)
226 $(call math-expect,(call math_min,1,1),1)
227 $(call math-expect,(call math_min,7,32),7)
228 $(call math-expect,(call math_min,32,7),7)
230 $(call math-expect,(call math_max,32759,7),32759)
231 $(call math-expect,(call math_max,7,32759),32759)
232 $(call math-expect,(call math_max,202404,202505),202505)
233 $(call math-expect,(call math_max,202404,202404),202404)
234 $(call math-expect,(call math_min,8908527,32),32)
235 $(call math-expect,(call math_min,32,8908527),32)
236 $(call math-expect,(call math_min,202404,202505),202404)
237 $(call math-expect,(call math_min,202404,202404),202404)
240 $(if $(filter $(1),$(call math_max,$(1),$(2))),true)
244 $(if $(call math_gt_or_eq,$(2),$(1)),,true)
248 $(if $(call math_gt_or_eq,$(2),$(1)),true)
252 $(if $(call math_gt_or_eq,$(1),$(2)),,true)
255 $(call math-expect-true,(call math_gt_or_eq, 2, 1))
256 $(call math-expect-true,(call math_gt_or_eq, 1, 1))
257 $(call math-expect-false,(call math_gt_or_eq, 1, 2))
258 $(call math-expect-true,(call math_gt, 4, 3))
259 $(call math-expect-false,(call math_gt, 5, 5))
260 $(call math-expect-false,(call math_gt, 6, 7))
261 $(call math-expect-true,(call math_lt_or_eq, 11, 11))
262 $(call math-expect-false,(call math_lt_or_eq, 25, 15))
263 $(call math-expect-true,(call math_lt_or_eq, 9, 16))
264 $(call math-expect-false,(call math_lt, 1, 0))
265 $(call math-expect-false,(call math_lt, 8, 8))
266 $(call math-expect-true,(call math_lt, 10, 11))
268 $(call math-expect-true,(call math_gt_or_eq, 2573904, 2573900))
269 $(call math-expect-true,(call math_gt_or_eq, 12345, 12345))
270 $(call math-expect-false,(call math_gt_or_eq, 56, 2780))
279 $(call math-expect,(call inc_and_print,a),1)
280 $(call math-expect,(call inc_and_print,a),2)
281 $(call math-expect,(call inc_and_print,a),3)
282 $(call math-expect,(call inc_and_print,a),4)
289 $(if $(call math_is_number,$(n)), \
290 $(if $(call math_lt,$(n),$(1)), \
294 $(call math-expect,(call numbers_less_than,0,0 1 2 3),)
295 $(call math-expect,(call numbers_less_than,1,0 2 1 3),0)
296 $(call math-expect,(call numbers_less_than,2,0 2 1 3),0 1)
297 $(call math-expect,(call numbers_less_than,3,0 2 1 3),0 2 1)
298 $(call math-expect,(call numbers_less_than,4,0 2 1 3),0 2 1 3)
299 $(call math-expect,(call numbers_less_than,3,0 2 1 3 2),0 2 1 2)
300 $(call math-expect,(call numbers_less_than,100,0 1000 50 101 100),0 50)
306 $(if $(call math_is_number,$(n)), \
307 $(if $(call math_gt_or_eq,$(n),$(1)), \
311 $(call math-expect,(call numbers_greater_or_equal_to,4,0 1 2 3),)
312 $(call math-expect,(call numbers_greater_or_equal_to,3,0 2 1 3),3)
313 $(call math-expect,(call numbers_greater_or_equal_to,2,0 2 1 3),2 3)
314 $(call math-expect,(call numbers_greater_or_equal_to,1,0 2 1 3),2 1 3)
315 $(call math-expect,(call numbers_greater_or_equal_to,0,0 2 1 3),0 2 1 3)
316 $(call math-expect,(call numbers_greater_or_equal_to,1,0 2 1 3 2),2 1 3 2)
324 $(call math-error,integer greater than $(words $(_INT_LIMIT_WORDS)) is not supported!),\
339 $(filter-out $(words $(2)),$(words $(call _int_max,$(1),$(2))))
353 $(call _int_greater-than,$(1),$(2))$(call _int_equal,$(1),$(2))
357 $(words $(call _int_encode,$(1)) $(call _int_encode,$(2)))
360 $(call math-expect,(call int_plus,0,0),0)
361 $(call math-expect,(call int_plus,0,1),1)
362 $(call math-expect,(call int_plus,1,0),1)
363 $(call math-expect,(call int_plus,1,100),101)
364 $(call math-expect,(call int_plus,100,100),200)
368 $(if $(call _int_greater-or-equal,$(call _int_encode,$(1)),$(call _int_encode,$(2))),\
369 $(words $(filter-out xx,$(join $(call _int_encode,$(1)),$(call _int_encode,$(2))))),\
370 $(call math-error,subtract underflow $(1) - $(2))))
373 $(call math-expect,(call int_subtract,0,0),0)
374 $(call math-expect,(call int_subtract,1,0),1)
375 $(call math-expect,(call int_subtract,1,1),0)
376 $(call math-expect,(call int_subtract,100,1),99)
377 $(call math-expect,(call int_subtract,200,100),100)
378 $(call math-expect-error,(call int_subtract,0,1),subtract underflow 0 - 1)
381 $(words $(foreach a,$(call _int_encode,$(1)),$(call _int_encode,$(2))))
384 $(call math-expect,(call int_multiply,0,0),0)
385 $(call math-expect,(call int_multiply,1,0),0)
386 $(call math-expect,(call int_multiply,1,1),1)
387 $(call math-expect,(call int_multiply,100,1),100)
388 $(call math-expect,(call int_multiply,1,100),100)
389 $(call math-expect,(call int_multiply,4,100),400)
390 $(call math-expect,(call int_multiply,100,4),400)
393 $(if $(filter 0,$(2)),$(call math-error,division by zero is not allowed!),$(strip \
394 $(if $(call _int_greater-or-equal,$(call _int_encode,$(1)),$(call _int_encode,$(2))), \
395 $(call int_plus,$(call int_divide,$(call int_subtract,$(1),$(2)),$(2)),1),0)))
398 $(call math-expect,(call int_divide,1,1),1)
399 $(call math-expect,(call int_divide,200,1),200)
400 $(call math-expect,(call int_divide,200,3),66)
401 $(call math-expect,(call int_divide,1,2),0)
402 $(call math-expect-error,(call int_divide,0,0),division by zero is not allowed!)
403 $(call math-expect-error,(call int_divide,1,0),division by zero is not allowed!)