?

Average Error: 24.6 → 7.8
Time: 23.7s
Precision: binary64
Cost: 1220

?

\[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
\[\begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{+189}:\\ \;\;\;\;t + \left(\frac{y}{z} \cdot \left(x - t\right) - \frac{x - t}{\frac{z}{a}}\right)\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{+157}:\\ \;\;\;\;x - \left(t - x\right) \cdot \frac{z - y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t - \frac{x - t}{\frac{z}{a - y}}\\ \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
 (if (<= z -4.5e+189)
   (+ t (- (* (/ y z) (- x t)) (/ (- x t) (/ z a))))
   (if (<= z 4.2e+157)
     (- x (* (- t x) (/ (- z y) (- a z))))
     (- t (/ (- x t) (/ z (- a y)))))))
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 tmp;
	if (z <= -4.5e+189) {
		tmp = t + (((y / z) * (x - t)) - ((x - t) / (z / a)));
	} else if (z <= 4.2e+157) {
		tmp = x - ((t - x) * ((z - y) / (a - z)));
	} else {
		tmp = t - ((x - t) / (z / (a - y)));
	}
	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) :: tmp
    if (z <= (-4.5d+189)) then
        tmp = t + (((y / z) * (x - t)) - ((x - t) / (z / a)))
    else if (z <= 4.2d+157) then
        tmp = x - ((t - x) * ((z - y) / (a - z)))
    else
        tmp = t - ((x - t) / (z / (a - y)))
    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 tmp;
	if (z <= -4.5e+189) {
		tmp = t + (((y / z) * (x - t)) - ((x - t) / (z / a)));
	} else if (z <= 4.2e+157) {
		tmp = x - ((t - x) * ((z - y) / (a - z)));
	} else {
		tmp = t - ((x - t) / (z / (a - y)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	return x + (((y - z) * (t - x)) / (a - z))
def code(x, y, z, t, a):
	tmp = 0
	if z <= -4.5e+189:
		tmp = t + (((y / z) * (x - t)) - ((x - t) / (z / a)))
	elif z <= 4.2e+157:
		tmp = x - ((t - x) * ((z - y) / (a - z)))
	else:
		tmp = t - ((x - t) / (z / (a - y)))
	return tmp
function code(x, y, z, t, a)
	return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z)))
end
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -4.5e+189)
		tmp = Float64(t + Float64(Float64(Float64(y / z) * Float64(x - t)) - Float64(Float64(x - t) / Float64(z / a))));
	elseif (z <= 4.2e+157)
		tmp = Float64(x - Float64(Float64(t - x) * Float64(Float64(z - y) / Float64(a - z))));
	else
		tmp = Float64(t - Float64(Float64(x - t) / Float64(z / Float64(a - y))));
	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)
	tmp = 0.0;
	if (z <= -4.5e+189)
		tmp = t + (((y / z) * (x - t)) - ((x - t) / (z / a)));
	elseif (z <= 4.2e+157)
		tmp = x - ((t - x) * ((z - y) / (a - z)));
	else
		tmp = t - ((x - t) / (z / (a - y)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.5e+189], N[(t + N[(N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] - N[(N[(x - t), $MachinePrecision] / N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e+157], N[(x - N[(N[(t - x), $MachinePrecision] * N[(N[(z - y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t - N[(N[(x - t), $MachinePrecision] / N[(z / N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{+189}:\\
\;\;\;\;t + \left(\frac{y}{z} \cdot \left(x - t\right) - \frac{x - t}{\frac{z}{a}}\right)\\

\mathbf{elif}\;z \leq 4.2 \cdot 10^{+157}:\\
\;\;\;\;x - \left(t - x\right) \cdot \frac{z - y}{a - z}\\

\mathbf{else}:\\
\;\;\;\;t - \frac{x - t}{\frac{z}{a - y}}\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original24.6
Target11.6
Herbie7.8
\[\begin{array}{l} \mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\ \;\;\;\;t - \frac{y}{z} \cdot \left(t - x\right)\\ \mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;t - \frac{y}{z} \cdot \left(t - x\right)\\ \end{array} \]

Derivation?

  1. Split input into 3 regimes
  2. if z < -4.49999999999999973e189

    1. Initial program 50.2

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

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

      [Start]50.2

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

      +-commutative [=>]50.2

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

      associate-*r/ [<=]30.1

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

      *-commutative [<=]30.1

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

      fma-def [=>]30.0

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

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

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

      [Start]22.7

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

      +-commutative [=>]22.7

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

      mul-1-neg [=>]22.7

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

      unsub-neg [=>]22.7

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

      associate--l+ [=>]22.7

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

      *-commutative [=>]22.7

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

      associate-/l* [=>]18.4

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

      associate-/l* [=>]8.5

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

      associate-/r/ [=>]7.6

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

    if -4.49999999999999973e189 < z < 4.2e157

    1. Initial program 16.3

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

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

      [Start]16.3

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

      associate-*l/ [<=]7.7

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

    if 4.2e157 < z

    1. Initial program 48.5

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

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

      [Start]48.5

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

      +-commutative [=>]48.5

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

      associate-*r/ [<=]28.1

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

      *-commutative [<=]28.1

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

      fma-def [=>]28.0

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

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

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

      [Start]23.2

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

      +-commutative [=>]23.2

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

      mul-1-neg [=>]23.2

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

      unsub-neg [=>]23.2

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

      associate--l+ [=>]23.2

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

      *-commutative [=>]23.2

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

      associate-/l* [=>]18.3

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

      associate-/l* [=>]9.1

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

      associate-/r/ [=>]8.0

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

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

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

      [Start]23.2

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

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

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

      associate-/l* [=>]8.0

      \[ t + \color{blue}{\frac{t - x}{\frac{z}{a - y}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification7.8

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

Alternatives

Alternative 1
Error27.0
Cost2160
\[\begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := x + t \cdot \frac{y}{a}\\ t_3 := x - x \cdot \frac{y}{a}\\ \mathbf{if}\;a \leq -8.5 \cdot 10^{+78}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1.45 \cdot 10^{-8}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-36}:\\ \;\;\;\;x + \frac{y}{\frac{-a}{x}}\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-96}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{-6}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{+23}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.72 \cdot 10^{+76}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{+94}:\\ \;\;\;\;t \cdot \frac{-z}{a - z}\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{+118}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{+129}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{+204}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{+224}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 2
Error24.2
Cost1632
\[\begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := x + \left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{if}\;a \leq -2.7 \cdot 10^{+68}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1.25 \cdot 10^{-8}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -7 \cdot 10^{-36}:\\ \;\;\;\;x + \frac{y}{\frac{-a}{x}}\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{-96}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 5 \cdot 10^{-8}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 1.46 \cdot 10^{+23}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.72 \cdot 10^{+76}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 1.36 \cdot 10^{+94}:\\ \;\;\;\;t \cdot \frac{-z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 3
Error24.0
Cost1632
\[\begin{array}{l} t_1 := x - y \cdot \frac{x - t}{a}\\ t_2 := x + \left(y - z\right) \cdot \frac{t}{a}\\ t_3 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;a \leq -2.5 \cdot 10^{+230}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -4.7 \cdot 10^{-36}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{-97}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-5}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{+22}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 2.65 \cdot 10^{+76}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{+95}:\\ \;\;\;\;t \cdot \frac{-z}{a - z}\\ \mathbf{elif}\;a \leq 6.6 \cdot 10^{+179}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 4
Error26.8
Cost1500
\[\begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := x - x \cdot \frac{y}{a}\\ \mathbf{if}\;z \leq -2.85 \cdot 10^{+57}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -750:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -2.05 \cdot 10^{-50}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.32 \cdot 10^{-191}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-257}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-169}:\\ \;\;\;\;x + \frac{t \cdot y}{a}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+62}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 5
Error17.4
Cost1496
\[\begin{array}{l} t_1 := t - \frac{x - t}{\frac{z}{a - y}}\\ t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a}\\ t_3 := x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{if}\;a \leq -8.5 \cdot 10^{+35}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -190000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -4.7 \cdot 10^{-36}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{-46}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.72 \cdot 10^{+76}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+92}:\\ \;\;\;\;t + a \cdot \left(\frac{t}{z} - \frac{x}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 6
Error17.4
Cost1496
\[\begin{array}{l} t_1 := t - \frac{x - t}{\frac{z}{a - y}}\\ t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a}\\ \mathbf{if}\;a \leq -4.5 \cdot 10^{+36}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1.26 \cdot 10^{-8}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -3.5 \cdot 10^{-36}:\\ \;\;\;\;x + x \cdot \frac{z - y}{a - z}\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{-46}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.72 \cdot 10^{+76}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq 7 \cdot 10^{+92}:\\ \;\;\;\;t + a \cdot \left(\frac{t}{z} - \frac{x}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 7
Error29.9
Cost1436
\[\begin{array}{l} t_1 := x - x \cdot \frac{y}{a}\\ t_2 := x + t \cdot \frac{y}{a}\\ t_3 := t \cdot \frac{-z}{a - z}\\ \mathbf{if}\;z \leq -2.15 \cdot 10^{+98}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq -6.6 \cdot 10^{-19}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -8.2 \cdot 10^{-50}:\\ \;\;\;\;\frac{-y}{\frac{z}{t - x}}\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-191}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{-258}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-169}:\\ \;\;\;\;x + \frac{t \cdot y}{a}\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{+102}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 8
Error41.6
Cost1376
\[\begin{array}{l} t_1 := t \cdot \frac{y}{a - z}\\ \mathbf{if}\;x \leq -5.2 \cdot 10^{-41}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -3.9 \cdot 10^{-199}:\\ \;\;\;\;t\\ \mathbf{elif}\;x \leq 1.15 \cdot 10^{-267}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 2.5 \cdot 10^{-248}:\\ \;\;\;\;t\\ \mathbf{elif}\;x \leq 8.2 \cdot 10^{-172}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 3.1 \cdot 10^{-74}:\\ \;\;\;\;t\\ \mathbf{elif}\;x \leq 5.4 \cdot 10^{+181}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 8.1 \cdot 10^{+207}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 9
Error41.6
Cost1244
\[\begin{array}{l} \mathbf{if}\;x \leq -2.6 \cdot 10^{-40}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -1.2 \cdot 10^{-202}:\\ \;\;\;\;t\\ \mathbf{elif}\;x \leq 9 \cdot 10^{-294}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;x \leq 3.2 \cdot 10^{-167}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{-74}:\\ \;\;\;\;t\\ \mathbf{elif}\;x \leq 5.4 \cdot 10^{+181}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 8 \cdot 10^{+207}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 10
Error41.6
Cost1244
\[\begin{array}{l} \mathbf{if}\;x \leq -1.32 \cdot 10^{-41}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -3.8 \cdot 10^{-201}:\\ \;\;\;\;t\\ \mathbf{elif}\;x \leq 6.2 \cdot 10^{-293}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;x \leq 6.2 \cdot 10^{-169}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{-74}:\\ \;\;\;\;t\\ \mathbf{elif}\;x \leq 5.4 \cdot 10^{+181}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.15 \cdot 10^{+208}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 11
Error18.2
Cost1233
\[\begin{array}{l} t_1 := t - \frac{x - t}{\frac{z}{a - y}}\\ \mathbf{if}\;z \leq -1.85 \cdot 10^{+106}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -7 \cdot 10^{-19}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-50} \lor \neg \left(z \leq 1.65 \cdot 10^{+81}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \end{array} \]
Alternative 12
Error22.0
Cost1104
\[\begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -2.8 \cdot 10^{+74}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{-17}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq -8.2 \cdot 10^{-50}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{+59}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 13
Error22.0
Cost1104
\[\begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -1 \cdot 10^{+76}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-14}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{-50}:\\ \;\;\;\;\frac{y}{\frac{a - z}{t - x}}\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{+62}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 14
Error7.8
Cost1097
\[\begin{array}{l} \mathbf{if}\;z \leq -2.7 \cdot 10^{+191} \lor \neg \left(z \leq 1.32 \cdot 10^{+158}\right):\\ \;\;\;\;t - \frac{x - t}{\frac{z}{a - y}}\\ \mathbf{else}:\\ \;\;\;\;x - \left(t - x\right) \cdot \frac{z - y}{a - z}\\ \end{array} \]
Alternative 15
Error30.1
Cost844
\[\begin{array}{l} \mathbf{if}\;z \leq -5.3 \cdot 10^{+104}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-168}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{+100}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
Alternative 16
Error29.1
Cost712
\[\begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{+103}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.18 \cdot 10^{+88}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
Alternative 17
Error35.4
Cost328
\[\begin{array}{l} \mathbf{if}\;z \leq -4.8 \cdot 10^{+101}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{+66}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
Alternative 18
Error45.7
Cost64
\[t \]

Error

Reproduce?

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

  :herbie-target
  (if (< z -1.2536131056095036e+188) (- t (* (/ y z) (- t x))) (if (< z 4.446702369113811e+64) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x)))))

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