Graphics.Rendering.Plot.Render.Plot.Axis:tickPosition from plot-0.2.3.4

Percentage Accurate: 97.5% → 97.5%
Time: 5.1s
Alternatives: 5
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ x + \left(y - x\right) \cdot \frac{z}{t} \end{array} \]
(FPCore (x y z t) :precision binary64 (+ x (* (- y x) (/ z t))))
double code(double x, double y, double z, double t) {
	return x + ((y - x) * (z / t));
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = x + ((y - x) * (z / t))
end function
public static double code(double x, double y, double z, double t) {
	return x + ((y - x) * (z / t));
}
def code(x, y, z, t):
	return x + ((y - x) * (z / t))
function code(x, y, z, t)
	return Float64(x + Float64(Float64(y - x) * Float64(z / t)))
end
function tmp = code(x, y, z, t)
	tmp = x + ((y - x) * (z / t));
end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - x), $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \left(y - x\right) \cdot \frac{z}{t}
\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 5 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: 97.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \left(y - x\right) \cdot \frac{z}{t} \end{array} \]
(FPCore (x y z t) :precision binary64 (+ x (* (- y x) (/ z t))))
double code(double x, double y, double z, double t) {
	return x + ((y - x) * (z / t));
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = x + ((y - x) * (z / t))
end function
public static double code(double x, double y, double z, double t) {
	return x + ((y - x) * (z / t));
}
def code(x, y, z, t):
	return x + ((y - x) * (z / t))
function code(x, y, z, t)
	return Float64(x + Float64(Float64(y - x) * Float64(z / t)))
end
function tmp = code(x, y, z, t)
	tmp = x + ((y - x) * (z / t));
end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - x), $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 97.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \left(y - x\right) \cdot \frac{z}{t} \end{array} \]
(FPCore (x y z t) :precision binary64 (+ x (* (- y x) (/ z t))))
double code(double x, double y, double z, double t) {
	return x + ((y - x) * (z / t));
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = x + ((y - x) * (z / t))
end function
public static double code(double x, double y, double z, double t) {
	return x + ((y - x) * (z / t));
}
def code(x, y, z, t):
	return x + ((y - x) * (z / t))
function code(x, y, z, t)
	return Float64(x + Float64(Float64(y - x) * Float64(z / t)))
end
function tmp = code(x, y, z, t)
	tmp = x + ((y - x) * (z / t));
end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - x), $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

