?

Average Accuracy: 55.8% → 95.8%
Time: 16.8s
Precision: binary64
Cost: 13704

?

\[ \begin{array}{c}[c, s] = \mathsf{sort}([c, s])\\ \end{array} \]
\[\frac{\cos \left(2 \cdot x\right)}{{c}^{2} \cdot \left(\left(x \cdot {s}^{2}\right) \cdot x\right)} \]
\[\begin{array}{l} t_0 := \cos \left(x + x\right)\\ \mathbf{if}\;s \leq 3.7 \cdot 10^{-140}:\\ \;\;\;\;\frac{t_0}{x \cdot \left(s \cdot c\right)} \cdot \frac{\frac{1}{s \cdot c}}{x}\\ \mathbf{elif}\;s \leq 6 \cdot 10^{+221}:\\ \;\;\;\;t_0 \cdot {\left(s \cdot \left(x \cdot c\right)\right)}^{-2}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{s \cdot x}{\frac{\frac{\frac{1}{c}}{s \cdot x}}{c}}}\\ \end{array} \]
(FPCore (x c s)
 :precision binary64
 (/ (cos (* 2.0 x)) (* (pow c 2.0) (* (* x (pow s 2.0)) x))))
(FPCore (x c s)
 :precision binary64
 (let* ((t_0 (cos (+ x x))))
   (if (<= s 3.7e-140)
     (* (/ t_0 (* x (* s c))) (/ (/ 1.0 (* s c)) x))
     (if (<= s 6e+221)
       (* t_0 (pow (* s (* x c)) -2.0))
       (/ 1.0 (/ (* s x) (/ (/ (/ 1.0 c) (* s x)) c)))))))
double code(double x, double c, double s) {
	return cos((2.0 * x)) / (pow(c, 2.0) * ((x * pow(s, 2.0)) * x));
}
double code(double x, double c, double s) {
	double t_0 = cos((x + x));
	double tmp;
	if (s <= 3.7e-140) {
		tmp = (t_0 / (x * (s * c))) * ((1.0 / (s * c)) / x);
	} else if (s <= 6e+221) {
		tmp = t_0 * pow((s * (x * c)), -2.0);
	} else {
		tmp = 1.0 / ((s * x) / (((1.0 / c) / (s * x)) / c));
	}
	return tmp;
}
real(8) function code(x, c, s)
    real(8), intent (in) :: x
    real(8), intent (in) :: c
    real(8), intent (in) :: s
    code = cos((2.0d0 * x)) / ((c ** 2.0d0) * ((x * (s ** 2.0d0)) * x))
end function
real(8) function code(x, c, s)
    real(8), intent (in) :: x
    real(8), intent (in) :: c
    real(8), intent (in) :: s
    real(8) :: t_0
    real(8) :: tmp
    t_0 = cos((x + x))
    if (s <= 3.7d-140) then
        tmp = (t_0 / (x * (s * c))) * ((1.0d0 / (s * c)) / x)
    else if (s <= 6d+221) then
        tmp = t_0 * ((s * (x * c)) ** (-2.0d0))
    else
        tmp = 1.0d0 / ((s * x) / (((1.0d0 / c) / (s * x)) / c))
    end if
    code = tmp
end function
public static double code(double x, double c, double s) {
	return Math.cos((2.0 * x)) / (Math.pow(c, 2.0) * ((x * Math.pow(s, 2.0)) * x));
}
public static double code(double x, double c, double s) {
	double t_0 = Math.cos((x + x));
	double tmp;
	if (s <= 3.7e-140) {
		tmp = (t_0 / (x * (s * c))) * ((1.0 / (s * c)) / x);
	} else if (s <= 6e+221) {
		tmp = t_0 * Math.pow((s * (x * c)), -2.0);
	} else {
		tmp = 1.0 / ((s * x) / (((1.0 / c) / (s * x)) / c));
	}
	return tmp;
}
def code(x, c, s):
	return math.cos((2.0 * x)) / (math.pow(c, 2.0) * ((x * math.pow(s, 2.0)) * x))
def code(x, c, s):
	t_0 = math.cos((x + x))
	tmp = 0
	if s <= 3.7e-140:
		tmp = (t_0 / (x * (s * c))) * ((1.0 / (s * c)) / x)
	elif s <= 6e+221:
		tmp = t_0 * math.pow((s * (x * c)), -2.0)
	else:
		tmp = 1.0 / ((s * x) / (((1.0 / c) / (s * x)) / c))
	return tmp
