Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3

Percentage Accurate: 67.6% → 71.1%
Time: 1.9s
Alternatives: 9
Speedup: 0.7×

Specification

?
\[\begin{array}{l} \\ x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
	return x + (((y - z) * (t - x)) / (a - z));
}
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
public static double code(double x, double y, double z, double t, double a) {
	return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a):
	return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a)
	return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z)))
end
function tmp = code(x, y, z, t, a)
	tmp = x + (((y - z) * (t - x)) / (a - z));
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]
\begin{array}{l}

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

Sampling outcomes in binary64 precision:

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.

Accuracy vs Speed?

Herbie found 9 alternatives:

AlternativeAccuracySpeedup
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.

Initial Program: 67.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
	return x + (((y - z) * (t - x)) / (a - z));
}
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
public static double code(double x, double y, double z, double t, double a) {
	return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a):
	return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a)
	return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z)))
end
function tmp = code(x, y, z, t, a)
	tmp = x + (((y - z) * (t - x)) / (a - z));
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]
\begin{array}{l}

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

Alternative 1: 71.1% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := x + \left(t - x\right)\\
\mathbf{if}\;z \leq -3 \cdot 10^{+190}:\\
\;\;\;\;t\_1\\

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

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.99999999999999982e190 or 3.80000000000000016e211 < z

    1. Initial program 19.8%

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

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

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

      \[\leadsto x + \left(y - z\right) \cdot t \]
    6. Applied rewrites4.3%

      \[\leadsto x + \left(y - z\right) \cdot \left(\left(y - z\right) \cdot \color{blue}{\left(t - x\right)}\right) \]
    7. Taylor expanded in x around -inf

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

      \[\leadsto x + \color{blue}{\left(t - x\right)} \]

    if -2.99999999999999982e190 < z < 3.80000000000000016e211

    1. Initial program 74.5%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 2: 33.1% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := x + \frac{y - z}{a - z}\\
\mathbf{if}\;a \leq -9.5 \cdot 10^{+72}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 5.2 \cdot 10^{-43}:\\
\;\;\;\;x + \left(t - x\right)\\

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

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.50000000000000054e72 or 5.0000000000000001e94 < a

    1. Initial program 68.3%

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

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

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

    if -9.50000000000000054e72 < a < 5.2e-43

    1. Initial program 62.1%

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

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

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

      \[\leadsto x + \left(y - z\right) \cdot t \]
    6. Applied rewrites13.7%

      \[\leadsto x + \left(y - z\right) \cdot \left(\left(y - z\right) \cdot \color{blue}{\left(t - x\right)}\right) \]
    7. Taylor expanded in x around -inf

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

      \[\leadsto x + \color{blue}{\left(t - x\right)} \]

    if 5.2e-43 < a < 5.0000000000000001e94

    1. Initial program 67.8%

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

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

      \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \left(t - x\right)} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 3: 28.1% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.8 \cdot 10^{+133}:\\
\;\;\;\;x + \left(y - z\right)\\

