-1

How could I write it in C language? I tried many things, but it seems that I cannot understand the exp and sin functions.

John Kugelman
  • 349,597
  • 67
  • 533
  • 578
Tolis P
  • 1
  • 1
  • Is there any more context to this function? It looks suspiciously like it is designed to force (severe) loss of accuracy, very roughly for |x| < 2, as there is cancellation of the constant, linear, quadratic, and cubic terms in the series expansion. – njuffa Dec 20 '20 at 00:54

1 Answers1

3

A direct implementation could be:

double y = exp(pow(sin(x),3)) + pow(x,6) - 2*pow(x,4) - pow(x,3) - 1.0;
1201ProgramAlarm
  • 32,384
  • 7
  • 42
  • 56
chux - Reinstate Monica
  • 143,097
  • 13
  • 135
  • 256