Average Error: 35.6 → 28.7
Time: 38.6s
Precision: 64
Internal Precision: 2368
\[y \cdot \sin \left(\frac{\frac{\pi}{4} \cdot x}{y}\right)\]
\[\begin{array}{l} \mathbf{if}\;y \cdot \sin \left(\left(\sqrt[3]{\frac{\frac{\pi}{4} \cdot x}{y}} \cdot \sqrt[3]{\frac{\frac{\pi}{4} \cdot x}{y}}\right) \cdot \sqrt[3]{\frac{\frac{\pi}{4} \cdot x}{y}}\right) \le -8.61835313756233 \cdot 10^{-309}:\\ \;\;\;\;y \cdot \sin \left(\frac{\frac{\pi}{4}}{\frac{y}{x}}\right)\\ \mathbf{if}\;y \cdot \sin \left(\left(\sqrt[3]{\frac{\frac{\pi}{4} \cdot x}{y}} \cdot \sqrt[3]{\frac{\frac{\pi}{4} \cdot x}{y}}\right) \cdot \sqrt[3]{\frac{\frac{\pi}{4} \cdot x}{y}}\right) \le 3.7419603906382095 \cdot 10^{-293}:\\ \;\;\;\;x \cdot \left(\pi \cdot \frac{1}{4}\right)\\ \mathbf{if}\;y \cdot \sin \left(\left(\sqrt[3]{\frac{\frac{\pi}{4} \cdot x}{y}} \cdot \sqrt[3]{\frac{\frac{\pi}{4} \cdot x}{y}}\right) \cdot \sqrt[3]{\frac{\frac{\pi}{4} \cdot x}{y}}\right) \le 1.2902542149373409 \cdot 10^{+240}:\\ \;\;\;\;\left(\sqrt[3]{y \cdot \sin \left(\frac{\frac{\pi}{4} \cdot x}{y}\right)} \cdot \sqrt[3]{y \cdot \sin \left(\frac{\frac{\pi}{4} \cdot x}{y}\right)}\right) \cdot \sqrt[3]{y \cdot \sin \left(\frac{\frac{\pi}{4} \cdot x}{y}\right)}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array}\]

Error

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 4 regimes
  2. if (* y (sin (* (* (cbrt (/ (* (/ PI 4) x) y)) (cbrt (/ (* (/ PI 4) x) y))) (cbrt (/ (* (/ PI 4) x) y))))) < -8.61835313756233e-309

    1. Initial program 27.2

      \[y \cdot \sin \left(\frac{\frac{\pi}{4} \cdot x}{y}\right)\]
    2. Using strategy rm
    3. Applied associate-/l*28.0

      \[\leadsto y \cdot \sin \color{blue}{\left(\frac{\frac{\pi}{4}}{\frac{y}{x}}\right)}\]

    if -8.61835313756233e-309 < (* y (sin (* (* (cbrt (/ (* (/ PI 4) x) y)) (cbrt (/ (* (/ PI 4) x) y))) (cbrt (/ (* (/ PI 4) x) y))))) < 3.7419603906382095e-293

    1. Initial program 55.6

      \[y \cdot \sin \left(\frac{\frac{\pi}{4} \cdot x}{y}\right)\]
    2. Taylor expanded around inf 56.1

      \[\leadsto y \cdot \color{blue}{\left(\frac{1}{4} \cdot \frac{x \cdot \pi}{y}\right)}\]
    3. Applied simplify3.2

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

    if 3.7419603906382095e-293 < (* y (sin (* (* (cbrt (/ (* (/ PI 4) x) y)) (cbrt (/ (* (/ PI 4) x) y))) (cbrt (/ (* (/ PI 4) x) y))))) < 1.2902542149373409e+240

    1. Initial program 27.6

      \[y \cdot \sin \left(\frac{\frac{\pi}{4} \cdot x}{y}\right)\]
    2. Using strategy rm
    3. Applied add-cube-cbrt28.2

      \[\leadsto \color{blue}{\left(\sqrt[3]{y \cdot \sin \left(\frac{\frac{\pi}{4} \cdot x}{y}\right)} \cdot \sqrt[3]{y \cdot \sin \left(\frac{\frac{\pi}{4} \cdot x}{y}\right)}\right) \cdot \sqrt[3]{y \cdot \sin \left(\frac{\frac{\pi}{4} \cdot x}{y}\right)}}\]

    if 1.2902542149373409e+240 < (* y (sin (* (* (cbrt (/ (* (/ PI 4) x) y)) (cbrt (/ (* (/ PI 4) x) y))) (cbrt (/ (* (/ PI 4) x) y)))))

    1. Initial program 61.9

      \[y \cdot \sin \left(\frac{\frac{\pi}{4} \cdot x}{y}\right)\]
    2. Taylor expanded around 0 59.9

      \[\leadsto y \cdot \color{blue}{0}\]
    3. Applied simplify59.9

      \[\leadsto \color{blue}{0}\]
  3. Recombined 4 regimes into one program.

Runtime

Time bar (total: 38.6s)Debug log

herbie shell --seed '#(2775764126 3555076145 3898259844 1891440260 2599947619 1948460636)' 
(FPCore (y x)
  :name "y*sin(PI/4*x/y)"
  (* y (sin (/ (* (/ PI 4) x) y))))