function code(x, c, s)
	return Float64(cos(Float64(2.0 * x)) / Float64((c ^ 2.0) * Float64(Float64(x * (s ^ 2.0)) * x)))
end
function code(x, c, s)
	t_0 = cos(Float64(x + x))
	tmp = 0.0
	if (s <= 3.7e-140)
		tmp = Float64(Float64(t_0 / Float64(x * Float64(s * c))) * Float64(Float64(1.0 / Float64(s * c)) / x));
	elseif (s <= 6e+221)
		tmp = Float64(t_0 * (Float64(s * Float64(x * c)) ^ -2.0));
	else
		tmp = Float64(1.0 / Float64(Float64(s * x) / Float64(Float64(Float64(1.0 / c) / Float64(s * x)) / c)));
	end
	return tmp
end
function tmp = code(x, c, s)
	tmp = cos((2.0 * x)) / ((c ^ 2.0) * ((x * (s ^ 2.0)) * x));
end
function tmp_2 = code(x, c, s)
	t_0 = cos((x + x));
	tmp = 0.0;
	if (s <= 3.7e-140)
		tmp = (t_0 / (x * (s * c))) * ((1.0 / (s * c)) / x);
	elseif (s <= 6e+221)
		tmp = t_0 * ((s * (x * c)) ^ -2.0);
	else
		tmp = 1.0 / ((s * x) / (((1.0 / c) / (s * x)) / c));
	end
	tmp_2 = tmp;
