Hi,
My question is closely related to this topic.
I have a custom function defined in functions
as follows:
int calculate_K(int a, int b, int m) {
return to_int(floor((a + b) / m));
}
I would like to make sure that this returns an integer. I tried adding to_int()
but it results in the following error:
A returning function was expected but an undeclared identifier ‘to_int’ was supplied.
How do I make sure that this returns an integer. I need as input in another custom defined function where I use
int binom_coeff_a = choose(K / 2 * m, x);
Thanks