Page 1 of 1

Hyperbolic function in combinator

Posted: Thu Oct 01, 2020 7:12 pm
by netbrehon
I'm trying to implement hyperbolic function, that could use any input signal as an `x` parameter.

taking simple hyperbolic function: y = A / x

where y is output (`any` signal), A is just `A` signal in input, and x would be `Any` signal in input.

That would be really simple, if I could select `any` signal as an denominator in division in arithmetic combinator. But it is impossible.

Do you have any idea on workaround for this? Nothing comes to my mind honestly.

Re: Hyperbolic function in combinator

Posted: Thu Oct 01, 2020 8:48 pm
by DaveMcW
There is no workaround in the general case, besides using O(N) time or O(N) combinators.

In the special case where you have a small set of X values, you can use Y = A * (least_common_multiple / X) / least_common_multiple, with a list of precomputed (least_common_multiple / X) values.