Hello CWORLD... and mainly to those who follow the challenge...

Here I send the Judge solution that I used to rate the participants of Challenge008. I also want to say that none of them solved the problem exactly, to check it you can compile this judge solution and compare it with the participants' solutions. But since there had to be a winner, the solution with the highest score has won.

THE JUDGE SOLUTION:

As we always enter discrete values, that is, a point outside the domain of the function will never be entered, since singularities are irrational numbers, the following function equivalences can be established:

Based on the trigonometric identity: sin(2*u) = 2*sin(u)*cos(u);

The function f(x) could be rewritten as follows:

f(x) = { sin(x)*cos(x/2) , x<0
cos(x)*sin(x/2) , 0<=x<2
exp(x)*tan(x/2) , x>2 }

It is also observed that x=2 does not belong to the domain and obviously a warning message should be returned, this I left to the discretion of the participant.

Any suggestions or questions can be sent to my email...

Regards

       o  o Jose Luis De la Cruz Lazaro   o   220KV of Chaos
     o       o  Visit my homepage:          o      o
   o    o o    o THE WORLD OF CHAOS           o   o o
  o   o  o     o   https://www.theworldofchaos.com   o  o
  o    o     o                                   o    o  o
   o     o o     Chaos = Chaos & math ? C++ : ++C;        o
     o                                                     o
        o  o  o o o  FRACTALS UNLIMITED ooo o  o  o  o  o   o
                    o  o   o   o   o   o
     o               o   o   o   o   o
   o   o      o
 o      o   o  o  o  o  o o oooo      Yacsha Software & Desing
                                 O  O  o ooo Lima - Peru ooo o o O  O


