?

Average Error: 0.5 → 0.5
Time: 42.1s
Precision: binary64
Cost: 832

?

\[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
\[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
(FPCore (x y z t a)
 :precision binary64
 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
(FPCore (x y z t a)
 :precision binary64
 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
	return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
double code(double x, double y, double z, double t, double a) {
	return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
	return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
public static double code(double x, double y, double z, double t, double a) {
	return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a):
	return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
def code(x, y, z, t, a):
	return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a)
	return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0))
end
function code(x, y, z, t, a)
	return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0))
end
function tmp = code(x, y, z, t, a)
	tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
end
function tmp = code(x, y, z, t, a)
	tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.5
Target0.1
Herbie0.5
\[\frac{60}{\frac{z - t}{x - y}} + a \cdot 120 \]

Derivation?

  1. Initial program 0.5

    \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
  2. Final simplification0.5

    \[\leadsto \frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]

Alternatives

Alternative 1
Error9.6
Cost1232
\[\begin{array}{l} t_1 := \left(\left(a + a\right) + \frac{x}{z - t}\right) \cdot 60\\ t_2 := \left(a + \left(x - y\right) \cdot \frac{0.5}{z}\right) \cdot 120\\ \mathbf{if}\;z \leq -1.4 \cdot 10^{+90}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -6.8 \cdot 10^{-159}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-103}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{-60}{t} + a \cdot 120\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-10}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 2
Error9.7
Cost1232
\[\begin{array}{l} t_1 := \left(a + \left(x - y\right) \cdot \frac{0.5}{z}\right) \cdot 120\\ \mathbf{if}\;z \leq -2.6 \cdot 10^{+90}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -6.8 \cdot 10^{-159}:\\ \;\;\;\;\left(\left(a + a\right) + \frac{x}{z - t}\right) \cdot 60\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-108}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{-60}{t} + a \cdot 120\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-10}:\\ \;\;\;\;\frac{60 \cdot x}{z - t} + a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 3
Error23.9
Cost1108
\[\begin{array}{l} t_1 := -60 \cdot \frac{y}{z - t}\\ t_2 := 60 \cdot \frac{x}{z - t}\\ \mathbf{if}\;a \leq -1.2 \cdot 10^{-110}:\\ \;\;\;\;120 \cdot a\\ \mathbf{elif}\;a \leq -5 \cdot 10^{-274}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{-190}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 3.35 \cdot 10^{-143}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{-129}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;120 \cdot a\\ \end{array} \]
Alternative 4
Error24.3
Cost1108
\[\begin{array}{l} t_1 := -60 \cdot \frac{y}{z - t}\\ \mathbf{if}\;a \leq -1.2 \cdot 10^{-110}:\\ \;\;\;\;120 \cdot a\\ \mathbf{elif}\;a \leq 2 \cdot 10^{-301}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{-191}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.75 \cdot 10^{-142}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{-129}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;120 \cdot a\\ \end{array} \]
Alternative 5
Error24.4
Cost1108
\[\begin{array}{l} t_1 := -60 \cdot \frac{y}{z - t}\\ \mathbf{if}\;a \leq -2.1 \cdot 10^{-110}:\\ \;\;\;\;120 \cdot a\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{-301}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{60}{z}\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{-191}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{-143}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{-129}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;120 \cdot a\\ \end{array} \]
Alternative 6
Error15.0
Cost968
\[\begin{array}{l} t_1 := \left(a + \left(x - y\right) \cdot \frac{0.5}{z}\right) \cdot 120\\ \mathbf{if}\;z \leq -1.35 \cdot 10^{-61}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{-64}:\\ \;\;\;\;120 \cdot a + -60 \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 7
Error12.5
Cost968
\[\begin{array}{l} t_1 := \left(a + \left(x - y\right) \cdot \frac{0.5}{z}\right) \cdot 120\\ \mathbf{if}\;z \leq -2.85 \cdot 10^{+88}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-10}:\\ \;\;\;\;\left(\left(a + a\right) + \frac{x}{z - t}\right) \cdot 60\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 8
Error15.4
Cost840
\[\begin{array}{l} \mathbf{if}\;a \leq -4.3 \cdot 10^{-110}:\\ \;\;\;\;120 \cdot a\\ \mathbf{elif}\;a \leq 3.7 \cdot 10^{-67}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;120 \cdot a\\ \end{array} \]
Alternative 9
Error14.9
Cost840
\[\begin{array}{l} \mathbf{if}\;a \leq -4.2 \cdot 10^{+23}:\\ \;\;\;\;120 \cdot a\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{-65}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\ \mathbf{else}:\\ \;\;\;\;120 \cdot a\\ \end{array} \]
Alternative 10
Error14.6
Cost840
\[\begin{array}{l} \mathbf{if}\;a \leq -6.5 \cdot 10^{+17}:\\ \;\;\;\;120 \cdot a\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-21}:\\ \;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\ \mathbf{else}:\\ \;\;\;\;120 \cdot a\\ \end{array} \]
Alternative 11
Error15.5
Cost840
\[\begin{array}{l} \mathbf{if}\;a \leq -4.4 \cdot 10^{-110}:\\ \;\;\;\;120 \cdot a\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-67}:\\ \;\;\;\;\frac{\frac{x - y}{0.016666666666666666}}{z - t}\\ \mathbf{else}:\\ \;\;\;\;120 \cdot a\\ \end{array} \]
Alternative 12
Error0.2
Cost832
\[\left(a + \left(x - y\right) \cdot \frac{0.5}{z - t}\right) \cdot 120 \]
Alternative 13
Error0.1
Cost832
\[\left(x - y\right) \cdot \frac{60}{z - t} + a \cdot 120 \]
Alternative 14
Error0.1
Cost832
\[\frac{60}{\frac{z - t}{x - y}} + a \cdot 120 \]
Alternative 15
Error24.5
Cost712
\[\begin{array}{l} \mathbf{if}\;a \leq -1.15 \cdot 10^{-114}:\\ \;\;\;\;120 \cdot a\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{-129}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;120 \cdot a\\ \end{array} \]
Alternative 16
Error27.7
Cost584
\[\begin{array}{l} \mathbf{if}\;a \leq -2.2 \cdot 10^{-220}:\\ \;\;\;\;120 \cdot a\\ \mathbf{elif}\;a \leq 3.45 \cdot 10^{-158}:\\ \;\;\;\;-60 \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;120 \cdot a\\ \end{array} \]
Alternative 17
Error27.9
Cost584
\[\begin{array}{l} \mathbf{if}\;a \leq -4.8 \cdot 10^{-193}:\\ \;\;\;\;120 \cdot a\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{-157}:\\ \;\;\;\;-60 \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;120 \cdot a\\ \end{array} \]
Alternative 18
Error28.6
Cost192
\[120 \cdot a \]

Error

Reproduce?

herbie shell --seed 2023068 
(FPCore (x y z t a)
  :name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
  :precision binary64

  :herbie-target
  (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0))

  (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))