Average Error: 14.3 → 1.6
Time: 18.3s
Precision: 64
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} = -\infty:\\ \;\;\;\;\frac{1}{z} \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} \le -2.643654455052194 \cdot 10^{-281}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{elif}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} \le 0.0:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} \le 5.955864120415916 \cdot 10^{+280}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \end{array}\]
x \cdot \frac{\frac{y}{z} \cdot t}{t}
\begin{array}{l}
\mathbf{if}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} = -\infty:\\
\;\;\;\;\frac{1}{z} \cdot \left(x \cdot y\right)\\

\mathbf{elif}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} \le -2.643654455052194 \cdot 10^{-281}:\\
\;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\

\mathbf{elif}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} \le 0.0:\\
\;\;\;\;\frac{x \cdot y}{z}\\

\mathbf{elif}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} \le 5.955864120415916 \cdot 10^{+280}:\\
\;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\

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

\end{array}
double f(double x, double y, double z, double t) {
        double r4511425 = x;
        double r4511426 = y;
        double r4511427 = z;
        double r4511428 = r4511426 / r4511427;
        double r4511429 = t;
        double r4511430 = r4511428 * r4511429;
        double r4511431 = r4511430 / r4511429;
        double r4511432 = r4511425 * r4511431;
        return r4511432;
}

double f(double x, double y, double z, double t) {
        double r4511433 = x;
        double r4511434 = y;
        double r4511435 = z;
        double r4511436 = r4511434 / r4511435;
        double r4511437 = t;
        double r4511438 = r4511436 * r4511437;
        double r4511439 = r4511438 / r4511437;
        double r4511440 = r4511433 * r4511439;
        double r4511441 = -inf.0;
        bool r4511442 = r4511440 <= r4511441;
        double r4511443 = 1.0;
        double r4511444 = r4511443 / r4511435;
        double r4511445 = r4511433 * r4511434;
        double r4511446 = r4511444 * r4511445;
        double r4511447 = -2.643654455052194e-281;
        bool r4511448 = r4511440 <= r4511447;
        double r4511449 = 0.0;
        bool r4511450 = r4511440 <= r4511449;
        double r4511451 = r4511445 / r4511435;
        double r4511452 = 5.955864120415916e+280;
        bool r4511453 = r4511440 <= r4511452;
        double r4511454 = r4511433 / r4511435;
        double r4511455 = r4511454 * r4511434;
        double r4511456 = r4511453 ? r4511440 : r4511455;
        double r4511457 = r4511450 ? r4511451 : r4511456;
        double r4511458 = r4511448 ? r4511440 : r4511457;
        double r4511459 = r4511442 ? r4511446 : r4511458;
        return r4511459;
}

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

Derivation

  1. Split input into 4 regimes
  2. if (* x (/ (* (/ y z) t) t)) < -inf.0

    1. Initial program 60.6

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
    2. Simplified3.5

      \[\leadsto \color{blue}{y \cdot \frac{x}{z}}\]
    3. Using strategy rm
    4. Applied *-un-lft-identity3.5

      \[\leadsto y \cdot \frac{x}{\color{blue}{1 \cdot z}}\]
    5. Applied add-cube-cbrt4.5

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

      \[\leadsto y \cdot \color{blue}{\left(\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{1} \cdot \frac{\sqrt[3]{x}}{z}\right)}\]
    7. Applied associate-*r*3.7

      \[\leadsto \color{blue}{\left(y \cdot \frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{1}\right) \cdot \frac{\sqrt[3]{x}}{z}}\]
    8. Simplified3.7

      \[\leadsto \color{blue}{\left(\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot y\right)} \cdot \frac{\sqrt[3]{x}}{z}\]
    9. Using strategy rm
    10. Applied div-inv3.7

      \[\leadsto \left(\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot y\right) \cdot \color{blue}{\left(\sqrt[3]{x} \cdot \frac{1}{z}\right)}\]
    11. Applied associate-*r*4.2

      \[\leadsto \color{blue}{\left(\left(\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot y\right) \cdot \sqrt[3]{x}\right) \cdot \frac{1}{z}}\]
    12. Simplified3.3

      \[\leadsto \color{blue}{\left(x \cdot y\right)} \cdot \frac{1}{z}\]

    if -inf.0 < (* x (/ (* (/ y z) t) t)) < -2.643654455052194e-281 or 0.0 < (* x (/ (* (/ y z) t) t)) < 5.955864120415916e+280

    1. Initial program 1.0

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

    if -2.643654455052194e-281 < (* x (/ (* (/ y z) t) t)) < 0.0

    1. Initial program 21.1

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
    2. Simplified1.7

      \[\leadsto \color{blue}{y \cdot \frac{x}{z}}\]
    3. Using strategy rm
    4. Applied *-un-lft-identity1.7

      \[\leadsto y \cdot \frac{x}{\color{blue}{1 \cdot z}}\]
    5. Applied add-cube-cbrt2.1

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

      \[\leadsto y \cdot \color{blue}{\left(\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{1} \cdot \frac{\sqrt[3]{x}}{z}\right)}\]
    7. Applied associate-*r*1.5

      \[\leadsto \color{blue}{\left(y \cdot \frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{1}\right) \cdot \frac{\sqrt[3]{x}}{z}}\]
    8. Simplified1.5

      \[\leadsto \color{blue}{\left(\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot y\right)} \cdot \frac{\sqrt[3]{x}}{z}\]
    9. Using strategy rm
    10. Applied associate-*l*5.2

      \[\leadsto \color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \left(y \cdot \frac{\sqrt[3]{x}}{z}\right)}\]
    11. Using strategy rm
    12. Applied *-un-lft-identity5.2

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

      \[\leadsto \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \left(y \cdot \frac{\sqrt[3]{\color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}}}{1 \cdot z}\right)\]
    14. Applied cbrt-prod5.3

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

      \[\leadsto \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \left(y \cdot \color{blue}{\left(\frac{\sqrt[3]{\sqrt[3]{x} \cdot \sqrt[3]{x}}}{1} \cdot \frac{\sqrt[3]{\sqrt[3]{x}}}{z}\right)}\right)\]
    16. Applied associate-*r*5.2

      \[\leadsto \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \color{blue}{\left(\left(y \cdot \frac{\sqrt[3]{\sqrt[3]{x} \cdot \sqrt[3]{x}}}{1}\right) \cdot \frac{\sqrt[3]{\sqrt[3]{x}}}{z}\right)}\]
    17. Simplified5.2

      \[\leadsto \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \left(\color{blue}{\left(y \cdot \sqrt[3]{\sqrt[3]{x} \cdot \sqrt[3]{x}}\right)} \cdot \frac{\sqrt[3]{\sqrt[3]{x}}}{z}\right)\]
    18. Taylor expanded around 0 1.6

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

    if 5.955864120415916e+280 < (* x (/ (* (/ y z) t) t))

    1. Initial program 53.9

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
    2. Simplified4.8

      \[\leadsto \color{blue}{y \cdot \frac{x}{z}}\]
  3. Recombined 4 regimes into one program.
  4. Final simplification1.6

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} = -\infty:\\ \;\;\;\;\frac{1}{z} \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} \le -2.643654455052194 \cdot 10^{-281}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{elif}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} \le 0.0:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} \le 5.955864120415916 \cdot 10^{+280}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \end{array}\]

Reproduce

herbie shell --seed 2019163 +o rules:numerics
(FPCore (x y z t)
  :name "Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1"
  (* x (/ (* (/ y z) t) t)))