end
code[x_, c_, s_] := N[(N[Cos[N[(2.0 * x), $MachinePrecision]], $MachinePrecision] / N[(N[Power[c, 2.0], $MachinePrecision] * N[(N[(x * N[Power[s, 2.0], $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, c_, s_] := Block[{t$95$0 = N[Cos[N[(x + x), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[s, 3.7e-140], N[(N[(t$95$0 / N[(x * N[(s * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 / N[(s * c), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[s, 6e+221], N[(t$95$0 * N[Power[N[(s * N[(x * c), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(s * x), $MachinePrecision] / N[(N[(N[(1.0 / c), $MachinePrecision] / N[(s * x), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\frac{\cos \left(2 \cdot x\right)}{{c}^{2} \cdot \left(\left(x \cdot {s}^{2}\right) \cdot x\right)}
\begin{array}{l}
t_0 := \cos \left(x + x\right)\\
\mathbf{if}\;s \leq 3.7 \cdot 10^{-140}:\\
\;\;\;\;\frac{t_0}{x \cdot \left(s \cdot c\right)} \cdot \frac{\frac{1}{s \cdot c}}{x}\\

\mathbf{elif}\;s \leq 6 \cdot 10^{+221}:\\
\;\;\;\;t_0 \cdot {\left(s \cdot \left(x \cdot c\right)\right)}^{-2}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{s \cdot x}{\frac{\frac{\frac{1}{c}}{s \cdot x}}{c}}}\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 3 regimes
  2. if s < 3.69999999999999977e-140

    1. Initial program 45.2%

      \[\frac{\cos \left(2 \cdot x\right)}{{c}^{2} \cdot \left(\left(x \cdot {s}^{2}\right) \cdot x\right)} \]
    2. Simplified94.3%

      \[\leadsto \color{blue}{\frac{\cos \left(2 \cdot x\right)}{\left(x \cdot \left(c \cdot s\right)\right) \cdot \left(x \cdot \left(c \cdot s\right)\right)}} \]
      Proof

      [Start]45.2

      \[ \frac{\cos \left(2 \cdot x\right)}{{c}^{2} \cdot \left(\left(x \cdot {s}^{2}\right) \cdot x\right)} \]

      *-commutative [=>]45.2

      \[ \frac{\cos \left(2 \cdot x\right)}{{c}^{2} \cdot \left(\color{blue}{\left({s}^{2} \cdot x\right)} \cdot x\right)} \]

      associate-*l* [=>]39.9

      \[ \frac{\cos \left(2 \cdot x\right)}{{c}^{2} \cdot \color{blue}{\left({s}^{2} \cdot \left(x \cdot x\right)\right)}} \]

      associate-*r* [=>]39.6

      \[ \frac{\cos \left(2 \cdot x\right)}{\color{blue}{\left({c}^{2} \cdot {s}^{2}\right) \cdot \left(x \cdot x\right)}} \]

      *-commutative [=>]39.6

      \[ \frac{\cos \left(2 \cdot x\right)}{\color{blue}{\left(x \cdot x\right) \cdot \left({c}^{2} \cdot {s}^{2}\right)}} \]

      unpow2 [=>]39.6

      \[ \frac{\cos \left(2 \cdot x\right)}{\left(x \cdot x\right) \cdot \left(\color{blue}{\left(c \cdot c\right)} \cdot {s}^{2}\right)} \]

      unpow2 [=>]39.6

      \[ \frac{\cos \left(2 \cdot x\right)}{\left(x \cdot x\right) \cdot \left(\left(c \cdot c\right) \cdot \color{blue}{\left(s \cdot s\right)}\right)} \]

      unswap-sqr [=>]66.6

      \[ \frac{\cos \left(2 \cdot x\right)}{\left(x \cdot x\right) \cdot \color{blue}{\left(\left(c \cdot s\right) \cdot \left(c \cdot s\right)\right)}} \]

      unswap-sqr [=>]94.3

      \[ \frac{\cos \left(2 \cdot x\right)}{\color{blue}{\left(x \cdot \left(c \cdot s\right)\right) \cdot \left(x \cdot \left(c \cdot s\right)\right)}} \]
    3. Applied egg-rr94.7%

      \[\leadsto \color{blue}{\frac{\cos \left(x + x\right)}{x \cdot \left(c \cdot s\right)} \cdot \frac{1}{x \cdot \left(c \cdot s\right)}} \]
    4. Applied egg-rr94.1%

      \[\leadsto \frac{\cos \left(x + x\right)}{x \cdot \left(c \cdot s\right)} \cdot \color{blue}{\left(\frac{1}{c \cdot s} \cdot \frac{1}{x}\right)} \]
    5. Applied egg-rr94.2%

      \[\leadsto \frac{\cos \left(x + x\right)}{x \cdot \left(c \cdot s\right)} \cdot \color{blue}{\frac{\frac{1}{c \cdot s}}{x}} \]

    if 3.69999999999999977e-140 < s < 6.0000000000000003e221

    1. Initial program 60.5%

      \[\frac{\cos \left(2 \cdot x\right)}{{c}^{2} \cdot \left(\left(x \cdot {s}^{2}\right) \cdot x\right)} \]
    2. Simplified96.0%

      \[\leadsto \color{blue}{\frac{\cos \left(2 \cdot x\right)}{\left(x \cdot \left(c \cdot s\right)\right) \cdot \left(x \cdot \left(c \cdot s\right)\right)}} \]
      Proof

      [Start]60.5

      \[ \frac{\cos \left(2 \cdot x\right)}{{c}^{2} \cdot \left(\left(x \cdot {s}^{2}\right) \cdot x\right)} \]

      *-commutative [=>]60.5

      \[ \frac{\cos \left(2 \cdot x\right)}{{c}^{2} \cdot \left(\color{blue}{\left({s}^{2} \cdot x\right)} \cdot x\right)} \]

      associate-*l* [=>]54.5

      \[ \frac{\cos \left(2 \cdot x\right)}{{c}^{2} \cdot \color{blue}{\left({s}^{2} \cdot \left(x \cdot x\right)\right)}} \]

      associate-*r* [=>]54.0

      \[ \frac{\cos \left(2 \cdot x\right)}{\color{blue}{\left({c}^{2} \cdot {s}^{2}\right) \cdot \left(x \cdot x\right)}} \]

      *-commutative [=>]54.0

      \[ \frac{\cos \left(2 \cdot x\right)}{\color{blue}{\left(x \cdot x\right) \cdot \left({c}^{2} \cdot {s}^{2}\right)}} \]

      unpow2 [=>]54.0

      \[ \frac{\cos \left(2 \cdot x\right)}{\left(x \cdot x\right) \cdot \left(\color{blue}{\left(c \cdot c\right)} \cdot {s}^{2}\right)} \]

      unpow2 [=>]54.0

      \[ \frac{\cos \left(2 \cdot x\right)}{\left(x \cdot x\right) \cdot \left(\left(c \cdot c\right) \cdot \color{blue}{\left(s \cdot s\right)}\right)} \]

      unswap-sqr [=>]66.8

      \[ \frac{\cos \left(2 \cdot x\right)}{\left(x \cdot x\right) \cdot \color{blue}{\left(\left(c \cdot s\right) \cdot \left(c \cdot s\right)\right)}} \]

      unswap-sqr [=>]96.0

      \[ \frac{\cos \left(2 \cdot x\right)}{\color{blue}{\left(x \cdot \left(c \cdot s\right)\right) \cdot \left(x \cdot \left(c \cdot s\right)\right)}} \]
    3. Taylor expanded in x around inf 54.5%

      \[\leadsto \color{blue}{\frac{\cos \left(2 \cdot x\right)}{{c}^{2} \cdot \left({s}^{2} \cdot {x}^{2}\right)}} \]
    4. Simplified98.7%

      \[\leadsto \color{blue}{\cos \left(x + x\right) \cdot {\left(s \cdot \left(c \cdot x\right)\right)}^{-2}} \]
      Proof

      [Start]54.5

      \[ \frac{\cos \left(2 \cdot x\right)}{{c}^{2} \cdot \left({s}^{2} \cdot {x}^{2}\right)} \]

      count-2 [<=]54.5

      \[ \frac{\cos \color{blue}{\left(x + x\right)}}{{c}^{2} \cdot \left({s}^{2} \cdot {x}^{2}\right)} \]

      associate-*r* [=>]54.0

      \[ \frac{\cos \left(x + x\right)}{\color{blue}{\left({c}^{2} \cdot {s}^{2}\right) \cdot {x}^{2}}} \]

      unpow2 [=>]54.0

      \[ \frac{\cos \left(x + x\right)}{\left({c}^{2} \cdot {s}^{2}\right) \cdot \color{blue}{\left(x \cdot x\right)}} \]

      associate-/r* [=>]54.1

      \[ \color{blue}{\frac{\frac{\cos \left(x + x\right)}{{c}^{2} \cdot {s}^{2}}}{x \cdot x}} \]

      unpow2 [=>]54.1

      \[ \frac{\frac{\cos \left(x + x\right)}{\color{blue}{\left(c \cdot c\right)} \cdot {s}^{2}}}{x \cdot x} \]

      unpow2 [=>]54.1

      \[ \frac{\frac{\cos \left(x + x\right)}{\left(c \cdot c\right) \cdot \color{blue}{\left(s \cdot s\right)}}}{x \cdot x} \]

      swap-sqr [<=]66.8

      \[ \frac{\frac{\cos \left(x + x\right)}{\color{blue}{\left(c \cdot s\right) \cdot \left(c \cdot s\right)}}}{x \cdot x} \]

      unpow2 [<=]66.8

      \[ \frac{\frac{\cos \left(x + x\right)}{\color{blue}{{\left(c \cdot s\right)}^{2}}}}{x \cdot x} \]

      *-lft-identity [<=]66.8

      \[ \frac{\color{blue}{1 \cdot \frac{\cos \left(x + x\right)}{{\left(c \cdot s\right)}^{2}}}}{x \cdot x} \]

      associate-*l/ [<=]66.4

      \[ \color{blue}{\frac{1}{x \cdot x} \cdot \frac{\cos \left(x + x\right)}{{\left(c \cdot s\right)}^{2}}} \]

      unpow2 [=>]66.4

      \[ \frac{1}{x \cdot x} \cdot \frac{\cos \left(x + x\right)}{\color{blue}{\left(c \cdot s\right) \cdot \left(c \cdot s\right)}} \]

      associate-/r* [=>]66.6

      \[ \frac{1}{x \cdot x} \cdot \color{blue}{\frac{\frac{\cos \left(x + x\right)}{c \cdot s}}{c \cdot s}} \]

      times-frac [<=]74.2

      \[ \color{blue}{\frac{1 \cdot \frac{\cos \left(x + x\right)}{c \cdot s}}{\left(x \cdot x\right) \cdot \left(c \cdot s\right)}} \]

      *-commutative [<=]74.2

      \[ \frac{1 \cdot \frac{\cos \left(x + x\right)}{c \cdot s}}{\color{blue}{\left(c \cdot s\right) \cdot \left(x \cdot x\right)}} \]

      associate-*r* [=>]89.6

      \[ \frac{1 \cdot \frac{\cos \left(x + x\right)}{c \cdot s}}{\color{blue}{\left(\left(c \cdot s\right) \cdot x\right) \cdot x}} \]

      *-commutative [<=]89.6

      \[ \frac{1 \cdot \frac{\cos \left(x + x\right)}{c \cdot s}}{\color{blue}{\left(x \cdot \left(c \cdot s\right)\right)} \cdot x} \]

    if 6.0000000000000003e221 < s

    1. Initial program 62.1%

      \[\frac{\cos \left(2 \cdot x\right)}{{c}^{2} \cdot \left(\left(x \cdot {s}^{2}\right) \cdot x\right)} \]
    2. Simplified62.1%

      \[\leadsto \color{blue}{\frac{\cos \left(2 \cdot x\right)}{\left(\left(c \cdot c\right) \cdot \left(x \cdot \left(s \cdot s\right)\right)\right) \cdot x}} \]
      Proof

      [Start]62.1

      \[ \frac{\cos \left(2 \cdot x\right)}{{c}^{2} \cdot \left(\left(x \cdot {s}^{2}\right) \cdot x\right)} \]

      associate-*r* [=>]62.1

      \[ \frac{\cos \left(2 \cdot x\right)}{\color{blue}{\left({c}^{2} \cdot \left(x \cdot {s}^{2}\right)\right) \cdot x}} \]

      unpow2 [=>]62.1

      \[ \frac{\cos \left(2 \cdot x\right)}{\left(\color{blue}{\left(c \cdot c\right)} \cdot \left(x \cdot {s}^{2}\right)\right) \cdot x} \]

      unpow2 [=>]62.1

      \[ \frac{\cos \left(2 \cdot x\right)}{\left(\left(c \cdot c\right) \cdot \left(x \cdot \color{blue}{\left(s \cdot s\right)}\right)\right) \cdot x} \]
    3. Taylor expanded in x around 0 53.8%

      \[\leadsto \color{blue}{\frac{1}{{s}^{2} \cdot \left({c}^{2} \cdot {x}^{2}\right)}} \]
    4. Simplified68.3%

      \[\leadsto \color{blue}{\frac{1}{\left(c \cdot c\right) \cdot \left(x \cdot \left(s \cdot \left(s \cdot x\right)\right)\right)}} \]
      Proof

      [Start]53.8

      \[ \frac{1}{{s}^{2} \cdot \left({c}^{2} \cdot {x}^{2}\right)} \]

      associate-*r* [=>]54.0

      \[ \frac{1}{\color{blue}{\left({s}^{2} \cdot {c}^{2}\right) \cdot {x}^{2}}} \]

      *-commutative [<=]54.0

      \[ \frac{1}{\color{blue}{\left({c}^{2} \cdot {s}^{2}\right)} \cdot {x}^{2}} \]

      associate-*r* [<=]54.0

      \[ \frac{1}{\color{blue}{{c}^{2} \cdot \left({s}^{2} \cdot {x}^{2}\right)}} \]

      unpow2 [=>]54.0

      \[ \frac{1}{\color{blue}{\left(c \cdot c\right)} \cdot \left({s}^{2} \cdot {x}^{2}\right)} \]

      sqr-pow [=>]54.0

      \[ \frac{1}{\left(c \cdot c\right) \cdot \left(\color{blue}{\left({s}^{\left(\frac{2}{2}\right)} \cdot {s}^{\left(\frac{2}{2}\right)}\right)} \cdot {x}^{2}\right)} \]

      unpow2 [=>]54.0

      \[ \frac{1}{\left(c \cdot c\right) \cdot \left(\left({s}^{\left(\frac{2}{2}\right)} \cdot {s}^{\left(\frac{2}{2}\right)}\right) \cdot \color{blue}{\left(x \cdot x\right)}\right)} \]

      unswap-sqr [=>]74.1

      \[ \frac{1}{\left(c \cdot c\right) \cdot \color{blue}{\left(\left({s}^{\left(\frac{2}{2}\right)} \cdot x\right) \cdot \left({s}^{\left(\frac{2}{2}\right)} \cdot x\right)\right)}} \]

      metadata-eval [=>]74.1

      \[ \frac{1}{\left(c \cdot c\right) \cdot \left(\left({s}^{\color{blue}{1}} \cdot x\right) \cdot \left({s}^{\left(\frac{2}{2}\right)} \cdot x\right)\right)} \]

      unpow1 [=>]74.1

      \[ \frac{1}{\left(c \cdot c\right) \cdot \left(\left(\color{blue}{s} \cdot x\right) \cdot \left({s}^{\left(\frac{2}{2}\right)} \cdot x\right)\right)} \]

      rem-square-sqrt [<=]35.0

      \[ \frac{1}{\left(c \cdot c\right) \cdot \left(\left(s \cdot \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)}\right) \cdot \left({s}^{\left(\frac{2}{2}\right)} \cdot x\right)\right)} \]

      metadata-eval [=>]35.0

      \[ \frac{1}{\left(c \cdot c\right) \cdot \left(\left(s \cdot \left(\sqrt{x} \cdot \sqrt{x}\right)\right) \cdot \left({s}^{\color{blue}{1}} \cdot x\right)\right)} \]

      unpow1 [=>]35.0

      \[ \frac{1}{\left(c \cdot c\right) \cdot \left(\left(s \cdot \left(\sqrt{x} \cdot \sqrt{x}\right)\right) \cdot \left(\color{blue}{s} \cdot x\right)\right)} \]

      rem-square-sqrt [<=]35.0

      \[ \frac{1}{\left(c \cdot c\right) \cdot \left(\left(s \cdot \left(\sqrt{x} \cdot \sqrt{x}\right)\right) \cdot \left(s \cdot \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)}\right)\right)} \]

      associate-*l* [<=]35.0

      \[ \frac{1}{\left(c \cdot c\right) \cdot \left(\color{blue}{\left(\left(s \cdot \sqrt{x}\right) \cdot \sqrt{x}\right)} \cdot \left(s \cdot \left(\sqrt{x} \cdot \sqrt{x}\right)\right)\right)} \]

      associate-*l* [<=]35.0

      \[ \frac{1}{\left(c \cdot c\right) \cdot \left(\left(\left(s \cdot \sqrt{x}\right) \cdot \sqrt{x}\right) \cdot \color{blue}{\left(\left(s \cdot \sqrt{x}\right) \cdot \sqrt{x}\right)}\right)} \]
    5. Applied egg-rr91.0%

      \[\leadsto \frac{1}{\color{blue}{\frac{x \cdot s}{\frac{\frac{\frac{1}{c}}{x \cdot s}}{c}}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification95.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;s \leq 3.7 \cdot 10^{-140}:\\ \;\;\;\;\frac{\cos \left(x + x\right)}{x \cdot \left(s \cdot c\right)} \cdot \frac{\frac{1}{s \cdot c}}{x}\\ \mathbf{elif}\;s \leq 6 \cdot 10^{+221}:\\ \;\;\;\;\cos \left(x + x\right) \cdot {\left(s \cdot \left(x \cdot c\right)\right)}^{-2}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{s \cdot x}{\frac{\frac{\frac{1}{c}}{s \cdot x}}{c}}}\\ \end{array} \]

Alternatives

Alternative 1
Accuracy96.8%
Cost7753
\[\begin{array}{l} t_0 := x \cdot \left(s \cdot c\right)\\ \mathbf{if}\;x \leq -4 \cdot 10^{-106} \lor \neg \left(x \leq 9.2 \cdot 10^{-211}\right):\\ \;\;\;\;\frac{\cos \left(x + x\right)}{t_0} \cdot \frac{1}{t_0}\\ \mathbf{else}:\\ \;\;\;\;{\left(c \cdot \left(s \cdot x\right)\right)}^{-2}\\ \end{array} \]
Alternative 2
Accuracy96.6%
Cost7752
\[\begin{array}{l} t_0 := x \cdot \left(s \cdot c\right)\\ t_1 := \frac{\cos \left(x + x\right)}{t_0}\\ \mathbf{if}\;x \leq -2 \cdot 10^{-109}:\\ \;\;\;\;t_1 \cdot \frac{\frac{1}{s \cdot c}}{x}\\ \mathbf{elif}\;x \leq 9 \cdot 10^{-211}:\\ \;\;\;\;{\left(c \cdot \left(s \cdot x\right)\right)}^{-2}\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \frac{1}{t_0}\\ \end{array} \]
Alternative 3
Accuracy96.6%
Cost7752
\[\begin{array}{l} t_0 := x \cdot \left(s \cdot c\right)\\ t_1 := \frac{\cos \left(x + x\right)}{t_0}\\ \mathbf{if}\;x \leq -1.1 \cdot 10^{-110}:\\ \;\;\;\;t_1 \cdot \left(\frac{1}{s \cdot c} \cdot \frac{1}{x}\right)\\ \mathbf{elif}\;x \leq 1.36 \cdot 10^{-210}:\\ \;\;\;\;{\left(c \cdot \left(s \cdot x\right)\right)}^{-2}\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \frac{1}{t_0}\\ \end{array} \]
Alternative 4
Accuracy77.3%
Cost7625
\[\begin{array}{l} t_0 := \frac{\frac{1}{c}}{s \cdot x}\\ \mathbf{if}\;x \leq -1.9 \cdot 10^{+63} \lor \neg \left(x \leq 1.52 \cdot 10^{-46}\right):\\ \;\;\;\;\frac{\cos \left(x \cdot 2\right)}{x \cdot \left(c \cdot \left(c \cdot \left(x \cdot \left(s \cdot s\right)\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot t_0\\ \end{array} \]
Alternative 5
Accuracy87.7%
Cost7625
\[\begin{array}{l} t_0 := \frac{\frac{1}{c}}{s \cdot x}\\ \mathbf{if}\;x \leq -6 \cdot 10^{+54} \lor \neg \left(x \leq 1.8 \cdot 10^{-7}\right):\\ \;\;\;\;\frac{\cos \left(x \cdot 2\right)}{x \cdot \left(c \cdot \left(s \cdot \left(s \cdot \left(x \cdot c\right)\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot t_0\\ \end{array} \]
Alternative 6
Accuracy91.6%
Cost7625
\[\begin{array}{l} t_0 := \cos \left(x \cdot 2\right)\\ \mathbf{if}\;c \leq -2.5 \cdot 10^{-226} \lor \neg \left(c \leq 2.25 \cdot 10^{-186}\right):\\ \;\;\;\;\frac{t_0}{\left(x \cdot \left(s \cdot c\right)\right) \cdot \left(c \cdot \left(s \cdot x\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_0}{x \cdot \left(c \cdot \left(s \cdot \left(s \cdot \left(x \cdot c\right)\right)\right)\right)}\\ \end{array} \]
Alternative 7
Accuracy96.1%
Cost7625
\[\begin{array}{l} t_0 := x \cdot \left(s \cdot c\right)\\ t_1 := \frac{1}{c \cdot \left(s \cdot x\right)}\\ \mathbf{if}\;x \leq -0.0002 \lor \neg \left(x \leq 8 \cdot 10^{-177}\right):\\ \;\;\;\;\frac{\cos \left(x \cdot 2\right)}{t_0 \cdot t_0}\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot t_1\\ \end{array} \]
Alternative 8
Accuracy94.2%
Cost7624
\[\begin{array}{l} t_0 := x \cdot \left(s \cdot c\right)\\ t_1 := \cos \left(x \cdot 2\right)\\ t_2 := c \cdot \left(s \cdot x\right)\\ t_3 := \frac{1}{t_2}\\ \mathbf{if}\;x \leq -2 \cdot 10^{-10}:\\ \;\;\;\;\frac{t_1}{t_0 \cdot \left(s \cdot \left(x \cdot c\right)\right)}\\ \mathbf{elif}\;x \leq 10^{-170}:\\ \;\;\;\;t_3 \cdot t_3\\ \mathbf{else}:\\ \;\;\;\;\frac{t_1}{t_0 \cdot t_2}\\ \end{array} \]
Alternative 9
Accuracy73.8%
Cost960
\[\begin{array}{l} t_0 := \frac{1}{c \cdot \left(s \cdot x\right)}\\ t_0 \cdot t_0 \end{array} \]
Alternative 10
Accuracy73.8%
Cost960
\[\begin{array}{l} t_0 := \frac{\frac{1}{c}}{s \cdot x}\\ t_0 \cdot t_0 \end{array} \]
Alternative 11
Accuracy50.4%
Cost832
\[\frac{1}{c \cdot \left(\left(s \cdot s\right) \cdot \left(c \cdot \left(x \cdot x\right)\right)\right)} \]
Alternative 12
Accuracy69.2%
Cost832
\[\frac{1}{c \cdot \left(\left(x \cdot \left(s \cdot c\right)\right) \cdot \left(s \cdot x\right)\right)} \]
Alternative 13
Accuracy73.4%
Cost832
\[\begin{array}{l} t_0 := x \cdot \left(s \cdot c\right)\\ \frac{1}{t_0 \cdot t_0} \end{array} \]

Error

Reproduce?

herbie shell --seed 2023129 
(FPCore (x c s)
  :name "mixedcos"
  :precision binary64
  (/ (cos (* 2.0 x)) (* (pow c 2.0) (* (* x (pow s 2.0)) x))))