Average Error: 14.2 → 1.5
Time: 6.4s
Precision: 64
Internal Precision: 128
\[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{x \cdot y}{z}\\ \mathbf{elif}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} \le -3.6560857792252 \cdot 10^{-322}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} \le 9.087822224232222 \cdot 10^{-284}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} \le 6.918989435598513 \cdot 10^{+278}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\frac{z}{x \cdot y}} \cdot \sqrt{\frac{z}{x \cdot y}}}\\ \end{array}\]

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 3 regimes
  2. if (* x (/ (* (/ y z) t) t)) < -inf.0 or -3.6560857792252e-322 < (* x (/ (* (/ y z) t) t)) < 9.087822224232222e-284

    1. Initial program 27.9

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
    2. Initial simplification2.1

      \[\leadsto y \cdot \frac{x}{z}\]
    3. Taylor expanded around 0 1.9

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}}\]
    4. Using strategy rm
    5. Applied clear-num2.5

      \[\leadsto \color{blue}{\frac{1}{\frac{z}{x \cdot y}}}\]
    6. Taylor expanded around inf 1.9

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

    if -inf.0 < (* x (/ (* (/ y z) t) t)) < -3.6560857792252e-322 or 9.087822224232222e-284 < (* x (/ (* (/ y z) t) t)) < 6.918989435598513e+278

    1. Initial program 0.8

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
    2. Initial simplification9.0

      \[\leadsto y \cdot \frac{x}{z}\]
    3. Taylor expanded around 0 9.5

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}}\]
    4. Using strategy rm
    5. Applied associate-/l*0.6

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

    if 6.918989435598513e+278 < (* x (/ (* (/ y z) t) t))

    1. Initial program 53.3

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
    2. Initial simplification3.9

      \[\leadsto y \cdot \frac{x}{z}\]
    3. Taylor expanded around 0 6.7

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}}\]
    4. Using strategy rm
    5. Applied clear-num6.8

      \[\leadsto \color{blue}{\frac{1}{\frac{z}{x \cdot y}}}\]
    6. Using strategy rm
    7. Applied add-sqr-sqrt7.0

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} = -\infty:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} \le -3.6560857792252 \cdot 10^{-322}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} \le 9.087822224232222 \cdot 10^{-284}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} \le 6.918989435598513 \cdot 10^{+278}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\frac{z}{x \cdot y}} \cdot \sqrt{\frac{z}{x \cdot y}}}\\ \end{array}\]

Runtime

Time bar (total: 6.4s)Debug logProfile

BaselineHerbieOracleSpan%
Regimes6.51.50.06.576.7%
herbie shell --seed 2018353 +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)))