?

Average Error: 38.44% → 11.27%
Time: 23.8s
Precision: binary64
Cost: 4432

?

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

\mathbf{elif}\;t_2 \leq -4 \cdot 10^{-287}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;y + \frac{x}{t_1}\\

\mathbf{elif}\;t_2 \leq 10^{+308}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;y + \frac{x - y}{t_1}\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original38.44%
Target14.16%
Herbie11.27%
\[\begin{array}{l} \mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\ \;\;\;\;x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\ \;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\ \end{array} \]

Derivation?

  1. Split input into 4 regimes
  2. if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -5.00000000000000033e293

    1. Initial program 95.48

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

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

      [Start]95.48

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

      associate-*l/ [<=]28.38

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

    if -5.00000000000000033e293 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -4.00000000000000009e-287 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 1e308

    1. Initial program 3.29

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

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

    1. Initial program 92.38

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

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

      [Start]92.38

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

      associate-/l* [=>]91.99

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

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

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

      [Start]3.53

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

      +-commutative [=>]3.53

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

      associate--l+ [=>]3.52

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

      *-commutative [=>]3.52

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

      associate-*r/ [=>]3.52

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

      associate-*r/ [=>]3.52

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

      div-sub [<=]3.54

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

      distribute-lft-out-- [=>]3.54

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

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

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

      [Start]3.54

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

      associate-*r/ [<=]11.96

      \[ y + \color{blue}{\left(z - a\right) \cdot \frac{x}{t}} \]
    7. Applied egg-rr3.86

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

    if 1e308 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 100

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

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

      [Start]100

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

      +-commutative [=>]100

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

      associate-*l/ [<=]26.79

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

      fma-def [=>]26.61

      \[ \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    3. Taylor expanded in t around -inf 64.03

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

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

      [Start]64.03

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

      mul-1-neg [=>]64.03

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

      unsub-neg [=>]64.03

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

      +-commutative [=>]64.03

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

      associate-*r* [=>]64.03

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

      distribute-rgt-out [=>]64.03

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

      associate-/l* [=>]32.29

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

      mul-1-neg [=>]32.29

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

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

Alternatives

Alternative 1
Error12.01%
Cost9804
\[\begin{array}{l} t_1 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ t_2 := \frac{t}{z - a}\\ \mathbf{if}\;t_1 \leq -4 \cdot 10^{-287}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{-1}{\frac{t - a}{z - t}}\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;y + \frac{x}{t_2}\\ \mathbf{elif}\;t_1 \leq 10^{+308}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\ \mathbf{else}:\\ \;\;\;\;y + \frac{x - y}{t_2}\\ \end{array} \]
Alternative 2
Error11.96%
Cost3532
\[\begin{array}{l} t_1 := x + \frac{y - x}{\frac{a - t}{z - t}}\\ t_2 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ t_3 := \frac{t}{z - a}\\ \mathbf{if}\;t_2 \leq -4 \cdot 10^{-287}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq 0:\\ \;\;\;\;y + \frac{x}{t_3}\\ \mathbf{elif}\;t_2 \leq 4 \cdot 10^{+306}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y + \frac{x - y}{t_3}\\ \end{array} \]
Alternative 3
Error12.05%
Cost3532
\[\begin{array}{l} t_1 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ t_2 := \frac{t}{z - a}\\ \mathbf{if}\;t_1 \leq -4 \cdot 10^{-287}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{-1}{\frac{t - a}{z - t}}\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;y + \frac{x}{t_2}\\ \mathbf{elif}\;t_1 \leq 4 \cdot 10^{+306}:\\ \;\;\;\;x + \frac{y - x}{\frac{a - t}{z - t}}\\ \mathbf{else}:\\ \;\;\;\;y + \frac{x - y}{t_2}\\ \end{array} \]
Alternative 4
Error40.42%
Cost1504
\[\begin{array}{l} t_1 := \left(z - t\right) \cdot \frac{y}{a - t}\\ t_2 := y + x \cdot \frac{z}{t}\\ t_3 := \left(y - x\right) \cdot \frac{z}{a - t}\\ \mathbf{if}\;t \leq -2.15 \cdot 10^{+166}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -2.7 \cdot 10^{+112}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -3 \cdot 10^{+47}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.75 \cdot 10^{-17}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-81}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{-41}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \mathbf{elif}\;t \leq 9 \cdot 10^{+98}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{+148}:\\ \;\;\;\;y - x \cdot \frac{a}{t}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 5
Error37.54%
Cost1500
\[\begin{array}{l} t_1 := \left(z - t\right) \cdot \frac{y}{a - t}\\ t_2 := y + x \cdot \frac{z}{t}\\ t_3 := x - \left(x - y\right) \cdot \frac{z}{a}\\ \mathbf{if}\;t \leq -2.5 \cdot 10^{+166}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -2 \cdot 10^{+114}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -8 \cdot 10^{+88}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.95 \cdot 10^{-17}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -2.45 \cdot 10^{-80}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.45 \cdot 10^{-43}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{+98}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y - x \cdot \frac{a}{t}\\ \end{array} \]
Alternative 6
Error31.84%
Cost1368
\[\begin{array}{l} t_1 := \left(z - t\right) \cdot \frac{y}{a - t}\\ t_2 := y - \frac{x}{t} \cdot \left(a - z\right)\\ t_3 := x - \left(x - y\right) \cdot \frac{z}{a}\\ \mathbf{if}\;t \leq -6.5 \cdot 10^{+158}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -8 \cdot 10^{+112}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -3.2 \cdot 10^{+87}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{-17}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -2.5 \cdot 10^{-80}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-33}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 7
Error31.54%
Cost1368
\[\begin{array}{l} t_1 := x - \left(x - y\right) \cdot \frac{z}{a}\\ t_2 := \left(z - t\right) \cdot \frac{y}{a - t}\\ t_3 := y + \frac{x}{\frac{t}{z - a}}\\ \mathbf{if}\;t \leq -4.8 \cdot 10^{+158}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -4.6 \cdot 10^{+114}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.06 \cdot 10^{+86}:\\ \;\;\;\;y - \frac{x}{t} \cdot \left(a - z\right)\\ \mathbf{elif}\;t \leq -4.5 \cdot 10^{-17}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -2.5 \cdot 10^{-80}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 4 \cdot 10^{-36}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 8
Error28.57%
Cost1364
\[\begin{array}{l} t_1 := x + \frac{z - t}{\frac{a}{y - x}}\\ \mathbf{if}\;a \leq -4.1 \cdot 10^{+15}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.35 \cdot 10^{-29}:\\ \;\;\;\;y + \frac{x}{\frac{t}{z - a}}\\ \mathbf{elif}\;a \leq -4.5 \cdot 10^{-63}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -5.3 \cdot 10^{-169}:\\ \;\;\;\;\frac{y}{\frac{a - t}{z - t}}\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{+62}:\\ \;\;\;\;y + \frac{z}{t} \cdot \left(x - y\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 9
Error27.33%
Cost1364
\[\begin{array}{l} t_1 := x + \frac{z - t}{\frac{a}{y - x}}\\ \mathbf{if}\;a \leq -2400000000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.35 \cdot 10^{-29}:\\ \;\;\;\;y + \left(z - a\right) \cdot \frac{x - y}{t}\\ \mathbf{elif}\;a \leq -3.4 \cdot 10^{-63}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{-92}:\\ \;\;\;\;y + \frac{z}{t} \cdot \left(x - y\right)\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{+61}:\\ \;\;\;\;y + \frac{x}{\frac{t}{z - a}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 10
Error26.52%
Cost1364
\[\begin{array}{l} t_1 := y + \frac{x - y}{\frac{t}{z - a}}\\ t_2 := x + \frac{z - t}{\frac{a}{y - x}}\\ \mathbf{if}\;a \leq -13000000000000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -5.3 \cdot 10^{-28}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -4.6 \cdot 10^{-63}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -7 \cdot 10^{-169}:\\ \;\;\;\;\frac{y}{\frac{a - t}{z - t}}\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{+59}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 11
Error39.9%
Cost1240
\[\begin{array}{l} t_1 := \left(z - t\right) \cdot \frac{y}{a - t}\\ t_2 := y + x \cdot \frac{z}{t}\\ t_3 := x + z \cdot \frac{y}{a}\\ \mathbf{if}\;t \leq -3.5 \cdot 10^{+166}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.4 \cdot 10^{+112}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -2 \cdot 10^{+86}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{-17}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-81}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 4 \cdot 10^{-36}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 12
Error31.14%
Cost1236
\[\begin{array}{l} t_1 := y + \frac{x}{\frac{t}{z - a}}\\ \mathbf{if}\;t \leq -1.8 \cdot 10^{+158}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.95 \cdot 10^{+113}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq -2.5 \cdot 10^{+87}:\\ \;\;\;\;y - \frac{x}{t} \cdot \left(a - z\right)\\ \mathbf{elif}\;t \leq -5.2 \cdot 10^{-210}:\\ \;\;\;\;x + \frac{z - t}{\frac{a}{y}}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{-33}:\\ \;\;\;\;x - \left(x - y\right) \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 13
Error16.1%
Cost1096
\[\begin{array}{l} t_1 := \frac{t}{z - a}\\ \mathbf{if}\;t \leq -3.1 \cdot 10^{+159}:\\ \;\;\;\;y + \frac{x}{t_1}\\ \mathbf{elif}\;t \leq 6 \cdot 10^{+97}:\\ \;\;\;\;x + \left(t - z\right) \cdot \frac{x - y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y + \frac{x - y}{t_1}\\ \end{array} \]
Alternative 14
Error47.14%
Cost713
\[\begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{-30} \lor \neg \left(t \leq 2.45 \cdot 10^{-33}\right):\\ \;\;\;\;y + x \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 15
Error39.53%
Cost713
\[\begin{array}{l} \mathbf{if}\;t \leq -4.85 \cdot 10^{+86} \lor \neg \left(t \leq 2.65 \cdot 10^{-33}\right):\\ \;\;\;\;y + x \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \end{array} \]
Alternative 16
Error55.38%
Cost328
\[\begin{array}{l} \mathbf{if}\;t \leq -1.32 \cdot 10^{+86}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 60:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
Alternative 17
Error71.81%
Cost64
\[x \]

Error

Reproduce?

herbie shell --seed 2023088 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
  :precision binary64

  :herbie-target
  (if (< a -1.6153062845442575e-142) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t)))) (if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))

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