\mathbf{elif}\;a \leq 5.2 \cdot 10^{-43}:\\
\;\;\;\;x + \left(t - x\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.79999999999999989e133

    1. Initial program 75.1%

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

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

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

      \[\leadsto x + t \cdot \color{blue}{\left(y - z\right)} \]
    6. Applied rewrites48.4%

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

    if -1.79999999999999989e133 < a < 5.2e-43

    1. Initial program 61.2%

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

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

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

      \[\leadsto x + \left(y - z\right) \cdot t \]
    6. Applied rewrites14.6%

      \[\leadsto x + \left(y - z\right) \cdot \left(\left(y - z\right) \cdot \color{blue}{\left(t - x\right)}\right) \]
    7. Taylor expanded in x around -inf

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

      \[\leadsto x + \color{blue}{\left(t - x\right)} \]

    if 5.2e-43 < a < 2.70000000000000011e113

    1. Initial program 68.7%

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

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

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

    if 2.70000000000000011e113 < a

    1. Initial program 67.6%

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

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

      \[\leadsto x + \frac{\color{blue}{a - z}}{a - z} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 4: 50.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := x + \left(t - x\right)\\
\mathbf{if}\;z \leq -1.15 \cdot 10^{+184}:\\
\;\;\;\;t\_1\\

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

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.15e184 or 3.80000000000000016e211 < z

    1. Initial program 21.6%

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

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

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

      \[\leadsto x + \left(y - z\right) \cdot t \]
    6. Applied rewrites4.3%

      \[\leadsto x + \left(y - z\right) \cdot \left(\left(y - z\right) \cdot \color{blue}{\left(t - x\right)}\right) \]
    7. Taylor expanded in x around -inf

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

      \[\leadsto x + \color{blue}{\left(t - x\right)} \]

    if -1.15e184 < z < 3.80000000000000016e211

    1. Initial program 74.4%

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

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

      \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 5: 27.3% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := x + \left(y - z\right)\\
\mathbf{if}\;a \leq -1.8 \cdot 10^{+133}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 5.2 \cdot 10^{-43}:\\
\;\;\;\;x + \left(t - x\right)\\

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

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.79999999999999989e133 or 6.9999999999999994e94 < a

    1. Initial program 71.4%

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

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

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

      \[\leadsto x + t \cdot \color{blue}{\left(y - z\right)} \]
    6. Applied rewrites35.8%

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

    if -1.79999999999999989e133 < a < 5.2e-43

    1. Initial program 61.2%

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

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

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

      \[\leadsto x + \left(y - z\right) \cdot t \]
    6. Applied rewrites14.6%

      \[\leadsto x + \left(y - z\right) \cdot \left(\left(y - z\right) \cdot \color{blue}{\left(t - x\right)}\right) \]
    7. Taylor expanded in x around -inf

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

      \[\leadsto x + \color{blue}{\left(t - x\right)} \]

    if 5.2e-43 < a < 6.9999999999999994e94

    1. Initial program 67.8%

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

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

      \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \left(t - x\right)} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 6: 26.4% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
t_1 := x + \left(y - z\right)\\
\mathbf{if}\;a \leq -1.8 \cdot 10^{+133}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 9.5 \cdot 10^{-36}:\\
\;\;\;\;x + \left(t - x\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.79999999999999989e133 or 9.5000000000000003e-36 < a

    1. Initial program 70.3%

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

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

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

      \[\leadsto x + t \cdot \color{blue}{\left(y - z\right)} \]
    6. Applied rewrites29.4%

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

    if -1.79999999999999989e133 < a < 9.5000000000000003e-36

    1. Initial program 61.2%

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

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

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

      \[\leadsto x + \left(y - z\right) \cdot t \]
    6. Applied rewrites14.6%

      \[\leadsto x + \left(y - z\right) \cdot \left(\left(y - z\right) \cdot \color{blue}{\left(t - x\right)}\right) \]
    7. Taylor expanded in x around -inf

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

      \[\leadsto x + \color{blue}{\left(t - x\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 7: 17.4% accurate, 4.1× speedup?

\[\begin{array}{l} \\ x + \left(y - z\right) \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (- y z)))
double code(double x, double y, double z, double t, double a) {
	return x + (y - z);
}
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)
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + (y - z);
}
def code(x, y, z, t, a):
	return x + (y - z)
function code(x, y, z, t, a)
	return Float64(x + Float64(y - z))
end
function tmp = code(x, y, z, t, a)
	tmp = x + (y - z);
end
code[x_, y_, z_, t_, a_] := N[(x + N[(y - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \left(y - z\right)
\end{array}
Derivation
  1. Initial program 65.1%

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

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

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

    \[\leadsto x + t \cdot \color{blue}{\left(y - z\right)} \]
  6. Applied rewrites16.7%

    \[\leadsto x + \left(y - \color{blue}{z}\right) \]
  7. Add Preprocessing

Alternative 8: 9.7% accurate, 4.1× speedup?

\[\begin{array}{l} \\ x + \left(a - z\right) \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (- a z)))
double code(double x, double y, double z, double t, double a) {
	return x + (a - z);
}
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 + (a - z)
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + (a - z);
}
def code(x, y, z, t, a):
	return x + (a - z)
function code(x, y, z, t, a)
	return Float64(x + Float64(a - z))
end
function tmp = code(x, y, z, t, a)
	tmp = x + (a - z);
end
code[x_, y_, z_, t_, a_] := N[(x + N[(a - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \left(a - z\right)
\end{array}
Derivation
  1. Initial program 65.1%

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

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

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

    \[\leadsto x + \left(y - z\right) \cdot t \]
  6. Applied rewrites18.2%

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

    \[\leadsto x + \left(-1 \cdot \left(x \cdot \left(y - z\right)\right) + \color{blue}{t \cdot \left(y - z\right)}\right) \]
  8. Applied rewrites8.4%

    \[\leadsto x + \left(a - \color{blue}{z}\right) \]
  9. Add Preprocessing

Alternative 9: 3.0% accurate, 7.3× speedup?

\[\begin{array}{l} \\ a - z \end{array} \]
(FPCore (x y z t a) :precision binary64 (- a z))
double code(double x, double y, double z, double t, double a) {
	return a - z;
}
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 = a - z
end function
public static double code(double x, double y, double z, double t, double a) {
	return a - z;
}
def code(x, y, z, t, a):
	return a - z
function code(x, y, z, t, a)
	return Float64(a - z)
end
function tmp = code(x, y, z, t, a)
	tmp = a - z;
end
code[x_, y_, z_, t_, a_] := N[(a - z), $MachinePrecision]
\begin{array}{l}

\\
a - z
\end{array}
Derivation
  1. Initial program 65.1%

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

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

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

    \[\leadsto -1 \cdot \color{blue}{\frac{x \cdot \left(y - z\right)}{a - z}} \]
  6. Applied rewrites3.2%

    \[\leadsto a - \color{blue}{z} \]
  7. Add Preprocessing

Developer Target 1: 84.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}

Reproduce

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

  :alt
  (! :herbie-platform default (if (< z -125361310560950360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- t (* (/ y z) (- t x))) (if (< z 44467023691138110000000000000000000000000000000000000000000000000) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x))))))

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