Average Error: 23.2 → 9.4
Time: 51.2s
Precision: 64
\[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\]
\[\begin{array}{l} \mathbf{if}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \le -1.1392530337654849 \cdot 10^{-282}:\\ \;\;\;\;\sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}} \cdot \left(\left(\sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}} \cdot \sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}}\right) \cdot \frac{\frac{y - z}{\sqrt[3]{a - z}}}{\sqrt[3]{a - z}}\right) + x\\ \mathbf{elif}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \le 1.0047143960441098 \cdot 10^{-265}:\\ \;\;\;\;\left(t + \frac{x \cdot y}{z}\right) - \frac{y \cdot t}{z}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}} \cdot \left(\left(\sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}} \cdot \sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}}\right) \cdot \frac{\frac{y - z}{\sqrt[3]{a - z}}}{\sqrt[3]{a - z}}\right) + x\\ \end{array}\]
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\begin{array}{l}
\mathbf{if}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \le -1.1392530337654849 \cdot 10^{-282}:\\
\;\;\;\;\sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}} \cdot \left(\left(\sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}} \cdot \sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}}\right) \cdot \frac{\frac{y - z}{\sqrt[3]{a - z}}}{\sqrt[3]{a - z}}\right) + x\\

\mathbf{elif}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \le 1.0047143960441098 \cdot 10^{-265}:\\
\;\;\;\;\left(t + \frac{x \cdot y}{z}\right) - \frac{y \cdot t}{z}\\

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

\end{array}
double f(double x, double y, double z, double t, double a) {
        double r44147819 = x;
        double r44147820 = y;
        double r44147821 = z;
        double r44147822 = r44147820 - r44147821;
        double r44147823 = t;
        double r44147824 = r44147823 - r44147819;
        double r44147825 = r44147822 * r44147824;
        double r44147826 = a;
        double r44147827 = r44147826 - r44147821;
        double r44147828 = r44147825 / r44147827;
        double r44147829 = r44147819 + r44147828;
        return r44147829;
}

double f(double x, double y, double z, double t, double a) {
        double r44147830 = x;
        double r44147831 = y;
        double r44147832 = z;
        double r44147833 = r44147831 - r44147832;
        double r44147834 = t;
        double r44147835 = r44147834 - r44147830;
        double r44147836 = r44147833 * r44147835;
        double r44147837 = a;
        double r44147838 = r44147837 - r44147832;
        double r44147839 = r44147836 / r44147838;
        double r44147840 = r44147830 + r44147839;
        double r44147841 = -1.1392530337654849e-282;
        bool r44147842 = r44147840 <= r44147841;
        double r44147843 = cbrt(r44147838);
        double r44147844 = r44147835 / r44147843;
        double r44147845 = cbrt(r44147844);
        double r44147846 = r44147845 * r44147845;
        double r44147847 = r44147833 / r44147843;
        double r44147848 = r44147847 / r44147843;
        double r44147849 = r44147846 * r44147848;
        double r44147850 = r44147845 * r44147849;
        double r44147851 = r44147850 + r44147830;
        double r44147852 = 1.0047143960441098e-265;
        bool r44147853 = r44147840 <= r44147852;
        double r44147854 = r44147830 * r44147831;
        double r44147855 = r44147854 / r44147832;
        double r44147856 = r44147834 + r44147855;
        double r44147857 = r44147831 * r44147834;
        double r44147858 = r44147857 / r44147832;
        double r44147859 = r44147856 - r44147858;
        double r44147860 = r44147853 ? r44147859 : r44147851;
        double r44147861 = r44147842 ? r44147851 : r44147860;
        return r44147861;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original23.2
Target11.8
Herbie9.4
\[\begin{array}{l} \mathbf{if}\;z \lt -1.2536131056095036 \cdot 10^{+188}:\\ \;\;\;\;t - \frac{y}{z} \cdot \left(t - x\right)\\ \mathbf{elif}\;z \lt 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 2 regimes
  2. if (+ x (/ (* (- y z) (- t x)) (- a z))) < -1.1392530337654849e-282 or 1.0047143960441098e-265 < (+ x (/ (* (- y z) (- t x)) (- a z)))

    1. Initial program 19.8

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\]
    2. Using strategy rm
    3. Applied add-cube-cbrt20.3

      \[\leadsto x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{\color{blue}{\left(\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}\right) \cdot \sqrt[3]{a - z}}}\]
    4. Applied *-un-lft-identity20.3

      \[\leadsto x + \frac{\left(y - z\right) \cdot \color{blue}{\left(1 \cdot \left(t - x\right)\right)}}{\left(\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}\right) \cdot \sqrt[3]{a - z}}\]
    5. Applied associate-*r*20.3

      \[\leadsto x + \frac{\color{blue}{\left(\left(y - z\right) \cdot 1\right) \cdot \left(t - x\right)}}{\left(\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}\right) \cdot \sqrt[3]{a - z}}\]
    6. Applied times-frac8.0

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

      \[\leadsto x + \color{blue}{\frac{\frac{y - z}{\sqrt[3]{a - z}}}{\sqrt[3]{a - z}}} \cdot \frac{t - x}{\sqrt[3]{a - z}}\]
    8. Using strategy rm
    9. Applied add-cube-cbrt8.2

      \[\leadsto x + \frac{\frac{y - z}{\sqrt[3]{a - z}}}{\sqrt[3]{a - z}} \cdot \color{blue}{\left(\left(\sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}} \cdot \sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}}\right) \cdot \sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}}\right)}\]
    10. Applied associate-*r*8.2

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

    if -1.1392530337654849e-282 < (+ x (/ (* (- y z) (- t x)) (- a z))) < 1.0047143960441098e-265

    1. Initial program 55.3

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\]
    2. Using strategy rm
    3. Applied add-cube-cbrt55.3

      \[\leadsto x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{\color{blue}{\left(\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}\right) \cdot \sqrt[3]{a - z}}}\]
    4. Applied *-un-lft-identity55.3

      \[\leadsto x + \frac{\left(y - z\right) \cdot \color{blue}{\left(1 \cdot \left(t - x\right)\right)}}{\left(\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}\right) \cdot \sqrt[3]{a - z}}\]
    5. Applied associate-*r*55.3

      \[\leadsto x + \frac{\color{blue}{\left(\left(y - z\right) \cdot 1\right) \cdot \left(t - x\right)}}{\left(\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}\right) \cdot \sqrt[3]{a - z}}\]
    6. Applied times-frac55.6

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

      \[\leadsto x + \color{blue}{\frac{\frac{y - z}{\sqrt[3]{a - z}}}{\sqrt[3]{a - z}}} \cdot \frac{t - x}{\sqrt[3]{a - z}}\]
    8. Taylor expanded around inf 20.4

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \le -1.1392530337654849 \cdot 10^{-282}:\\ \;\;\;\;\sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}} \cdot \left(\left(\sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}} \cdot \sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}}\right) \cdot \frac{\frac{y - z}{\sqrt[3]{a - z}}}{\sqrt[3]{a - z}}\right) + x\\ \mathbf{elif}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \le 1.0047143960441098 \cdot 10^{-265}:\\ \;\;\;\;\left(t + \frac{x \cdot y}{z}\right) - \frac{y \cdot t}{z}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}} \cdot \left(\left(\sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}} \cdot \sqrt[3]{\frac{t - x}{\sqrt[3]{a - z}}}\right) \cdot \frac{\frac{y - z}{\sqrt[3]{a - z}}}{\sqrt[3]{a - z}}\right) + x\\ \end{array}\]

Reproduce

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

  :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))))