0
$\begingroup$

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

$\endgroup$

2 Answers 2

1
$\begingroup$

It could be

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

$\endgroup$
1
  • $\begingroup$ Correct! Well done $\endgroup$
    – Rohit Jose
    Commented Sep 7, 2018 at 18:34
0
$\begingroup$

I propose

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.