Alternative 2: 83.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -8.5 \cdot 10^{-56}:\\ \;\;\;\;x + \frac{z}{\frac{t}{y}}\\ \mathbf{elif}\;y \leq 3.8 \cdot 10^{-139}:\\ \;\;\;\;x - z \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y -8.5e-56)
   (+ x (/ z (/ t y)))
   (if (<= y 3.8e-139) (- x (* z (/ x t))) (+ x (* y (/ z t))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -8.5e-56) {
		tmp = x + (z / (t / y));
	} else if (y <= 3.8e-139) {
		tmp = x - (z * (x / t));
	} else {
		tmp = x + (y * (z / t));
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (y <= (-8.5d-56)) then
        tmp = x + (z / (t / y))
    else if (y <= 3.8d-139) then
        tmp = x - (z * (x / t))
    else
        tmp = x + (y * (z / t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -8.5e-56) {
		tmp = x + (z / (t / y));
	} else if (y <= 3.8e-139) {
		tmp = x - (z * (x / t));
	} else {
		tmp = x + (y * (z / t));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= -8.5e-56:
		tmp = x + (z / (t / y))
	elif y <= 3.8e-139:
		tmp = x - (z * (x / t))
	else:
		tmp = x + (y * (z / t))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -8.5e-56)
		tmp = Float64(x + Float64(z / Float64(t / y)));
	elseif (y <= 3.8e-139)
		tmp = Float64(x - Float64(z * Float64(x / t)));
	else
		tmp = Float64(x + Float64(y * Float64(z / t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -8.5e-56)
		tmp = x + (z / (t / y));
	elseif (y <= 3.8e-139)
		tmp = x - (z * (x / t));
	else
		tmp = x + (y * (z / t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[y, -8.5e-56], N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.8e-139], N[(x - N[(z * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{-56}:\\
\;\;\;\;x + \frac{z}{\frac{t}{y}}\\

\mathbf{elif}\;y \leq 3.8 \cdot 10^{-139}:\\
\;\;\;\;x - z \cdot \frac{x}{t}\\

\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.49999999999999932e-56

    1. Initial program 97.0%

      \[x + \left(y - x\right) \cdot \frac{z}{t} \]
    2. Step-by-step derivation
      1. clear-num97.0%

        \[\leadsto x + \left(y - x\right) \cdot \color{blue}{\frac{1}{\frac{t}{z}}} \]
      2. un-div-inv97.0%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
    3. Applied egg-rr97.0%

      \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
    4. Step-by-step derivation
      1. associate-/l*88.6%

        \[\leadsto x + \color{blue}{\frac{\left(y - x\right) \cdot z}{t}} \]
      2. div-inv88.6%

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

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

      \[\leadsto x + \color{blue}{\left(y \cdot z\right)} \cdot \frac{1}{t} \]
    7. Step-by-step derivation
      1. *-commutative80.7%

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

      \[\leadsto x + \color{blue}{\left(z \cdot y\right)} \cdot \frac{1}{t} \]
    9. Step-by-step derivation
      1. un-div-inv80.6%

        \[\leadsto x + \color{blue}{\frac{z \cdot y}{t}} \]
      2. associate-/l*86.2%

        \[\leadsto x + \color{blue}{\frac{z}{\frac{t}{y}}} \]
    10. Applied egg-rr86.2%

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

    if -8.49999999999999932e-56 < y < 3.80000000000000008e-139

    1. Initial program 95.8%

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

      \[\leadsto x + \color{blue}{-1 \cdot \frac{z \cdot x}{t}} \]
    3. Step-by-step derivation
      1. mul-1-neg85.2%

        \[\leadsto x + \color{blue}{\left(-\frac{z \cdot x}{t}\right)} \]
      2. associate-/l*87.3%

        \[\leadsto x + \left(-\color{blue}{\frac{z}{\frac{t}{x}}}\right) \]
    4. Simplified87.3%

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

      \[\leadsto \color{blue}{\left(1 - \frac{z}{t}\right) \cdot x} \]
    6. Step-by-step derivation
      1. sub-neg89.3%

        \[\leadsto \color{blue}{\left(1 + \left(-\frac{z}{t}\right)\right)} \cdot x \]
      2. mul-1-neg89.3%

        \[\leadsto \left(1 + \color{blue}{-1 \cdot \frac{z}{t}}\right) \cdot x \]
      3. +-commutative89.3%

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{z}{t} + 1\right)} \cdot x \]
      4. distribute-rgt1-in89.3%

        \[\leadsto \color{blue}{x + \left(-1 \cdot \frac{z}{t}\right) \cdot x} \]
      5. mul-1-neg89.3%

        \[\leadsto x + \color{blue}{\left(-\frac{z}{t}\right)} \cdot x \]
      6. cancel-sign-sub-inv89.3%

        \[\leadsto \color{blue}{x - \frac{z}{t} \cdot x} \]
      7. *-rgt-identity89.3%

        \[\leadsto x - \frac{\color{blue}{z \cdot 1}}{t} \cdot x \]
      8. associate-*r/89.3%

        \[\leadsto x - \color{blue}{\left(z \cdot \frac{1}{t}\right)} \cdot x \]
      9. associate-*r*87.0%

        \[\leadsto x - \color{blue}{z \cdot \left(\frac{1}{t} \cdot x\right)} \]
      10. associate-*l/87.0%

        \[\leadsto x - z \cdot \color{blue}{\frac{1 \cdot x}{t}} \]
      11. *-lft-identity87.0%

        \[\leadsto x - z \cdot \frac{\color{blue}{x}}{t} \]
    7. Simplified87.0%

      \[\leadsto \color{blue}{x - z \cdot \frac{x}{t}} \]

    if 3.80000000000000008e-139 < y

    1. Initial program 98.0%

      \[x + \left(y - x\right) \cdot \frac{z}{t} \]
    2. Taylor expanded in y around inf 81.0%

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{t}} \]
    3. Step-by-step derivation
      1. associate-*r/85.1%

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{t}} \]
    4. Simplified85.1%

      \[\leadsto x + \color{blue}{y \cdot \frac{z}{t}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification86.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.5 \cdot 10^{-56}:\\ \;\;\;\;x + \frac{z}{\frac{t}{y}}\\ \mathbf{elif}\;y \leq 3.8 \cdot 10^{-139}:\\ \;\;\;\;x - z \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \end{array} \]

Alternative 3: 84.7% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.75 \cdot 10^{+19}:\\ \;\;\;\;x + \frac{z}{\frac{t}{y}}\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-29}:\\ \;\;\;\;x - x \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y -1.75e+19)
   (+ x (/ z (/ t y)))
   (if (<= y 4.8e-29) (- x (* x (/ z t))) (+ x (* y (/ z t))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -1.75e+19) {
		tmp = x + (z / (t / y));
	} else if (y <= 4.8e-29) {
		tmp = x - (x * (z / t));
	} else {
		tmp = x + (y * (z / t));
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (y <= (-1.75d+19)) then
        tmp = x + (z / (t / y))
    else if (y <= 4.8d-29) then
        tmp = x - (x * (z / t))
    else
        tmp = x + (y * (z / t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -1.75e+19) {
		tmp = x + (z / (t / y));
	} else if (y <= 4.8e-29) {
		tmp = x - (x * (z / t));
	} else {
		tmp = x + (y * (z / t));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= -1.75e+19:
		tmp = x + (z / (t / y))
	elif y <= 4.8e-29:
		tmp = x - (x * (z / t))
	else:
		tmp = x + (y * (z / t))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -1.75e+19)
		tmp = Float64(x + Float64(z / Float64(t / y)));
	elseif (y <= 4.8e-29)
		tmp = Float64(x - Float64(x * Float64(z / t)));
	else
		tmp = Float64(x + Float64(y * Float64(z / t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -1.75e+19)
		tmp = x + (z / (t / y));
	elseif (y <= 4.8e-29)
		tmp = x - (x * (z / t));
	else
		tmp = x + (y * (z / t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.75e+19], N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e-29], N[(x - N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.75 \cdot 10^{+19}:\\
\;\;\;\;x + \frac{z}{\frac{t}{y}}\\

\mathbf{elif}\;y \leq 4.8 \cdot 10^{-29}:\\
\;\;\;\;x - x \cdot \frac{z}{t}\\

\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.75e19

    1. Initial program 95.8%

      \[x + \left(y - x\right) \cdot \frac{z}{t} \]
    2. Step-by-step derivation
      1. clear-num95.8%

        \[\leadsto x + \left(y - x\right) \cdot \color{blue}{\frac{1}{\frac{t}{z}}} \]
      2. un-div-inv95.7%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
    3. Applied egg-rr95.7%

      \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
    4. Step-by-step derivation
      1. associate-/l*87.9%

        \[\leadsto x + \color{blue}{\frac{\left(y - x\right) \cdot z}{t}} \]
      2. div-inv87.9%

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

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

      \[\leadsto x + \color{blue}{\left(y \cdot z\right)} \cdot \frac{1}{t} \]
    7. Step-by-step derivation
      1. *-commutative82.5%

        \[\leadsto x + \color{blue}{\left(z \cdot y\right)} \cdot \frac{1}{t} \]
    8. Simplified82.5%

      \[\leadsto x + \color{blue}{\left(z \cdot y\right)} \cdot \frac{1}{t} \]
    9. Step-by-step derivation
      1. un-div-inv82.5%

        \[\leadsto x + \color{blue}{\frac{z \cdot y}{t}} \]
      2. associate-/l*90.5%

        \[\leadsto x + \color{blue}{\frac{z}{\frac{t}{y}}} \]
    10. Applied egg-rr90.5%

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

    if -1.75e19 < y < 4.79999999999999984e-29

    1. Initial program 95.5%

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

      \[\leadsto x + \color{blue}{-1 \cdot \frac{z \cdot x}{t}} \]
    3. Step-by-step derivation
      1. mul-1-neg81.8%

        \[\leadsto x + \color{blue}{\left(-\frac{z \cdot x}{t}\right)} \]
      2. associate-/l*81.8%

        \[\leadsto x + \left(-\color{blue}{\frac{z}{\frac{t}{x}}}\right) \]
    4. Simplified81.8%

      \[\leadsto x + \color{blue}{\left(-\frac{z}{\frac{t}{x}}\right)} \]
    5. Step-by-step derivation
      1. unsub-neg81.8%

        \[\leadsto \color{blue}{x - \frac{z}{\frac{t}{x}}} \]
      2. associate-/r/85.6%

        \[\leadsto x - \color{blue}{\frac{z}{t} \cdot x} \]
    6. Applied egg-rr85.6%

      \[\leadsto \color{blue}{x - \frac{z}{t} \cdot x} \]

    if 4.79999999999999984e-29 < y

    1. Initial program 99.9%

      \[x + \left(y - x\right) \cdot \frac{z}{t} \]
    2. Taylor expanded in y around inf 84.4%

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{t}} \]
    3. Step-by-step derivation
      1. associate-*r/89.4%

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{t}} \]
    4. Simplified89.4%

      \[\leadsto x + \color{blue}{y \cdot \frac{z}{t}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification87.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.75 \cdot 10^{+19}:\\ \;\;\;\;x + \frac{z}{\frac{t}{y}}\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-29}:\\ \;\;\;\;x - x \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \end{array} \]

Alternative 4: 77.0% accurate, 1.3× speedup?

\[\begin{array}{l} \\ x + y \cdot \frac{z}{t} \end{array} \]
(FPCore (x y z t) :precision binary64 (+ x (* y (/ z t))))
double code(double x, double y, double z, double t) {
	return x + (y * (z / t));
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = x + (y * (z / t))
end function
public static double code(double x, double y, double z, double t) {
	return x + (y * (z / t));
}
def code(x, y, z, t):
	return x + (y * (z / t))
function code(x, y, z, t)
	return Float64(x + Float64(y * Float64(z / t)))
end
function tmp = code(x, y, z, t)
	tmp = x + (y * (z / t));
end
code[x_, y_, z_, t_] := N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + y \cdot \frac{z}{t}
\end{array}
Derivation
  1. Initial program 97.0%

    \[x + \left(y - x\right) \cdot \frac{z}{t} \]
  2. Taylor expanded in y around inf 71.5%

    \[\leadsto x + \color{blue}{\frac{y \cdot z}{t}} \]
  3. Step-by-step derivation
    1. associate-*r/74.1%

      \[\leadsto x + \color{blue}{y \cdot \frac{z}{t}} \]
  4. Simplified74.1%

    \[\leadsto x + \color{blue}{y \cdot \frac{z}{t}} \]
  5. Final simplification74.1%

    \[\leadsto x + y \cdot \frac{z}{t} \]

Alternative 5: 39.0% accurate, 9.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
	return x;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = x
end function
public static double code(double x, double y, double z, double t) {
	return x;
}
def code(x, y, z, t):
	return x
function code(x, y, z, t)
	return x
end
function tmp = code(x, y, z, t)
	tmp = x;
end
code[x_, y_, z_, t_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 97.0%

    \[x + \left(y - x\right) \cdot \frac{z}{t} \]
  2. Taylor expanded in y around inf 71.5%

    \[\leadsto x + \color{blue}{\frac{y \cdot z}{t}} \]
  3. Step-by-step derivation
    1. associate-*r/74.1%

      \[\leadsto x + \color{blue}{y \cdot \frac{z}{t}} \]
  4. Simplified74.1%

    \[\leadsto x + \color{blue}{y \cdot \frac{z}{t}} \]
  5. Taylor expanded in x around inf 37.8%

    \[\leadsto \color{blue}{x} \]
  6. Final simplification37.8%

    \[\leadsto x \]

Developer target: 97.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y - x\right) \cdot \frac{z}{t}\\ t_2 := x + \frac{y - x}{\frac{t}{z}}\\ \mathbf{if}\;t_1 < -1013646692435.8867:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 < 0:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot z}{t}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (- y x) (/ z t))) (t_2 (+ x (/ (- y x) (/ t z)))))
   (if (< t_1 -1013646692435.8867)
     t_2
     (if (< t_1 0.0) (+ x (/ (* (- y x) z) t)) t_2))))
