?

Average Error: 0.0 → 0.0
Time: 3.1s
Precision: binary64
Cost: 960

?

\[x \cdot y - z \cdot t \]
\[\begin{array}{l} t_1 := y \cdot \left(x \cdot 0.5\right)\\ t_1 + \left(t_1 - z \cdot t\right) \end{array} \]
(FPCore (x y z t) :precision binary64 (- (* x y) (* z t)))
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* y (* x 0.5)))) (+ t_1 (- t_1 (* z t)))))
double code(double x, double y, double z, double t) {
	return (x * y) - (z * t);
}
double code(double x, double y, double z, double t) {
	double t_1 = y * (x * 0.5);
	return t_1 + (t_1 - (z * t));
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = (x * y) - (z * t)
end function
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    t_1 = y * (x * 0.5d0)
    code = t_1 + (t_1 - (z * t))
end function
public static double code(double x, double y, double z, double t) {
	return (x * y) - (z * t);
}
public static double code(double x, double y, double z, double t) {
	double t_1 = y * (x * 0.5);
	return t_1 + (t_1 - (z * t));
}
def code(x, y, z, t):
	return (x * y) - (z * t)
def code(x, y, z, t):
	t_1 = y * (x * 0.5)
	return t_1 + (t_1 - (z * t))
function code(x, y, z, t)
	return Float64(Float64(x * y) - Float64(z * t))
end
function code(x, y, z, t)
	t_1 = Float64(y * Float64(x * 0.5))
	return Float64(t_1 + Float64(t_1 - Float64(z * t)))
end
function tmp = code(x, y, z, t)
	tmp = (x * y) - (z * t);
end
function tmp = code(x, y, z, t)
	t_1 = y * (x * 0.5);
	tmp = t_1 + (t_1 - (z * t));
end
code[x_, y_, z_, t_] := N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]}, N[(t$95$1 + N[(t$95$1 - N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
x \cdot y - z \cdot t
\begin{array}{l}
t_1 := y \cdot \left(x \cdot 0.5\right)\\
t_1 + \left(t_1 - z \cdot t\right)
\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 0.0

    \[x \cdot y - z \cdot t \]
  2. Applied egg-rr0.0

    \[\leadsto \color{blue}{y \cdot \left(x \cdot 0.5\right) + \left(y \cdot \left(x \cdot 0.5\right) - z \cdot t\right)} \]
  3. Final simplification0.0

    \[\leadsto y \cdot \left(x \cdot 0.5\right) + \left(y \cdot \left(x \cdot 0.5\right) - z \cdot t\right) \]

Alternatives

Alternative 1
Error22.4
Cost1048
\[\begin{array}{l} t_1 := t \cdot \left(-z\right)\\ \mathbf{if}\;y \leq -6.4 \cdot 10^{-97}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;y \leq -1.75 \cdot 10^{-171}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -2.6 \cdot 10^{-215}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{-92}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{-61}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;y \leq 6.8 \cdot 10^{-52}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]
Alternative 2
Error0.0
Cost448
\[x \cdot y - z \cdot t \]
Alternative 3
Error30.7
Cost192
\[y \cdot x \]

Error

Reproduce?

herbie shell --seed 2023064 
(FPCore (x y z t)
  :name "Linear.V3:cross from linear-1.19.1.3"
  :precision binary64
  (- (* x y) (* z t)))