Transferring function from Desmos to Excel: Error due to SQRT(-ve) number

18 views Asked by At

I am interested in this function with a view to porting to C++. For the moment I am happy to explore the function in Excel: https://www.desmos.com/calculator/b0csrdelta The function pivots at two points (0,0) and (1,1) which is ideal for scaling, shifting max/min, etc.

The problem for me in Excel is that the denominator soon becomes the root of a negative number and hence an error 502 is thrown for values of x>=2. how do I get round the problem of imaginary numbers? Ric

I tried using an absolute value, but the output converges to 1 for x>=2. The value of k chosen is 2 - about midway in the range 0<k<=3.999

0

There are 0 answers