Average Error: 1.9 → 1.9
Time: 4.4s
Precision: binary64
\[\frac{x - y}{z - y} \cdot t \]
\[\begin{array}{l} \mathbf{if}\;y \leq -1.3228102918677774 \cdot 10^{-107} \lor \neg \left(y \leq 5.712395648754913 \cdot 10^{-212}\right):\\ \;\;\;\;\frac{t}{\frac{z - y}{x - y}}\\ \mathbf{else}:\\ \;\;\;\;\begin{array}{l} t_1 := \sqrt[3]{x - y}\\ \left(t_1 \cdot t_1\right) \cdot \left(t \cdot \frac{t_1}{z - y}\right) \end{array}\\ \end{array} \]
\frac{x - y}{z - y} \cdot t
\begin{array}{l}
\mathbf{if}\;y \leq -1.3228102918677774 \cdot 10^{-107} \lor \neg \left(y \leq 5.712395648754913 \cdot 10^{-212}\right):\\
\;\;\;\;\frac{t}{\frac{z - y}{x - y}}\\

\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_1 := \sqrt[3]{x - y}\\
\left(t_1 \cdot t_1\right) \cdot \left(t \cdot \frac{t_1}{z - y}\right)
\end{array}\\


\end{array}
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
(FPCore (x y z t)
 :precision binary64
 (if (or (<= y -1.3228102918677774e-107) (not (<= y 5.712395648754913e-212)))
   (/ t (/ (- z y) (- x y)))
   (let* ((t_1 (cbrt (- x y)))) (* (* t_1 t_1) (* t (/ t_1 (- z y)))))))
double code(double x, double y, double z, double t) {
	return ((x - y) / (z - y)) * t;
}
double code(double x, double y, double z, double t) {
	double tmp;
	if ((y <= -1.3228102918677774e-107) || !(y <= 5.712395648754913e-212)) {
		tmp = t / ((z - y) / (x - y));
	} else {
		double t_1 = cbrt(x - y);
		tmp = (t_1 * t_1) * (t * (t_1 / (z - y)));
	}
	return tmp;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original1.9
Target1.9
Herbie1.9
\[\frac{t}{\frac{z - y}{x - y}} \]

Derivation

  1. Split input into 2 regimes
  2. if y < -1.3228102918677774e-107 or 5.71239564875491321e-212 < y

    1. Initial program 1.0

      \[\frac{x - y}{z - y} \cdot t \]
    2. Applied clear-num_binary641.1

      \[\leadsto \color{blue}{\frac{1}{\frac{z - y}{x - y}}} \cdot t \]
    3. Applied associate-*l/_binary641.0

      \[\leadsto \color{blue}{\frac{1 \cdot t}{\frac{z - y}{x - y}}} \]
    4. Simplified1.0

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

    if -1.3228102918677774e-107 < y < 5.71239564875491321e-212

    1. Initial program 5.3

      \[\frac{x - y}{z - y} \cdot t \]
    2. Applied *-un-lft-identity_binary645.3

      \[\leadsto \frac{x - y}{\color{blue}{1 \cdot \left(z - y\right)}} \cdot t \]
    3. Applied add-cube-cbrt_binary646.1

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.3228102918677774 \cdot 10^{-107} \lor \neg \left(y \leq 5.712395648754913 \cdot 10^{-212}\right):\\ \;\;\;\;\frac{t}{\frac{z - y}{x - y}}\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt[3]{x - y} \cdot \sqrt[3]{x - y}\right) \cdot \left(t \cdot \frac{\sqrt[3]{x - y}}{z - y}\right)\\ \end{array} \]

Reproduce

herbie shell --seed 2022081 
(FPCore (x y z t)
  :name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
  :precision binary64

  :herbie-target
  (/ t (/ (- z y) (- x y)))

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