?

Average Error: 15.1 → 8.0
Time: 34.8s
Precision: binary64
Cost: 3464

?

\[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
\[\begin{array}{l} t_1 := \left(y - z\right) \cdot \left(-\frac{t}{z - a}\right) + x \cdot \left(\frac{y}{z - a} + \left(1 - \frac{z}{z - a}\right)\right)\\ t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;t_2 \leq -4 \cdot 10^{-188}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq 0:\\ \;\;\;\;\left(-1 + \frac{y}{z}\right) \cdot \left(-t\right) + y \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1
         (+
          (* (- y z) (- (/ t (- z a))))
          (* x (+ (/ y (- z a)) (- 1.0 (/ z (- z a)))))))
        (t_2 (+ x (* (- y z) (/ (- t x) (- a z))))))
   (if (<= t_2 -4e-188)
     t_1
     (if (<= t_2 0.0) (+ (* (+ -1.0 (/ y z)) (- t)) (* y (/ x z))) t_1))))
double code(double x, double y, double z, double t, double a) {
	return x + ((y - z) * ((t - x) / (a - z)));
}
double code(double x, double y, double z, double t, double a) {
	double t_1 = ((y - z) * -(t / (z - a))) + (x * ((y / (z - a)) + (1.0 - (z / (z - a)))));
	double t_2 = x + ((y - z) * ((t - x) / (a - z)));
	double tmp;
	if (t_2 <= -4e-188) {
		tmp = t_1;
	} else if (t_2 <= 0.0) {
		tmp = ((-1.0 + (y / z)) * -t) + (y * (x / z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
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 = x + ((y - z) * ((t - x) / (a - z)))
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
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = ((y - z) * -(t / (z - a))) + (x * ((y / (z - a)) + (1.0d0 - (z / (z - a)))))
    t_2 = x + ((y - z) * ((t - x) / (a - z)))
    if (t_2 <= (-4d-188)) then
        tmp = t_1
    else if (t_2 <= 0.0d0) then
        tmp = (((-1.0d0) + (y / z)) * -t) + (y * (x / z))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + ((y - z) * ((t - x) / (a - z)));
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = ((y - z) * -(t / (z - a))) + (x * ((y / (z - a)) + (1.0 - (z / (z - a)))));
	double t_2 = x + ((y - z) * ((t - x) / (a - z)));
	double tmp;
	if (t_2 <= -4e-188) {
		tmp = t_1;
	} else if (t_2 <= 0.0) {
		tmp = ((-1.0 + (y / z)) * -t) + (y * (x / z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	return x + ((y - z) * ((t - x) / (a - z)))
def code(x, y, z, t, a):
	t_1 = ((y - z) * -(t / (z - a))) + (x * ((y / (z - a)) + (1.0 - (z / (z - a)))))
	t_2 = x + ((y - z) * ((t - x) / (a - z)))
	tmp = 0
	if t_2 <= -4e-188:
		tmp = t_1
	elif t_2 <= 0.0:
		tmp = ((-1.0 + (y / z)) * -t) + (y * (x / z))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))))
end
function code(x, y, z, t, a)
	t_1 = Float64(Float64(Float64(y - z) * Float64(-Float64(t / Float64(z - a)))) + Float64(x * Float64(Float64(y / Float64(z - a)) + Float64(1.0 - Float64(z / Float64(z - a))))))
	t_2 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))))
	tmp = 0.0
	if (t_2 <= -4e-188)
		tmp = t_1;
	elseif (t_2 <= 0.0)
		tmp = Float64(Float64(Float64(-1.0 + Float64(y / z)) * Float64(-t)) + Float64(y * Float64(x / z)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp = code(x, y, z, t, a)
	tmp = x + ((y - z) * ((t - x) / (a - z)));
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = ((y - z) * -(t / (z - a))) + (x * ((y / (z - a)) + (1.0 - (z / (z - a)))));
	t_2 = x + ((y - z) * ((t - x) / (a - z)));
	tmp = 0.0;
	if (t_2 <= -4e-188)
		tmp = t_1;
	elseif (t_2 <= 0.0)
		tmp = ((-1.0 + (y / z)) * -t) + (y * (x / z));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - z), $MachinePrecision] * (-N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision])), $MachinePrecision] + N[(x * N[(N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision] + N[(1.0 - N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -4e-188], t$95$1, If[LessEqual[t$95$2, 0.0], N[(N[(N[(-1.0 + N[(y / z), $MachinePrecision]), $MachinePrecision] * (-t)), $MachinePrecision] + N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(-\frac{t}{z - a}\right) + x \cdot \left(\frac{y}{z - a} + \left(1 - \frac{z}{z - a}\right)\right)\\
t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t_2 \leq -4 \cdot 10^{-188}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;\left(-1 + \frac{y}{z}\right) \cdot \left(-t\right) + y \cdot \frac{x}{z}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 2 regimes
  2. if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -3.9999999999999998e-188 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 6.9

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Simplified6.9

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{x - t}{z - a}} \]
      Proof

      [Start]6.9

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

      rational.json-simplify-50 [=>]6.9

      \[ x + \left(y - z\right) \cdot \color{blue}{\frac{-\left(t - x\right)}{z - a}} \]

      rational.json-simplify-12 [=>]6.9

      \[ x + \left(y - z\right) \cdot \frac{\color{blue}{0 - \left(t - x\right)}}{z - a} \]

      rational.json-simplify-45 [=>]6.9

      \[ x + \left(y - z\right) \cdot \frac{\color{blue}{x - \left(t - 0\right)}}{z - a} \]

      rational.json-simplify-5 [=>]6.9

      \[ x + \left(y - z\right) \cdot \frac{x - \color{blue}{t}}{z - a} \]
    3. Taylor expanded in x around 0 14.2

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot \left(y - z\right)}{z - a} + \left(\left(\frac{y}{z - a} + 1\right) - \frac{z}{z - a}\right) \cdot x} \]
    4. Simplified5.1

      \[\leadsto \color{blue}{\left(y - z\right) \cdot \left(-\frac{t}{z - a}\right) + x \cdot \left(\frac{y}{z - a} + \left(1 - \frac{z}{z - a}\right)\right)} \]
      Proof

      [Start]14.2

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

      rational.json-simplify-49 [=>]5.9

      \[ -1 \cdot \color{blue}{\left(\left(y - z\right) \cdot \frac{t}{z - a}\right)} + \left(\left(\frac{y}{z - a} + 1\right) - \frac{z}{z - a}\right) \cdot x \]

      rational.json-simplify-43 [=>]5.9

      \[ \color{blue}{\left(y - z\right) \cdot \left(\frac{t}{z - a} \cdot -1\right)} + \left(\left(\frac{y}{z - a} + 1\right) - \frac{z}{z - a}\right) \cdot x \]

      rational.json-simplify-9 [=>]5.9

      \[ \left(y - z\right) \cdot \color{blue}{\left(-\frac{t}{z - a}\right)} + \left(\left(\frac{y}{z - a} + 1\right) - \frac{z}{z - a}\right) \cdot x \]

      rational.json-simplify-2 [=>]5.9

      \[ \left(y - z\right) \cdot \left(-\frac{t}{z - a}\right) + \color{blue}{x \cdot \left(\left(\frac{y}{z - a} + 1\right) - \frac{z}{z - a}\right)} \]

      rational.json-simplify-1 [=>]5.9

      \[ \left(y - z\right) \cdot \left(-\frac{t}{z - a}\right) + x \cdot \left(\color{blue}{\left(1 + \frac{y}{z - a}\right)} - \frac{z}{z - a}\right) \]

      rational.json-simplify-48 [=>]5.1

      \[ \left(y - z\right) \cdot \left(-\frac{t}{z - a}\right) + x \cdot \color{blue}{\left(\frac{y}{z - a} + \left(1 - \frac{z}{z - a}\right)\right)} \]

    if -3.9999999999999998e-188 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0

    1. Initial program 55.7

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Simplified55.8

      \[\leadsto \color{blue}{x + \frac{z - y}{\frac{a - z}{x - t}}} \]
      Proof

      [Start]55.7

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

      rational.json-simplify-50 [=>]55.7

      \[ x + \left(y - z\right) \cdot \color{blue}{\frac{-\left(t - x\right)}{z - a}} \]

      rational.json-simplify-8 [=>]55.7

      \[ x + \left(y - z\right) \cdot \frac{\color{blue}{\left(t - x\right) \cdot -1}}{z - a} \]

      rational.json-simplify-49 [=>]55.7

      \[ x + \left(y - z\right) \cdot \color{blue}{\left(-1 \cdot \frac{t - x}{z - a}\right)} \]

      rational.json-simplify-43 [<=]55.7

      \[ x + \color{blue}{\frac{t - x}{z - a} \cdot \left(\left(y - z\right) \cdot -1\right)} \]

      rational.json-simplify-5 [<=]55.7

      \[ x + \frac{t - x}{\color{blue}{\left(z - a\right) - 0}} \cdot \left(\left(y - z\right) \cdot -1\right) \]

      rational.json-simplify-50 [=>]55.7

      \[ x + \color{blue}{\frac{-\left(t - x\right)}{0 - \left(z - a\right)}} \cdot \left(\left(y - z\right) \cdot -1\right) \]

      rational.json-simplify-12 [<=]55.7

      \[ x + \frac{-\left(t - x\right)}{\color{blue}{-\left(z - a\right)}} \cdot \left(\left(y - z\right) \cdot -1\right) \]

      rational.json-simplify-10 [=>]55.7

      \[ x + \frac{-\left(t - x\right)}{\color{blue}{\frac{z - a}{-1}}} \cdot \left(\left(y - z\right) \cdot -1\right) \]

      rational.json-simplify-61 [=>]55.7

      \[ x + \color{blue}{\frac{-1}{\frac{z - a}{-\left(t - x\right)}}} \cdot \left(\left(y - z\right) \cdot -1\right) \]

      rational.json-simplify-9 [=>]55.7

      \[ x + \frac{-1}{\frac{z - a}{-\left(t - x\right)}} \cdot \color{blue}{\left(-\left(y - z\right)\right)} \]

      rational.json-simplify-10 [=>]55.7

      \[ x + \frac{-1}{\frac{z - a}{-\left(t - x\right)}} \cdot \color{blue}{\frac{y - z}{-1}} \]

      rational.json-simplify-55 [=>]55.8

      \[ x + \color{blue}{\frac{\frac{y - z}{-1}}{\frac{\frac{z - a}{-\left(t - x\right)}}{-1}}} \]

      rational.json-simplify-10 [<=]55.8

      \[ x + \frac{\color{blue}{-\left(y - z\right)}}{\frac{\frac{z - a}{-\left(t - x\right)}}{-1}} \]

      rational.json-simplify-12 [=>]55.8

      \[ x + \frac{\color{blue}{0 - \left(y - z\right)}}{\frac{\frac{z - a}{-\left(t - x\right)}}{-1}} \]

      rational.json-simplify-45 [=>]55.8

      \[ x + \frac{\color{blue}{z - \left(y - 0\right)}}{\frac{\frac{z - a}{-\left(t - x\right)}}{-1}} \]

      rational.json-simplify-5 [=>]55.8

      \[ x + \frac{z - \color{blue}{y}}{\frac{\frac{z - a}{-\left(t - x\right)}}{-1}} \]

      rational.json-simplify-46 [<=]55.8

      \[ x + \frac{z - y}{\color{blue}{\frac{z - a}{\left(-\left(t - x\right)\right) \cdot -1}}} \]

      rational.json-simplify-2 [=>]55.8

      \[ x + \frac{z - y}{\frac{z - a}{\color{blue}{-1 \cdot \left(-\left(t - x\right)\right)}}} \]

      rational.json-simplify-46 [=>]55.8

      \[ x + \frac{z - y}{\color{blue}{\frac{\frac{z - a}{-1}}{-\left(t - x\right)}}} \]

      rational.json-simplify-10 [<=]55.8

      \[ x + \frac{z - y}{\frac{\color{blue}{-\left(z - a\right)}}{-\left(t - x\right)}} \]

      rational.json-simplify-12 [=>]55.8

      \[ x + \frac{z - y}{\frac{\color{blue}{0 - \left(z - a\right)}}{-\left(t - x\right)}} \]

      rational.json-simplify-45 [=>]55.8

      \[ x + \frac{z - y}{\frac{\color{blue}{a - \left(z - 0\right)}}{-\left(t - x\right)}} \]

      rational.json-simplify-5 [=>]55.8

      \[ x + \frac{z - y}{\frac{a - \color{blue}{z}}{-\left(t - x\right)}} \]

      rational.json-simplify-12 [=>]55.8

      \[ x + \frac{z - y}{\frac{a - z}{\color{blue}{0 - \left(t - x\right)}}} \]
    3. Taylor expanded in z around inf 45.5

      \[\leadsto \color{blue}{\left(-1 \cdot \left(x - t\right) + \left(\frac{y \cdot \left(x - t\right)}{z} + x\right)\right) - \frac{a \cdot \left(x - t\right)}{z}} \]
    4. Simplified42.4

      \[\leadsto \color{blue}{\left(x + \left(x - t\right) \cdot \left(-1 + \frac{y}{z}\right)\right) - \left(x - t\right) \cdot \frac{a}{z}} \]
      Proof

      [Start]45.5

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

      rational.json-simplify-1 [=>]45.5

      \[ \left(-1 \cdot \left(x - t\right) + \color{blue}{\left(x + \frac{y \cdot \left(x - t\right)}{z}\right)}\right) - \frac{a \cdot \left(x - t\right)}{z} \]

      rational.json-simplify-41 [=>]45.5

      \[ \color{blue}{\left(x + \left(\frac{y \cdot \left(x - t\right)}{z} + -1 \cdot \left(x - t\right)\right)\right)} - \frac{a \cdot \left(x - t\right)}{z} \]

      rational.json-simplify-49 [=>]45.3

      \[ \left(x + \left(\color{blue}{\left(x - t\right) \cdot \frac{y}{z}} + -1 \cdot \left(x - t\right)\right)\right) - \frac{a \cdot \left(x - t\right)}{z} \]

      rational.json-simplify-51 [=>]45.4

      \[ \left(x + \color{blue}{\left(x - t\right) \cdot \left(-1 + \frac{y}{z}\right)}\right) - \frac{a \cdot \left(x - t\right)}{z} \]

      rational.json-simplify-49 [=>]42.4

      \[ \left(x + \left(x - t\right) \cdot \left(-1 + \frac{y}{z}\right)\right) - \color{blue}{\left(x - t\right) \cdot \frac{a}{z}} \]
    5. Taylor expanded in a around 0 57.0

      \[\leadsto \color{blue}{\left(\frac{y}{z} - 1\right) \cdot \left(x - t\right) + x} \]
    6. Taylor expanded in x around 0 26.2

      \[\leadsto \color{blue}{\frac{y \cdot x}{z} + -1 \cdot \left(\left(\frac{y}{z} - 1\right) \cdot t\right)} \]
    7. Simplified22.6

      \[\leadsto \color{blue}{\left(-1 + \frac{y}{z}\right) \cdot \left(-t\right) + y \cdot \frac{x}{z}} \]
      Proof

      [Start]26.2

      \[ \frac{y \cdot x}{z} + -1 \cdot \left(\left(\frac{y}{z} - 1\right) \cdot t\right) \]

      rational.json-simplify-1 [=>]26.2

      \[ \color{blue}{-1 \cdot \left(\left(\frac{y}{z} - 1\right) \cdot t\right) + \frac{y \cdot x}{z}} \]

      rational.json-simplify-15 [<=]26.2

      \[ -1 \cdot \left(\color{blue}{\left(\frac{y}{z} + -1\right)} \cdot t\right) + \frac{y \cdot x}{z} \]

      rational.json-simplify-43 [=>]26.2

      \[ \color{blue}{\left(\frac{y}{z} + -1\right) \cdot \left(t \cdot -1\right)} + \frac{y \cdot x}{z} \]

      rational.json-simplify-1 [=>]26.2

      \[ \color{blue}{\left(-1 + \frac{y}{z}\right)} \cdot \left(t \cdot -1\right) + \frac{y \cdot x}{z} \]

      rational.json-simplify-9 [=>]26.2

      \[ \left(-1 + \frac{y}{z}\right) \cdot \color{blue}{\left(-t\right)} + \frac{y \cdot x}{z} \]

      rational.json-simplify-2 [=>]26.2

      \[ \left(-1 + \frac{y}{z}\right) \cdot \left(-t\right) + \frac{\color{blue}{x \cdot y}}{z} \]

      rational.json-simplify-49 [=>]22.6

      \[ \left(-1 + \frac{y}{z}\right) \cdot \left(-t\right) + \color{blue}{y \cdot \frac{x}{z}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification8.0

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq -4 \cdot 10^{-188}:\\ \;\;\;\;\left(y - z\right) \cdot \left(-\frac{t}{z - a}\right) + x \cdot \left(\frac{y}{z - a} + \left(1 - \frac{z}{z - a}\right)\right)\\ \mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq 0:\\ \;\;\;\;\left(-1 + \frac{y}{z}\right) \cdot \left(-t\right) + y \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\left(y - z\right) \cdot \left(-\frac{t}{z - a}\right) + x \cdot \left(\frac{y}{z - a} + \left(1 - \frac{z}{z - a}\right)\right)\\ \end{array} \]

Alternatives

Alternative 1
Error9.0
Cost4172
\[\begin{array}{l} t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;t_1 \leq -4 \cdot 10^{-188}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;\left(-1 + \frac{y}{z}\right) \cdot \left(-t\right) + y \cdot \frac{x}{z}\\ \mathbf{elif}\;t_1 \leq 10^{+302}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot \left(x - t\right)}{z - a} + \left(-1 \cdot \frac{z \cdot \left(x - t\right)}{z - a} + x\right)\\ \end{array} \]
Alternative 2
Error9.9
Cost3660
\[\begin{array}{l} t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;t_1 \leq -4 \cdot 10^{-188}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;\left(-1 + \frac{y}{z}\right) \cdot \left(-t\right) + y \cdot \frac{x}{z}\\ \mathbf{elif}\;t_1 \leq 4 \cdot 10^{+284}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\frac{z}{a - z} + 1\right) - \frac{y}{a - z}\right) \cdot x\\ \end{array} \]
Alternative 3
Error10.7
Cost3532
\[\begin{array}{l} t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;t_1 \leq -4 \cdot 10^{-188}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{-268}:\\ \;\;\;\;t - \frac{a \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;t_1 \leq 4 \cdot 10^{+284}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{a} \cdot \left(t - x\right)\\ \end{array} \]
Alternative 4
Error10.0
Cost3532
\[\begin{array}{l} t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;t_1 \leq -4 \cdot 10^{-188}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right) + x \cdot \frac{y}{z}\\ \mathbf{elif}\;t_1 \leq 4 \cdot 10^{+284}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{a} \cdot \left(t - x\right)\\ \end{array} \]
Alternative 5
Error10.0
Cost3532
\[\begin{array}{l} t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;t_1 \leq -4 \cdot 10^{-188}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;\left(-1 + \frac{y}{z}\right) \cdot \left(-t\right) + y \cdot \frac{x}{z}\\ \mathbf{elif}\;t_1 \leq 4 \cdot 10^{+284}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{a} \cdot \left(t - x\right)\\ \end{array} \]
Alternative 6
Error19.3
Cost1364
\[\begin{array}{l} t_1 := t - \frac{a}{z} \cdot \left(x - t\right)\\ \mathbf{if}\;z \leq -2.25 \cdot 10^{+220}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-305}:\\ \;\;\;\;x + \frac{z - y}{\frac{z - a}{t}}\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-244}:\\ \;\;\;\;x + \frac{y}{a} \cdot \left(t - x\right)\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-192}:\\ \;\;\;\;x + \frac{z - y}{\frac{a - z}{x}}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{+194}:\\ \;\;\;\;x + t \cdot \frac{z - y}{z - a}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 7
Error25.8
Cost1300
\[\begin{array}{l} t_1 := x + \frac{y}{a} \cdot \left(t - x\right)\\ \mathbf{if}\;a \leq -22500000000000:\\ \;\;\;\;x + \left(-\frac{z - y}{a}\right) \cdot t\\ \mathbf{elif}\;a \leq -1.08 \cdot 10^{-69}:\\ \;\;\;\;t - \frac{a \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq -1.4 \cdot 10^{-107}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-89}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{+148}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z - y}{-\frac{a}{t}}\\ \end{array} \]
Alternative 8
Error36.4
Cost1240
\[\begin{array}{l} t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{if}\;z \leq -1.05 \cdot 10^{+190}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{+102}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;z \leq -6.8 \cdot 10^{+17}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-99}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.16 \cdot 10^{-166}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{+32}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 9
Error30.8
Cost1240
\[\begin{array}{l} t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{if}\;z \leq -1.62 \cdot 10^{+174}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{+130}:\\ \;\;\;\;x + \left(-t \cdot \frac{z}{a}\right)\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{+118}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-99}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq -1.16 \cdot 10^{-166}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+33}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 10
Error30.8
Cost1240
\[\begin{array}{l} t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{if}\;z \leq -2.9 \cdot 10^{+175}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -7 \cdot 10^{+131}:\\ \;\;\;\;x + \frac{t}{a} \cdot \left(-z\right)\\ \mathbf{elif}\;z \leq -2.5 \cdot 10^{+112}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-99}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq -1.16 \cdot 10^{-166}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+32}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 11
Error30.7
Cost1240
\[\begin{array}{l} t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{if}\;z \leq -1.62 \cdot 10^{+174}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -5 \cdot 10^{+133}:\\ \;\;\;\;x + \frac{t}{a} \cdot \left(-z\right)\\ \mathbf{elif}\;z \leq -6.6 \cdot 10^{+111}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x - t}{z}\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-99}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq -1.16 \cdot 10^{-166}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 7.6 \cdot 10^{+33}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 12
Error29.5
Cost1240
\[\begin{array}{l} t_1 := x + \frac{t}{\frac{a}{y}}\\ t_2 := t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{if}\;z \leq -1.62 \cdot 10^{+174}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -4 \cdot 10^{+139}:\\ \;\;\;\;x + \frac{t}{a} \cdot \left(-z\right)\\ \mathbf{elif}\;z \leq -1.06 \cdot 10^{+21}:\\ \;\;\;\;x + t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-99}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.16 \cdot 10^{-166}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{+33}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 13
Error29.2
Cost1240
\[\begin{array}{l} t_1 := x + \frac{t}{\frac{a}{y}}\\ t_2 := t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{if}\;z \leq -1.62 \cdot 10^{+174}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -4 \cdot 10^{+139}:\\ \;\;\;\;x + \frac{t}{a} \cdot \left(-z\right)\\ \mathbf{elif}\;z \leq -3.3 \cdot 10^{+22}:\\ \;\;\;\;x + t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;z \leq -1.88 \cdot 10^{-87}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{-175}:\\ \;\;\;\;x + \left(z - y\right) \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{+32}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 14
Error25.9
Cost1236
\[\begin{array}{l} t_1 := x + \frac{t}{a} \cdot \left(y - z\right)\\ t_2 := x + \frac{y}{a} \cdot \left(t - x\right)\\ \mathbf{if}\;a \leq -2000000000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.55 \cdot 10^{-69}:\\ \;\;\;\;t - \frac{a}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq -1.4 \cdot 10^{-107}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-89}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 1.12 \cdot 10^{+148}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 15
Error25.9
Cost1236
\[\begin{array}{l} t_1 := x + \frac{t}{a} \cdot \left(y - z\right)\\ t_2 := x + \frac{y}{a} \cdot \left(t - x\right)\\ \mathbf{if}\;a \leq -7600000000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-70}:\\ \;\;\;\;t - \frac{a \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq -1.4 \cdot 10^{-107}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-89}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 6.4 \cdot 10^{+147}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 16
Error25.8
Cost1236
\[\begin{array}{l} t_1 := x + \frac{y}{a} \cdot \left(t - x\right)\\ \mathbf{if}\;a \leq -11000000000000:\\ \;\;\;\;x + \left(-\frac{z - y}{a}\right) \cdot t\\ \mathbf{elif}\;a \leq -1.35 \cdot 10^{-67}:\\ \;\;\;\;t - \frac{a \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq -1.4 \cdot 10^{-107}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-89}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 1.02 \cdot 10^{+148}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t}{a} \cdot \left(y - z\right)\\ \end{array} \]
Alternative 17
Error18.5
Cost1100
\[\begin{array}{l} t_1 := x + t \cdot \frac{z - y}{z - a}\\ \mathbf{if}\;z \leq -9.5 \cdot 10^{-206}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-192}:\\ \;\;\;\;x + \frac{y}{a} \cdot \left(t - x\right)\\ \mathbf{elif}\;z \leq 1.22 \cdot 10^{+194}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t - \frac{a}{z} \cdot \left(x - t\right)\\ \end{array} \]
Alternative 18
Error26.5
Cost972
\[\begin{array}{l} t_1 := x + \frac{t}{a} \cdot \left(y - z\right)\\ \mathbf{if}\;a \leq -1.4 \cdot 10^{-107}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-89}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 1.85 \cdot 10^{+148}:\\ \;\;\;\;x + \frac{y}{a} \cdot \left(t - x\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 19
Error26.8
Cost840
\[\begin{array}{l} t_1 := x + \frac{t}{a} \cdot \left(y - z\right)\\ \mathbf{if}\;a \leq -1.4 \cdot 10^{-107}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-89}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 20
Error33.9
Cost712
\[\begin{array}{l} \mathbf{if}\;a \leq -9.7 \cdot 10^{+30}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{-89}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 21
Error28.7
Cost712
\[\begin{array}{l} t_1 := x + t \cdot \frac{y}{a}\\ \mathbf{if}\;a \leq -7.2 \cdot 10^{+30}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 6 \cdot 10^{-91}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 22
Error28.7
Cost712
\[\begin{array}{l} \mathbf{if}\;a \leq -1.15 \cdot 10^{+23}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-89}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \end{array} \]
Alternative 23
Error36.5
Cost328
\[\begin{array}{l} \mathbf{if}\;a \leq -1.8 \cdot 10^{+25}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 4.7 \cdot 10^{-66}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 24
Error45.8
Cost64
\[t \]

Error

Reproduce?

herbie shell --seed 2023074 
(FPCore (x y z t a)
  :name "Numeric.Signal:interpolate   from hsignal-0.2.7.1"
  :precision binary64
  (+ x (* (- y z) (/ (- t x) (- a z)))))