?

Average Accuracy: 99.9% → 99.9%
Time: 10.2s
Precision: binary64
Cost: 13248

?

\[\left(x + \sin y\right) + z \cdot \cos y \]
\[\sin y + \left(z \cdot \cos y + x\right) \]
(FPCore (x y z) :precision binary64 (+ (+ x (sin y)) (* z (cos y))))
(FPCore (x y z) :precision binary64 (+ (sin y) (+ (* z (cos y)) x)))
double code(double x, double y, double z) {
	return (x + sin(y)) + (z * cos(y));
}
double code(double x, double y, double z) {
	return sin(y) + ((z * cos(y)) + x);
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (x + sin(y)) + (z * cos(y))
end function
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = sin(y) + ((z * cos(y)) + x)
end function
public static double code(double x, double y, double z) {
	return (x + Math.sin(y)) + (z * Math.cos(y));
}
public static double code(double x, double y, double z) {
	return Math.sin(y) + ((z * Math.cos(y)) + x);
}
def code(x, y, z):
	return (x + math.sin(y)) + (z * math.cos(y))
def code(x, y, z):
	return math.sin(y) + ((z * math.cos(y)) + x)
function code(x, y, z)
	return Float64(Float64(x + sin(y)) + Float64(z * cos(y)))
end
function code(x, y, z)
	return Float64(sin(y) + Float64(Float64(z * cos(y)) + x))
end
function tmp = code(x, y, z)
	tmp = (x + sin(y)) + (z * cos(y));
end
function tmp = code(x, y, z)
	tmp = sin(y) + ((z * cos(y)) + x);
end
code[x_, y_, z_] := N[(N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision] + N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_] := N[(N[Sin[y], $MachinePrecision] + N[(N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]
\left(x + \sin y\right) + z \cdot \cos y
\sin y + \left(z \cdot \cos y + x\right)

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 99.9%

    \[\left(x + \sin y\right) + z \cdot \cos y \]
  2. Applied egg-rr62.0%

    \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(x + \sin y\right)} - \left(1 - z \cdot \cos y\right)} \]
  3. Applied egg-rr99.9%

    \[\leadsto \color{blue}{\left(z \cdot \cos y + x\right) + \sin y} \]
  4. Final simplification99.9%

    \[\leadsto \sin y + \left(z \cdot \cos y + x\right) \]

Alternatives

Alternative 1
Accuracy99.9%
Cost13248
\[z \cdot \cos y + \left(x + \sin y\right) \]
Alternative 2
Accuracy72.4%
Cost7120
\[\begin{array}{l} t_0 := z \cdot \cos y\\ \mathbf{if}\;z \leq -7.2 \cdot 10^{+85}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-177}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{-131}:\\ \;\;\;\;\sin y\\ \mathbf{elif}\;z \leq 1.96 \cdot 10^{+62}:\\ \;\;\;\;z + x\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 3
Accuracy99.4%
Cost7108
\[\begin{array}{l} t_0 := z \cdot \cos y\\ \mathbf{if}\;z \leq -1.65:\\ \;\;\;\;\left(x + 1\right) + \left(t_0 + -1\right)\\ \mathbf{elif}\;z \leq 0.76:\\ \;\;\;\;z + \left(x + \sin y\right)\\ \mathbf{else}:\\ \;\;\;\;t_0 + x\\ \end{array} \]
Alternative 4
Accuracy93.7%
Cost6985
\[\begin{array}{l} \mathbf{if}\;z \leq -7.8 \cdot 10^{-128} \lor \neg \left(z \leq 8.5 \cdot 10^{-89}\right):\\ \;\;\;\;z \cdot \cos y + x\\ \mathbf{else}:\\ \;\;\;\;x + \sin y\\ \end{array} \]
Alternative 5
Accuracy99.4%
Cost6985
\[\begin{array}{l} \mathbf{if}\;z \leq -1.06 \lor \neg \left(z \leq 0.95\right):\\ \;\;\;\;z \cdot \cos y + x\\ \mathbf{else}:\\ \;\;\;\;z + \left(x + \sin y\right)\\ \end{array} \]
Alternative 6
Accuracy82.7%
Cost6857
\[\begin{array}{l} \mathbf{if}\;z \leq -59000000 \lor \neg \left(z \leq 7.4 \cdot 10^{+61}\right):\\ \;\;\;\;z \cdot \cos y\\ \mathbf{else}:\\ \;\;\;\;x + \sin y\\ \end{array} \]
Alternative 7
Accuracy77.8%
Cost6856
\[\begin{array}{l} \mathbf{if}\;x \leq -4.6 \cdot 10^{-10}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;x \leq 2.7 \cdot 10^{-47}:\\ \;\;\;\;z + \sin y\\ \mathbf{else}:\\ \;\;\;\;z + x\\ \end{array} \]
Alternative 8
Accuracy67.6%
Cost6728
\[\begin{array}{l} \mathbf{if}\;x \leq -2.1 \cdot 10^{-12}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;x \leq -3.4 \cdot 10^{-139}:\\ \;\;\;\;\sin y\\ \mathbf{elif}\;x \leq 6.4 \cdot 10^{-100}:\\ \;\;\;\;y + \left(z + x\right)\\ \mathbf{else}:\\ \;\;\;\;z + x\\ \end{array} \]
Alternative 9
Accuracy69.5%
Cost584
\[\begin{array}{l} \mathbf{if}\;y \leq -1.12 \cdot 10^{+30}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{-38}:\\ \;\;\;\;y + \left(z + x\right)\\ \mathbf{else}:\\ \;\;\;\;z + x\\ \end{array} \]
Alternative 10
Accuracy58.0%
Cost456
\[\begin{array}{l} \mathbf{if}\;x \leq -7 \cdot 10^{+47}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 2700000:\\ \;\;\;\;z + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 11
Accuracy68.1%
Cost456
\[\begin{array}{l} \mathbf{if}\;x \leq -1.32 \cdot 10^{-185}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;x \leq 2.7 \cdot 10^{-139}:\\ \;\;\;\;z + y\\ \mathbf{else}:\\ \;\;\;\;z + x\\ \end{array} \]
Alternative 12
Accuracy55.2%
Cost328
\[\begin{array}{l} \mathbf{if}\;x \leq -7 \cdot 10^{+47}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 2700000:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 13
Accuracy43.1%
Cost64
\[x \]

Error

Reproduce?

herbie shell --seed 2023141 
(FPCore (x y z)
  :name "Graphics.Rasterific.Svg.PathConverter:segmentToBezier from rasterific-svg-0.2.3.1, C"
  :precision binary64
  (+ (+ x (sin y)) (* z (cos y))))