Average Error: 24.1 → 11.5
Time: 8.5s
Precision: 64
\[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\]
\[\begin{array}{l} \mathbf{if}\;a \le -7.4545129417356688 \cdot 10^{-281} \lor \neg \left(a \le 2.4684183222348114 \cdot 10^{-272}\right):\\ \;\;\;\;x + \frac{\sqrt[3]{y - z} \cdot \sqrt[3]{y - z}}{\sqrt[3]{a - z}} \cdot \left(\frac{\frac{\sqrt[3]{y - z}}{\sqrt[3]{a - z}}}{\sqrt[3]{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}} \cdot \frac{t - x}{\sqrt[3]{\sqrt[3]{a - z}}}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{x \cdot y}{z} + t\right) - \frac{t \cdot y}{z}\\ \end{array}\]
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\begin{array}{l}
\mathbf{if}\;a \le -7.4545129417356688 \cdot 10^{-281} \lor \neg \left(a \le 2.4684183222348114 \cdot 10^{-272}\right):\\
\;\;\;\;x + \frac{\sqrt[3]{y - z} \cdot \sqrt[3]{y - z}}{\sqrt[3]{a - z}} \cdot \left(\frac{\frac{\sqrt[3]{y - z}}{\sqrt[3]{a - z}}}{\sqrt[3]{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}} \cdot \frac{t - x}{\sqrt[3]{\sqrt[3]{a - z}}}\right)\\

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

\end{array}
double f(double x, double y, double z, double t, double a) {
        double r706145 = x;
        double r706146 = y;
        double r706147 = z;
        double r706148 = r706146 - r706147;
        double r706149 = t;
        double r706150 = r706149 - r706145;
        double r706151 = r706148 * r706150;
        double r706152 = a;
        double r706153 = r706152 - r706147;
        double r706154 = r706151 / r706153;
        double r706155 = r706145 + r706154;
        return r706155;
}

double f(double x, double y, double z, double t, double a) {
        double r706156 = a;
        double r706157 = -7.454512941735669e-281;
        bool r706158 = r706156 <= r706157;
        double r706159 = 2.4684183222348114e-272;
        bool r706160 = r706156 <= r706159;
        double r706161 = !r706160;
        bool r706162 = r706158 || r706161;
        double r706163 = x;
        double r706164 = y;
        double r706165 = z;
        double r706166 = r706164 - r706165;
        double r706167 = cbrt(r706166);
        double r706168 = r706167 * r706167;
        double r706169 = r706156 - r706165;
        double r706170 = cbrt(r706169);
        double r706171 = r706168 / r706170;
        double r706172 = r706167 / r706170;
        double r706173 = r706170 * r706170;
        double r706174 = cbrt(r706173);
        double r706175 = r706172 / r706174;
        double r706176 = t;
        double r706177 = r706176 - r706163;
        double r706178 = cbrt(r706170);
        double r706179 = r706177 / r706178;
        double r706180 = r706175 * r706179;
        double r706181 = r706171 * r706180;
        double r706182 = r706163 + r706181;
        double r706183 = r706163 * r706164;
        double r706184 = r706183 / r706165;
        double r706185 = r706184 + r706176;
        double r706186 = r706176 * r706164;
        double r706187 = r706186 / r706165;
        double r706188 = r706185 - r706187;
        double r706189 = r706162 ? r706182 : r706188;
        return r706189;
}

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

Original24.1
Target11.9
Herbie11.5
\[\begin{array}{l} \mathbf{if}\;z \lt -1.25361310560950359 \cdot 10^{188}:\\ \;\;\;\;t - \frac{y}{z} \cdot \left(t - x\right)\\ \mathbf{elif}\;z \lt 4.44670236911381103 \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 a < -7.454512941735669e-281 or 2.4684183222348114e-272 < a

    1. Initial program 23.9

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\]
    2. Using strategy rm
    3. Applied add-cube-cbrt24.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 times-frac12.2

      \[\leadsto x + \color{blue}{\frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{t - x}{\sqrt[3]{a - z}}}\]
    5. Using strategy rm
    6. Applied add-cube-cbrt12.1

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

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

      \[\leadsto x + \color{blue}{\frac{\sqrt[3]{y - z} \cdot \sqrt[3]{y - z}}{\sqrt[3]{a - z}} \cdot \left(\frac{\sqrt[3]{y - z}}{\sqrt[3]{a - z}} \cdot \frac{t - x}{\sqrt[3]{a - z}}\right)}\]
    9. Using strategy rm
    10. Applied add-cube-cbrt11.9

      \[\leadsto x + \frac{\sqrt[3]{y - z} \cdot \sqrt[3]{y - z}}{\sqrt[3]{a - z}} \cdot \left(\frac{\sqrt[3]{y - z}}{\sqrt[3]{a - z}} \cdot \frac{t - x}{\sqrt[3]{\color{blue}{\left(\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}\right) \cdot \sqrt[3]{a - z}}}}\right)\]
    11. Applied cbrt-prod12.0

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

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

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

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

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

    if -7.454512941735669e-281 < a < 2.4684183222348114e-272

    1. Initial program 29.2

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \le -7.4545129417356688 \cdot 10^{-281} \lor \neg \left(a \le 2.4684183222348114 \cdot 10^{-272}\right):\\ \;\;\;\;x + \frac{\sqrt[3]{y - z} \cdot \sqrt[3]{y - z}}{\sqrt[3]{a - z}} \cdot \left(\frac{\frac{\sqrt[3]{y - z}}{\sqrt[3]{a - z}}}{\sqrt[3]{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}} \cdot \frac{t - x}{\sqrt[3]{\sqrt[3]{a - z}}}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{x \cdot y}{z} + t\right) - \frac{t \cdot y}{z}\\ \end{array}\]

Reproduce

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