?

Average Error: 24.6 → 8.1
Time: 23.7s
Precision: binary64
Cost: 4432

?

\[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
\[\begin{array}{l} t_1 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \mathbf{if}\;t_1 \leq -2 \cdot 10^{+264}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t_1 \leq -1 \cdot 10^{-265}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\ \mathbf{elif}\;t_1 \leq 10^{+283}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y + \left(z - a\right) \cdot \frac{x - y}{t}\\ \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 (+ x (/ (* (- y x) (- z t)) (- a t)))))
   (if (<= t_1 -2e+264)
     (+ x (* (- z t) (/ (- y x) (- a t))))
     (if (<= t_1 -1e-265)
       t_1
       (if (<= t_1 0.0)
         (+ y (/ (- x y) (/ t (- z a))))
         (if (<= t_1 1e+283) t_1 (+ y (* (- z a) (/ (- x y) t)))))))))
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 = x + (((y - x) * (z - t)) / (a - t));
	double tmp;
	if (t_1 <= -2e+264) {
		tmp = x + ((z - t) * ((y - x) / (a - t)));
	} else if (t_1 <= -1e-265) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = y + ((x - y) / (t / (z - a)));
	} else if (t_1 <= 1e+283) {
		tmp = t_1;
	} else {
		tmp = y + ((z - a) * ((x - y) / t));
	}
	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) :: tmp
    t_1 = x + (((y - x) * (z - t)) / (a - t))
    if (t_1 <= (-2d+264)) then
        tmp = x + ((z - t) * ((y - x) / (a - t)))
    else if (t_1 <= (-1d-265)) then
        tmp = t_1
    else if (t_1 <= 0.0d0) then
        tmp = y + ((x - y) / (t / (z - a)))
    else if (t_1 <= 1d+283) then
        tmp = t_1
    else
        tmp = y + ((z - a) * ((x - y) / t))
    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 = x + (((y - x) * (z - t)) / (a - t));
	double tmp;
	if (t_1 <= -2e+264) {
		tmp = x + ((z - t) * ((y - x) / (a - t)));
	} else if (t_1 <= -1e-265) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = y + ((x - y) / (t / (z - a)));
	} else if (t_1 <= 1e+283) {
		tmp = t_1;
	} else {
		tmp = y + ((z - a) * ((x - y) / t));
	}
	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 = x + (((y - x) * (z - t)) / (a - t))
	tmp = 0
	if t_1 <= -2e+264:
		tmp = x + ((z - t) * ((y - x) / (a - t)))
	elif t_1 <= -1e-265:
		tmp = t_1
	elif t_1 <= 0.0:
		tmp = y + ((x - y) / (t / (z - a)))
	elif t_1 <= 1e+283:
		tmp = t_1
	else:
		tmp = y + ((z - a) * ((x - y) / t))
	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(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t)))
	tmp = 0.0
	if (t_1 <= -2e+264)
		tmp = Float64(x + Float64(Float64(z - t) * Float64(Float64(y - x) / Float64(a - t))));
	elseif (t_1 <= -1e-265)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = Float64(y + Float64(Float64(x - y) / Float64(t / Float64(z - a))));
	elseif (t_1 <= 1e+283)
		tmp = t_1;
	else
		tmp = Float64(y + Float64(Float64(z - a) * Float64(Float64(x - y) / t)));
	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 = x + (((y - x) * (z - t)) / (a - t));
	tmp = 0.0;
	if (t_1 <= -2e+264)
		tmp = x + ((z - t) * ((y - x) / (a - t)));
	elseif (t_1 <= -1e-265)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = y + ((x - y) / (t / (z - a)));
	elseif (t_1 <= 1e+283)
		tmp = t_1;
	else
		tmp = y + ((z - a) * ((x - y) / t));
	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[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+264], N[(x + N[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e-265], t$95$1, If[LessEqual[t$95$1, 0.0], N[(y + N[(N[(x - y), $MachinePrecision] / N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+283], t$95$1, N[(y + N[(N[(z - a), $MachinePrecision] * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\begin{array}{l}
t_1 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{+264}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y - x}{a - t}\\

\mathbf{elif}\;t_1 \leq -1 \cdot 10^{-265}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\

\mathbf{elif}\;t_1 \leq 10^{+283}:\\
\;\;\;\;t_1\\

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


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original24.6
Target9.2
Herbie8.1
\[\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))) < -2.00000000000000009e264

    1. Initial program 57.6

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

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

      [Start]57.6

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

      associate-*l/ [<=]18.1

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

    if -2.00000000000000009e264 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -9.99999999999999985e-266 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 9.99999999999999955e282

    1. Initial program 2.1

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

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

    1. Initial program 57.8

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

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

      [Start]57.8

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

      associate-/l* [=>]57.7

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

      \[\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.4

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

      [Start]3.5

      \[ \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.5

      \[ \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.5

      \[ \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.5

      \[ 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.5

      \[ 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.5

      \[ 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.5

      \[ 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.5

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

      associate-*r/ [<=]3.5

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

      mul-1-neg [=>]3.5

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

      unsub-neg [=>]3.5

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

      *-commutative [<=]3.5

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

      distribute-rgt-out-- [=>]3.5

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

      associate-/l* [=>]3.4

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

    if 9.99999999999999955e282 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 59.0

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

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

      [Start]59.0

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

      +-commutative [=>]59.0

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

      associate-*r/ [<=]15.5

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

      *-commutative [<=]15.5

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

      fma-def [=>]15.5

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

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

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

      [Start]42.1

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

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

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

      associate-*r* [<=]42.1

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

      *-commutative [<=]42.1

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

      associate-*r/ [<=]42.1

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

      mul-1-neg [=>]42.1

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

      unsub-neg [=>]42.1

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

      associate-/l* [=>]23.8

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

      associate-/r/ [=>]23.7

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq -2 \cdot 10^{+264}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq -1 \cdot 10^{-265}:\\ \;\;\;\;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 - y}{\frac{t}{z - a}}\\ \mathbf{elif}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq 10^{+283}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y + \left(z - a\right) \cdot \frac{x - y}{t}\\ \end{array} \]

Alternatives

Alternative 1
Error8.0
Cost8004
\[\begin{array}{l} t_1 := \left(z - a\right) \cdot \frac{x - y}{t}\\ t_2 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \mathbf{if}\;t_2 \leq -1 \cdot 10^{-265}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\ \mathbf{elif}\;t_2 \leq 0:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\ \mathbf{elif}\;t_2 \leq 10^{+283}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\left(y + t_1\right) + \frac{a}{t} \cdot t_1\\ \end{array} \]
Alternative 2
Error7.9
Cost4300
\[\begin{array}{l} t_1 := \left(z - a\right) \cdot \frac{x - y}{t}\\ t_2 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \mathbf{if}\;t_2 \leq -1 \cdot 10^{-265}:\\ \;\;\;\;x + \frac{y - x}{\frac{a - t}{z - t}}\\ \mathbf{elif}\;t_2 \leq 0:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\ \mathbf{elif}\;t_2 \leq 10^{+283}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\left(y + t_1\right) + \frac{a}{t} \cdot t_1\\ \end{array} \]
Alternative 3
Error8.0
Cost3532
\[\begin{array}{l} t_1 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{-265}:\\ \;\;\;\;x + \frac{y - x}{\frac{a - t}{z - t}}\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\ \mathbf{elif}\;t_1 \leq 10^{+283}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y + \left(z - a\right) \cdot \frac{x - y}{t}\\ \end{array} \]
Alternative 4
Error10.6
Cost1624
\[\begin{array}{l} t_1 := x + \left(z - t\right) \cdot \frac{y - x}{a - t}\\ t_2 := y + \left(z - a\right) \cdot \frac{x - y}{t}\\ \mathbf{if}\;t \leq -1.2 \cdot 10^{+105}:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{+49}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{+98}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 5.7 \cdot 10^{+153}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{+170}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{+209}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 5
Error35.8
Cost1568
\[\begin{array}{l} t_1 := \frac{z}{t} \cdot \left(x - y\right)\\ \mathbf{if}\;a \leq -1.5 \cdot 10^{+140}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -6.8 \cdot 10^{-100}:\\ \;\;\;\;y \cdot \frac{t}{t - a}\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-114}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{-191}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -1.12 \cdot 10^{-270}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{-285}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 4 \cdot 10^{-227}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 4.1 \cdot 10^{+136}:\\ \;\;\;\;\frac{-y}{\frac{a - t}{t}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 6
Error35.7
Cost1504
\[\begin{array}{l} t_1 := y \cdot \frac{t}{t - a}\\ t_2 := \frac{z}{t} \cdot \left(x - y\right)\\ \mathbf{if}\;a \leq -4.5 \cdot 10^{+139}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -6.8 \cdot 10^{-100}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{-114}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq -1.4 \cdot 10^{-191}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -2.5 \cdot 10^{-270}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 3 \cdot 10^{-280}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-227}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+137}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 7
Error30.6
Cost1368
\[\begin{array}{l} t_1 := z \cdot \frac{-x}{a - t}\\ t_2 := y \cdot \frac{z - t}{a - t}\\ \mathbf{if}\;x \leq -1.02 \cdot 10^{+205}:\\ \;\;\;\;\frac{z - a}{\frac{t}{x}}\\ \mathbf{elif}\;x \leq -5.5 \cdot 10^{+150}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -9.2 \cdot 10^{+61}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 3.9 \cdot 10^{-19}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 2.7 \cdot 10^{+140}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{+184}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 8
Error28.5
Cost1368
\[\begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ \mathbf{if}\;a \leq -2.25 \cdot 10^{+148}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -6.8 \cdot 10^{-100}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -5.5 \cdot 10^{-114}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 4.9 \cdot 10^{-85}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{-20}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a - t}\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{+136}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 9
Error24.6
Cost1368
\[\begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ t_2 := x + \left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{if}\;a \leq -7.5 \cdot 10^{+144}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -6.8 \cdot 10^{-100}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -5.1 \cdot 10^{-114}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 6 \cdot 10^{-87}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.25 \cdot 10^{-21}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a - t}\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{+120}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 10
Error20.4
Cost1368
\[\begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ t_2 := x + \left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{if}\;a \leq -5.6 \cdot 10^{+143}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -2.2 \cdot 10^{+17}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.5 \cdot 10^{-17}:\\ \;\;\;\;x - \frac{x}{\frac{a - t}{z - t}}\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-66}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;a \leq 4 \cdot 10^{-12}:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 1.02 \cdot 10^{+117}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 11
Error34.0
Cost1304
\[\begin{array}{l} t_1 := \frac{-y}{\frac{t}{z - t}}\\ \mathbf{if}\;a \leq -1.8 \cdot 10^{+140}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{-99}:\\ \;\;\;\;y \cdot \frac{t}{t - a}\\ \mathbf{elif}\;a \leq -5.5 \cdot 10^{-114}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq -1.1 \cdot 10^{-191}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -2 \cdot 10^{-272}:\\ \;\;\;\;\frac{z}{t} \cdot \left(x - y\right)\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{+128}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 12
Error18.8
Cost1232
\[\begin{array}{l} \mathbf{if}\;a \leq -1.2 \cdot 10^{+47}:\\ \;\;\;\;x + \frac{x - y}{\frac{a}{t} + -1}\\ \mathbf{elif}\;a \leq 8.8 \cdot 10^{-10}:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\ \mathbf{elif}\;a \leq 8 \cdot 10^{+108}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq 1.85 \cdot 10^{+117}:\\ \;\;\;\;y + \left(z - a\right) \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\ \end{array} \]
Alternative 13
Error20.9
Cost1104
\[\begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ t_2 := x + \left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{if}\;a \leq -1.35 \cdot 10^{+146}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1.85 \cdot 10^{-13}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 3.7 \cdot 10^{-10}:\\ \;\;\;\;y - \frac{z}{\frac{t}{y - x}}\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{+116}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 14
Error20.1
Cost1104
\[\begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ t_2 := x + \left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{if}\;a \leq -5.2 \cdot 10^{+143}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -5.8 \cdot 10^{-11}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{-13}:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{+119}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 15
Error19.8
Cost1100
\[\begin{array}{l} t_1 := x + \frac{x - y}{\frac{a}{t} + -1}\\ \mathbf{if}\;a \leq -6.2 \cdot 10^{-18}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.25 \cdot 10^{-11}:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 3 \cdot 10^{+134}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 16
Error34.9
Cost976
\[\begin{array}{l} t_1 := y \cdot \frac{t}{t - a}\\ \mathbf{if}\;a \leq -1.16 \cdot 10^{+137}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -9.5 \cdot 10^{-100}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-114}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{+138}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 17
Error36.4
Cost716
\[\begin{array}{l} \mathbf{if}\;a \leq -2.1 \cdot 10^{+135}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{-99}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{-114}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{elif}\;a \leq 6.4 \cdot 10^{+134}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 18
Error36.4
Cost716
\[\begin{array}{l} \mathbf{if}\;a \leq -1.35 \cdot 10^{+135}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -6.8 \cdot 10^{-100}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -5.8 \cdot 10^{-114}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{+134}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 19
Error36.4
Cost328
\[\begin{array}{l} \mathbf{if}\;a \leq -5.5 \cdot 10^{+135}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{+134}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 20
Error45.7
Cost64
\[x \]

Error

Reproduce?

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