?

Average Error: 0.1 → 0.2
Time: 8.3s
Precision: binary64
Cost: 6720

?

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

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 0.1

    \[x \cdot \frac{\sin y}{y} \]
  2. Applied egg-rr0.2

    \[\leadsto \color{blue}{\frac{x}{\frac{y}{\sin y}}} \]
  3. Final simplification0.2

    \[\leadsto \frac{x}{\frac{y}{\sin y}} \]

Alternatives

Alternative 1
Error0.1
Cost6720
\[x \cdot \frac{\sin y}{y} \]
Alternative 2
Error23.3
Cost1092
\[\begin{array}{l} \mathbf{if}\;y \leq -2.45 \cdot 10^{-8}:\\ \;\;\;\;\frac{0.5}{\frac{0.5 \cdot \frac{1}{y} + 0.08333333333333333 \cdot y}{\frac{x}{y}}}\\ \mathbf{elif}\;y \leq 6 \cdot 10^{-18}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{\frac{1}{y} + y \cdot 0.16666666666666666}\\ \end{array} \]
Alternative 3
Error23.3
Cost968
\[\begin{array}{l} t_0 := \frac{\frac{x}{y}}{\frac{1}{y} + y \cdot 0.16666666666666666}\\ \mathbf{if}\;y \leq -1.85 \cdot 10^{-8}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq 6 \cdot 10^{-18}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 4
Error23.5
Cost840
\[\begin{array}{l} t_0 := \frac{y}{y \cdot \frac{y}{x}} \cdot y\\ \mathbf{if}\;y \leq -1 \cdot 10^{+25}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq 6.8 \cdot 10^{-18}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 5
Error24.3
Cost584
\[\begin{array}{l} t_0 := \frac{x}{y} \cdot y\\ \mathbf{if}\;y \leq -1 \cdot 10^{+65}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{+67}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 6
Error23.6
Cost584
\[\begin{array}{l} t_0 := \left(x - -1\right) + -1\\ \mathbf{if}\;y \leq -6.8 \cdot 10^{+22}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq 2.75 \cdot 10^{+26}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 7
Error30.7
Cost64
\[x \]

Error

Reproduce?

herbie shell --seed 2023068 
(FPCore (x y)
  :name "Linear.Quaternion:$cexp from linear-1.19.1.3"
  :precision binary64
  (* x (/ (sin y) y)))