Numeric.Signal:interpolate from hsignal-0.2.7.1

?

Percentage Accurate: 80.2% → 94.8%
Time: 27.3s
Precision: binary64
Cost: 2889

?

\[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
\[\begin{array}{l} t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ t_2 := \frac{z}{t - x}\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{-266} \lor \neg \left(t_1 \leq 0\right):\\ \;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;\left(t - \frac{y}{t_2}\right) + \frac{a}{t_2}\\ \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 (+ x (* (- y z) (/ (- t x) (- a z))))) (t_2 (/ z (- t x))))
   (if (or (<= t_1 -1e-266) (not (<= t_1 0.0)))
     (+ x (/ (- t x) (/ (- a z) (- y z))))
     (+ (- t (/ y t_2)) (/ a t_2)))))
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 = x + ((y - z) * ((t - x) / (a - z)));
	double t_2 = z / (t - x);
	double tmp;
	if ((t_1 <= -1e-266) || !(t_1 <= 0.0)) {
		tmp = x + ((t - x) / ((a - z) / (y - z)));
	} else {
		tmp = (t - (y / t_2)) + (a / t_2);
	}
	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 = x + ((y - z) * ((t - x) / (a - z)))
    t_2 = z / (t - x)
    if ((t_1 <= (-1d-266)) .or. (.not. (t_1 <= 0.0d0))) then
        tmp = x + ((t - x) / ((a - z) / (y - z)))
    else
        tmp = (t - (y / t_2)) + (a / t_2)
    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 = x + ((y - z) * ((t - x) / (a - z)));
	double t_2 = z / (t - x);
	double tmp;
	if ((t_1 <= -1e-266) || !(t_1 <= 0.0)) {
		tmp = x + ((t - x) / ((a - z) / (y - z)));
	} else {
		tmp = (t - (y / t_2)) + (a / t_2);
	}
	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 = x + ((y - z) * ((t - x) / (a - z)))
	t_2 = z / (t - x)
	tmp = 0
	if (t_1 <= -1e-266) or not (t_1 <= 0.0):
		tmp = x + ((t - x) / ((a - z) / (y - z)))
	else:
		tmp = (t - (y / t_2)) + (a / t_2)
	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(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))))
	t_2 = Float64(z / Float64(t - x))
	tmp = 0.0
	if ((t_1 <= -1e-266) || !(t_1 <= 0.0))
		tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z))));
	else
		tmp = Float64(Float64(t - Float64(y / t_2)) + Float64(a / t_2));
	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 = x + ((y - z) * ((t - x) / (a - z)));
	t_2 = z / (t - x);
	tmp = 0.0;
	if ((t_1 <= -1e-266) || ~((t_1 <= 0.0)))
		tmp = x + ((t - x) / ((a - z) / (y - z)));
	else
		tmp = (t - (y / t_2)) + (a / t_2);
	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[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e-266], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t - N[(y / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(a / t$95$2), $MachinePrecision]), $MachinePrecision]]]]
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
t_2 := \frac{z}{t - x}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{-266} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\

\mathbf{else}:\\
\;\;\;\;\left(t - \frac{y}{t_2}\right) + \frac{a}{t_2}\\


\end{array}

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Herbie found 25 alternatives:

AlternativeAccuracySpeedup

Accuracy vs Speed

The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Bogosity?