double code(double x, double y, double z, double t) {
	double t_1 = (y - x) * (z / t);
	double t_2 = x + ((y - x) / (t / z));
	double tmp;
	if (t_1 < -1013646692435.8867) {
		tmp = t_2;
	} else if (t_1 < 0.0) {
		tmp = x + (((y - x) * z) / t);
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (y - x) * (z / t)
    t_2 = x + ((y - x) / (t / z))
    if (t_1 < (-1013646692435.8867d0)) then
        tmp = t_2
    else if (t_1 < 0.0d0) then
        tmp = x + (((y - x) * z) / t)
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (y - x) * (z / t);
	double t_2 = x + ((y - x) / (t / z));
	double tmp;
	if (t_1 < -1013646692435.8867) {
		tmp = t_2;
	} else if (t_1 < 0.0) {
		tmp = x + (((y - x) * z) / t);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (y - x) * (z / t)
	t_2 = x + ((y - x) / (t / z))
	tmp = 0
	if t_1 < -1013646692435.8867:
		tmp = t_2
	elif t_1 < 0.0:
		tmp = x + (((y - x) * z) / t)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(y - x) * Float64(z / t))
	t_2 = Float64(x + Float64(Float64(y - x) / Float64(t / z)))
	tmp = 0.0
	if (t_1 < -1013646692435.8867)
		tmp = t_2;
	elseif (t_1 < 0.0)
		tmp = Float64(x + Float64(Float64(Float64(y - x) * z) / t));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (y - x) * (z / t);
	t_2 = x + ((y - x) / (t / z));
	tmp = 0.0;
	if (t_1 < -1013646692435.8867)
		tmp = t_2;
	elseif (t_1 < 0.0)
		tmp = x + (((y - x) * z) / t);
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - x), $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - x), $MachinePrecision] / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$1, -1013646692435.8867], t$95$2, If[Less[t$95$1, 0.0], N[(x + N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(y - x\right) \cdot \frac{z}{t}\\
t_2 := x + \frac{y - x}{\frac{t}{z}}\\
\mathbf{if}\;t_1 < -1013646692435.8867:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_1 < 0:\\
\;\;\;\;x + \frac{\left(y - x\right) \cdot z}{t}\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023221 
(FPCore (x y z t)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:tickPosition from plot-0.2.3.4"
  :precision binary64

  :herbie-target
  (if (< (* (- y x) (/ z t)) -1013646692435.8867) (+ x (/ (- y x) (/ t z))) (if (< (* (- y x) (/ z t)) 0.0) (+ x (/ (* (- y x) z) t)) (+ x (/ (- y x) (/ t z)))))

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