Average Error: 12.4 → 4.0
Time: 21.4s
Precision: 64
Internal Precision: 320
\[\cos^{-1} \left(\frac{z \cdot y}{\sqrt{x \cdot z} \cdot y}\right)\]
\[\begin{array}{l} \mathbf{if}\;x \le -2.9785525839490055 \cdot 10^{-210}:\\ \;\;\;\;\cos^{-1} \left(\frac{z}{\sqrt{z \cdot x}}\right)\\ \mathbf{else}:\\ \;\;\;\;\cos^{-1} \left(\frac{z}{\sqrt{z} \cdot \sqrt{x}}\right)\\ \end{array}\]

Error

Bits error versus z

Bits error versus y

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 2 regimes
  2. if x < -2.9785525839490055e-210

    1. Initial program 11.5

      \[\cos^{-1} \left(\frac{z \cdot y}{\sqrt{x \cdot z} \cdot y}\right)\]
    2. Initial simplification6.5

      \[\leadsto \cos^{-1} \left(\frac{z}{\sqrt{x \cdot z}}\right)\]

    if -2.9785525839490055e-210 < x

    1. Initial program 13.3

      \[\cos^{-1} \left(\frac{z \cdot y}{\sqrt{x \cdot z} \cdot y}\right)\]
    2. Initial simplification8.9

      \[\leadsto \cos^{-1} \left(\frac{z}{\sqrt{x \cdot z}}\right)\]
    3. Using strategy rm
    4. Applied sqrt-prod1.5

      \[\leadsto \cos^{-1} \left(\frac{z}{\color{blue}{\sqrt{x} \cdot \sqrt{z}}}\right)\]
  3. Recombined 2 regimes into one program.
  4. Final simplification4.0

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \le -2.9785525839490055 \cdot 10^{-210}:\\ \;\;\;\;\cos^{-1} \left(\frac{z}{\sqrt{z \cdot x}}\right)\\ \mathbf{else}:\\ \;\;\;\;\cos^{-1} \left(\frac{z}{\sqrt{z} \cdot \sqrt{x}}\right)\\ \end{array}\]

Runtime

Time bar (total: 21.4s)Debug log

herbie shell --seed '#(2775764126 3555076145 3898259844 1891440260 2599947619 1948460636)' 
(FPCore (z y x)
  :name "acos(z * y / (sqrt(x * z) * y))"
  (acos (/ (* z y) (* (sqrt (* x z)) y))))