Average Error: 24.2 → 10.1
Time: 7.7s
Precision: binary64
\[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\]
\[\begin{array}{l} \mathbf{if}\;z \leq -4.412580790819901 \cdot 10^{+208} \lor \neg \left(z \leq 1.5608717846500168 \cdot 10^{+132}\right):\\ \;\;\;\;t + \left(\frac{x}{\frac{z}{y}} - \frac{t}{\frac{z}{y}}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{t - x}{\sqrt[3]{a - z}}\\ \end{array}\]
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\begin{array}{l}
\mathbf{if}\;z \leq -4.412580790819901 \cdot 10^{+208} \lor \neg \left(z \leq 1.5608717846500168 \cdot 10^{+132}\right):\\
\;\;\;\;t + \left(\frac{x}{\frac{z}{y}} - \frac{t}{\frac{z}{y}}\right)\\

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

\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 (or (<= z -4.412580790819901e+208) (not (<= z 1.5608717846500168e+132)))
   (+ t (- (/ x (/ z y)) (/ t (/ z y))))
   (+
    x
    (*
     (/ (- y z) (* (cbrt (- a z)) (cbrt (- a z))))
     (/ (- t x) (cbrt (- a z)))))))
double code(double x, double y, double z, double t, double a) {
	return ((double) (x + (((double) (((double) (y - z)) * ((double) (t - x)))) / ((double) (a - z)))));
}
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (((z <= -4.412580790819901e+208) || !(z <= 1.5608717846500168e+132))) {
		tmp = ((double) (t + ((double) ((x / (z / y)) - (t / (z / y))))));
	} else {
		tmp = ((double) (x + ((double) ((((double) (y - z)) / ((double) (((double) cbrt(((double) (a - z)))) * ((double) cbrt(((double) (a - z))))))) * (((double) (t - x)) / ((double) cbrt(((double) (a - z)))))))));
	}
	return tmp;
}

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.2
Target11.8
Herbie10.1
\[\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 2 regimes
  2. if z < -4.412580790819901e208 or 1.5608717846500168e132 < z

    1. Initial program Error: 47.5 bits

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\]
    2. SimplifiedError: 28.3 bits

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}}\]
    3. Using strategy rm
    4. Applied add-cube-cbrtError: 28.9 bits

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}} \cdot \frac{t - x}{\sqrt[3]{a - z}}\]
    9. Using strategy rm
    10. Applied add-cube-cbrtError: 24.2 bits

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

      \[\leadsto x + \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{\color{blue}{1 \cdot \left(t - x\right)}}{\left(\sqrt[3]{\sqrt[3]{a - z}} \cdot \sqrt[3]{\sqrt[3]{a - z}}\right) \cdot \sqrt[3]{\sqrt[3]{a - z}}}\]
    12. Applied times-fracError: 24.2 bits

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

      \[\leadsto x + \color{blue}{\left(\frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{1}{\sqrt[3]{\sqrt[3]{a - z}} \cdot \sqrt[3]{\sqrt[3]{a - z}}}\right) \cdot \frac{t - x}{\sqrt[3]{\sqrt[3]{a - z}}}}\]
    14. SimplifiedError: 23.7 bits

      \[\leadsto x + \color{blue}{\frac{y - z}{\left(\sqrt[3]{\sqrt[3]{a - z}} \cdot \sqrt[3]{\sqrt[3]{a - z}}\right) \cdot \left(\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}\right)}} \cdot \frac{t - x}{\sqrt[3]{\sqrt[3]{a - z}}}\]
    15. Taylor expanded around inf Error: 25.0 bits

      \[\leadsto \color{blue}{\left(\frac{x \cdot y}{z} + t\right) - \frac{t \cdot y}{z}}\]
    16. SimplifiedError: 14.6 bits

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

    if -4.412580790819901e208 < z < 1.5608717846500168e132

    1. Initial program Error: 16.2 bits

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\]
    2. SimplifiedError: 9.9 bits

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}}\]
    3. Using strategy rm
    4. Applied add-cube-cbrtError: 10.4 bits

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}} \cdot \frac{t - x}{\sqrt[3]{a - z}}\]
  3. Recombined 2 regimes into one program.
  4. Final simplificationError: 10.1 bits

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.412580790819901 \cdot 10^{+208} \lor \neg \left(z \leq 1.5608717846500168 \cdot 10^{+132}\right):\\ \;\;\;\;t + \left(\frac{x}{\frac{z}{y}} - \frac{t}{\frac{z}{y}}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{t - x}{\sqrt[3]{a - z}}\\ \end{array}\]

Reproduce

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