# A maths function

I am using a function, and the outputs are below. What function am I using?

function($0+0$) = 0

function($73942856-628529469252$) = -1

function($1 + 1$) = 1

function($1+2$) = 1

function($528^0$) = 1

It could be

The $sign$ function, which maps positive values to 1, negative values to -1, and 0 to 0.

• Correct! Well done – Rohit Jose Sep 7 '18 at 18:34

I propose

$$f(x) = 0.09388 + 0.62997atan(x) - 0.09388cos(x) + 0.186498sin(x)$$

• Good try, but the question has already been answered – Rohit Jose Sep 7 '18 at 19:11
• Oh my... this answer, I swear, hahah. Just a quick question: by $\rm atan$${}$$(x)$ do you mean $\rm arctan$${}$$(x)$? :P – Mr Pie Sep 7 '18 at 21:39
• @user477343 yep – mrfish Sep 11 '18 at 18:13
• Thanks for the clarification. To be honest, I sometimes can't be bothered writing $\arctan$,so I quite prefer $\rm atan$ :P – Mr Pie Sep 11 '18 at 21:21