Average Error: 14.2 → 2.1
Time: 6.0s
Precision: 64
Internal precision: 384
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
⬇
\[\begin{array}{l}
\mathbf{if}\;\frac{\frac{y}{z} \cdot t}{t} \le -9.410988200317622 \cdot 10^{-199}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{if}\;\frac{\frac{y}{z} \cdot t}{t} \le -0.0:\\
\;\;\;\;\frac{x}{z} \cdot y\\
\mathbf{if}\;\frac{\frac{y}{z} \cdot t}{t} \le 2.3184913045916877 \cdot 10^{+293}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot y\\
\end{array}\]
Derivation
- Split input into 4 regimes.
-
if (/ (* (/ y z) t) t) < -9.410988200317622e-199
Initial program 11.0
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
Applied simplify 4.4
\[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}}\]
if -9.410988200317622e-199 < (/ (* (/ y z) t) t) < -0.0
Initial program 23.7
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
Applied simplify 10.0
\[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}}\]
- Using strategy
rm
Applied associate-/r/ 1.1
\[\leadsto \color{blue}{\frac{x}{z} \cdot y}\]
if -0.0 < (/ (* (/ y z) t) t) < 2.3184913045916877e+293
Initial program 0.7
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
Applied simplify 0.5
\[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}}\]
- Using strategy
rm
Applied div-inv 0.6
\[\leadsto \color{blue}{x \cdot \frac{1}{\frac{z}{y}}}\]
Applied simplify 0.3
\[\leadsto x \cdot \color{blue}{\frac{y}{z}}\]
if 2.3184913045916877e+293 < (/ (* (/ y z) t) t)
Initial program 58.8
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
Applied simplify 21.6
\[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}}\]
- Using strategy
rm
Applied associate-/r/ 3.3
\[\leadsto \color{blue}{\frac{x}{z} \cdot y}\]
- Recombined 4 regimes into one program.
- Removed slow pow expressions
Runtime
Please include this information when filing a bug report:
herbie shell --seed '#(1064524629 4159152179 2999149171 575749698 4006532819 692958815)'
(FPCore (x y z t)
:name "Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1"
(* x (/ (* (/ y z) t) t)))