Bogosity

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)))) < -9.9999999999999998e-267 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 89.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Applied egg-rr94.3%

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
      Step-by-step derivation

      [Start]89.4%

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

      *-commutative [=>]89.4%

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

      associate-*l/ [=>]75.0%

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

      associate-*r/ [<=]94.3%

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

      clear-num [=>]94.2%

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

      un-div-inv [=>]94.3%

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

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

    1. Initial program 4.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Applied egg-rr4.0%

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
      Step-by-step derivation

      [Start]4.0%

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

      *-commutative [=>]4.0%

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

      associate-*l/ [=>]3.1%

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

      associate-*r/ [<=]4.0%

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

      clear-num [=>]4.0%

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

      un-div-inv [=>]4.0%

      \[ x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    3. Taylor expanded in z around inf 85.8%

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

      \[\leadsto \color{blue}{\left(t - \frac{y}{\frac{z}{t - x}}\right) + \frac{a}{\frac{z}{t - x}}} \]
      Step-by-step derivation

      [Start]85.8%

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

      sub-neg [=>]85.8%

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

      +-commutative [=>]85.8%

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

      mul-1-neg [=>]85.8%

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

      unsub-neg [=>]85.8%

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

      associate-/l* [=>]88.5%

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

      mul-1-neg [=>]88.5%

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

      remove-double-neg [=>]88.5%

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

      associate-/l* [=>]99.9%

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

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

Alternatives

Alternative 1
Accuracy94.8%
Cost2889
\[\begin{array}{l} t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ t_2 := \frac{z}{t - x}\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{-266} \lor \neg \left(t_1 \leq 0\right):\\ \;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;\left(t - \frac{y}{t_2}\right) + \frac{a}{t_2}\\ \end{array} \]
Alternative 2
Accuracy89.1%
Cost2633
\[\begin{array}{l} t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{-266} \lor \neg \left(t_1 \leq 0\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \end{array} \]
Alternative 3
Accuracy92.9%
Cost2633
\[\begin{array}{l} t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{-266} \lor \neg \left(t_1 \leq 0\right):\\ \;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \end{array} \]
Alternative 4
Accuracy49.0%
Cost1636
\[\begin{array}{l} t_1 := \frac{-t}{\frac{z}{y - z}}\\ t_2 := t \cdot \frac{y - z}{a}\\ \mathbf{if}\;a \leq -9 \cdot 10^{+139}:\\ \;\;\;\;x - \frac{z}{\frac{a}{t}}\\ \mathbf{elif}\;a \leq -2.5 \cdot 10^{+32}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -3.5 \cdot 10^{-96}:\\ \;\;\;\;\frac{-y}{\frac{a - z}{x}}\\ \mathbf{elif}\;a \leq -4.6 \cdot 10^{-163}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -5.2 \cdot 10^{-176}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1.35 \cdot 10^{-184}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;a \leq 3.9 \cdot 10^{-128}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-36}:\\ \;\;\;\;\frac{x \cdot \left(-y\right)}{a - z}\\ \mathbf{elif}\;a \leq 1.95 \cdot 10^{-26}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \end{array} \]
Alternative 5
Accuracy69.8%
Cost1628
\[\begin{array}{l} t_1 := t + \frac{y \cdot \left(x - t\right)}{z}\\ t_2 := \frac{y - z}{a - z}\\ t_3 := x + \left(y - z\right) \cdot \frac{t - x}{a}\\ \mathbf{if}\;a \leq -7 \cdot 10^{+96}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -0.012:\\ \;\;\;\;t \cdot t_2\\ \mathbf{elif}\;a \leq -2.15 \cdot 10^{-55}:\\ \;\;\;\;x \cdot \left(1 - t_2\right)\\ \mathbf{elif}\;a \leq 1.22 \cdot 10^{-82}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-8}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+15}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.15 \cdot 10^{+20}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 6
Accuracy65.9%
Cost1501
\[\begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := x + \frac{t - x}{\frac{a}{y}}\\ t_3 := t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{if}\;a \leq -6.4 \cdot 10^{+96}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -3 \cdot 10^{+31}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{-79}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{-8}:\\ \;\;\;\;\frac{y \cdot \left(t - x\right)}{a - z}\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{+15}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 9.8 \cdot 10^{+67} \lor \neg \left(a \leq 5.5 \cdot 10^{+135}\right):\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 7
Accuracy45.6%
Cost1372
\[\begin{array}{l} t_1 := x - x \cdot \frac{y}{a}\\ \mathbf{if}\;z \leq -4 \cdot 10^{+28}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -5.6 \cdot 10^{-266}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-217}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 1.72 \cdot 10^{-196}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-76}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-50}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;z \leq 1.92 \cdot 10^{+127}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
Alternative 8
Accuracy47.9%
Cost1372
\[\begin{array}{l} t_1 := x - x \cdot \frac{y}{a}\\ \mathbf{if}\;z \leq -7.7 \cdot 10^{+28}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -9.8 \cdot 10^{-267}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-221}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-196}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.16 \cdot 10^{-76}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-50}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{+124}:\\ \;\;\;\;x - \frac{z}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
Alternative 9
Accuracy47.6%
Cost1372
\[\begin{array}{l} t_1 := x - x \cdot \frac{y}{a}\\ \mathbf{if}\;z \leq -1.38 \cdot 10^{+28}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -9.2 \cdot 10^{-269}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-219}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-195}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.55 \cdot 10^{-76}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 10^{-50}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+125}:\\ \;\;\;\;x - \frac{z \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
Alternative 10
Accuracy37.1%
Cost1240
\[\begin{array}{l} t_1 := t \cdot \frac{y - z}{a}\\ \mathbf{if}\;z \leq -1.96 \cdot 10^{+28}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.36 \cdot 10^{-241}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-307}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 10^{-273}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{-230}:\\ \;\;\;\;\frac{y}{a} \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+125}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
Alternative 11
Accuracy49.3%
Cost1240
\[\begin{array}{l} t_1 := \frac{x \cdot \left(-y\right)}{a - z}\\ \mathbf{if}\;a \leq -6 \cdot 10^{+140}:\\ \;\;\;\;x - \frac{z}{\frac{a}{t}}\\ \mathbf{elif}\;a \leq -8.5 \cdot 10^{+31}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;a \leq -5.2 \cdot 10^{-99}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{-128}:\\ \;\;\;\;\frac{-t}{\frac{z}{y - z}}\\ \mathbf{elif}\;a \leq 1.42 \cdot 10^{-39}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{-28}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \end{array} \]
Alternative 12
Accuracy66.1%
Cost1237
\[\begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{if}\;a \leq -1.15 \cdot 10^{+101}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -9.2 \cdot 10^{+33}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{-74}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 9.6 \cdot 10^{+67} \lor \neg \left(a \leq 1.26 \cdot 10^{+137}\right):\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 13
Accuracy40.1%
Cost1108
\[\begin{array}{l} t_1 := y \cdot \frac{t - x}{a}\\ \mathbf{if}\;z \leq -2.3 \cdot 10^{+28}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.85 \cdot 10^{-130}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -5 \cdot 10^{-244}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-85}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{+126}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
Alternative 14
Accuracy39.9%
Cost1108
\[\begin{array}{l} \mathbf{if}\;z \leq -6 \cdot 10^{+159}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{-124}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-244}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{-84}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+126}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
Alternative 15
Accuracy40.1%
Cost1108
\[\begin{array}{l} \mathbf{if}\;z \leq -2.25 \cdot 10^{+165}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -7.1 \cdot 10^{-124}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{-244}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-117}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+124}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
Alternative 16
Accuracy46.1%
Cost1108
\[\begin{array}{l} t_1 := x + \frac{y \cdot t}{a}\\ \mathbf{if}\;z \leq -3.4 \cdot 10^{+28}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -8.8 \cdot 10^{-269}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-229}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-113}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.32 \cdot 10^{+131}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
Alternative 17
Accuracy56.2%
Cost1104
\[\begin{array}{l} t_1 := x - x \cdot \frac{y}{a}\\ \mathbf{if}\;x \leq -2.8 \cdot 10^{+273}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -3.2 \cdot 10^{+154}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;x \leq -1.2 \cdot 10^{+60}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.55 \cdot 10^{+154}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{-y}{\frac{a - z}{x}}\\ \end{array} \]
Alternative 18
Accuracy36.7%
Cost980
\[\begin{array}{l} t_1 := t \cdot \frac{y}{a}\\ \mathbf{if}\;z \leq -1.38 \cdot 10^{+28}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -4 \cdot 10^{-244}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-48}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 5.3 \cdot 10^{+35}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+124}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
Alternative 19
Accuracy56.3%
Cost972
\[\begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -1.8 \cdot 10^{+22}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-244}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-50}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 20
Accuracy72.5%
Cost969
\[\begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{+28} \lor \neg \left(z \leq 5.8 \cdot 10^{+124}\right):\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t - x}{\frac{a - z}{y}}\\ \end{array} \]
Alternative 21
Accuracy73.4%
Cost968
\[\begin{array}{l} \mathbf{if}\;z \leq -1.9 \cdot 10^{+29}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+125}:\\ \;\;\;\;x + \frac{t - x}{\frac{a - z}{y}}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \end{array} \]
Alternative 22
Accuracy65.6%
Cost841
\[\begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{+28} \lor \neg \left(z \leq 4.4 \cdot 10^{-84}\right):\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \end{array} \]
Alternative 23
Accuracy66.5%
Cost841
\[\begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{+28} \lor \neg \left(z \leq 2.6 \cdot 10^{-76}\right):\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \end{array} \]
Alternative 24
Accuracy38.5%
Cost328
\[\begin{array}{l} \mathbf{if}\;z \leq -4.4 \cdot 10^{+28}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+124}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
Alternative 25
Accuracy24.9%
Cost64
\[t \]

Reproduce?

herbie shell --seed 2023272 
(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)))))