# ?

Average Error: 0.0 → 0.0
Time: 6.2s
Precision: binary64
Cost: 12992

# ?

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

# Try it out?

Results

 In Out
Enter valid numbers for all inputs

# Derivation?

1. Initial program 0.0

$\sin x - \sin y$
2. Final simplification0.0

$\leadsto \sin x - \sin y$

# Alternatives

Alternative 1
Error17.0
Cost32657
$\begin{array}{l} \mathbf{if}\;\sin x \leq -3.8 \cdot 10^{-115}:\\ \;\;\;\;\sin x\\ \mathbf{elif}\;\sin x \leq -5 \cdot 10^{-135} \lor \neg \left(\sin x \leq -2.55 \cdot 10^{-168}\right) \land \sin x \leq 8.5 \cdot 10^{-164}:\\ \;\;\;\;-\sin y\\ \mathbf{else}:\\ \;\;\;\;\sin x\\ \end{array}$
Alternative 2
Error0.2
Cost19657
$\begin{array}{l} \mathbf{if}\;\sin y \leq -2 \cdot 10^{-8} \lor \neg \left(\sin y \leq 10^{-31}\right):\\ \;\;\;\;-\sin y\\ \mathbf{else}:\\ \;\;\;\;\sin x - y\\ \end{array}$
Alternative 3
Error31.0
Cost6464
$\sin x$

# Reproduce?

herbie shell --seed 1
(FPCore (x y)
:name "sin(x)-sin(y)"
:precision binary64
:pre (and (and (<= -1000.0 x) (<= x 1000.0)) (and (<= -1000.0 y) (<= y 1000.0)))
(- (sin x) (sin y)))