Average Error: 32.4 → 0.8
Time: 23.8s
Precision: 64
Internal precision: 128
\[\frac{x \cdot x}{y \cdot y} + \frac{z \cdot z}{t \cdot t}\]
\[{\left(\sqrt[3]{{\left(\frac{x}{y}\right)}^2}\right)}^{3} + \frac{z}{t} \cdot \frac{z}{t}\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Target

Original32.4
Comparison0.4
Herbie0.8
\[ {\left(\frac{x}{y}\right)}^2 + {\left(\frac{z}{t}\right)}^2 \]

Derivation

  1. Initial program 32.4

    \[\frac{x \cdot x}{y \cdot y} + \frac{z \cdot z}{t \cdot t}\]
  2. Applied simplify 0.4

    \[\leadsto \color{blue}{{\left(\frac{x}{y}\right)}^2 + \frac{z}{t} \cdot \frac{z}{t}}\]
  3. Using strategy rm
  4. Applied add-cube-cbrt 0.8

    \[\leadsto \color{blue}{{\left(\sqrt[3]{{\left(\frac{x}{y}\right)}^2}\right)}^3} + \frac{z}{t} \cdot \frac{z}{t}\]
  5. Using strategy rm
  6. Applied pow3 0.8

    \[\leadsto \color{blue}{{\left(\sqrt[3]{{\left(\frac{x}{y}\right)}^2}\right)}^{3}} + \frac{z}{t} \cdot \frac{z}{t}\]
  7. Removed slow pow expressions

Runtime

Time bar (total: 23.8s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(2862419242 2803966657 3664517925 23941713 1761063414 249507843)'
(FPCore (x y z t)
  :name "Graphics.Rasterific.Svg.PathConverter:arcToSegments from rasterific-svg-0.2.3.1"

  :target
  (+ (sqr (/ x y)) (sqr (/ z t)))

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