Rectangular parallelepiped of dimension a×b×c

Percentage Accurate: 100.0% → 100.0%
Time: 1.0s
Alternatives: 1
Speedup: 21.0×

Specification

?
\[\begin{array}{l} t_0 := \frac{1}{9}\\ 2 \cdot \left(\left(1 \cdot t_0 + t_0 \cdot t_0\right) + t_0 \cdot 1\right) \end{array} \]

Your Program's Arguments

    Results

    Enter valid numbers for all inputs

    Local Percentage Accuracy vs ?

    The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

    Accuracy vs Speed?

    Herbie found 1 alternatives:

    AlternativeAccuracySpeedup
    The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

    Alternative 1: 100.0% accurate, 21.0× speedup?

    \[0.4691358024691358 \]
    Derivation
    1. Initial program 100.0%

      \[2 \cdot \left(\left(1 \cdot \frac{1}{9} + \frac{1}{9} \cdot \frac{1}{9}\right) + \frac{1}{9} \cdot 1\right) \]
    2. Step-by-step derivation
      1. metadata-eval100.0%

        \[\leadsto 2 \cdot \left(\left(1 \cdot \color{blue}{0.1111111111111111} + \frac{1}{9} \cdot \frac{1}{9}\right) + \frac{1}{9} \cdot 1\right) \]
      2. metadata-eval100.0%

        \[\leadsto 2 \cdot \left(\left(\color{blue}{0.1111111111111111} + \frac{1}{9} \cdot \frac{1}{9}\right) + \frac{1}{9} \cdot 1\right) \]
      3. metadata-eval100.0%

        \[\leadsto 2 \cdot \left(\left(0.1111111111111111 + \color{blue}{0.1111111111111111} \cdot \frac{1}{9}\right) + \frac{1}{9} \cdot 1\right) \]
      4. metadata-eval100.0%

        \[\leadsto 2 \cdot \left(\left(0.1111111111111111 + 0.1111111111111111 \cdot \color{blue}{0.1111111111111111}\right) + \frac{1}{9} \cdot 1\right) \]
      5. metadata-eval100.0%

        \[\leadsto 2 \cdot \left(\left(0.1111111111111111 + \color{blue}{0.012345679012345678}\right) + \frac{1}{9} \cdot 1\right) \]
      6. metadata-eval100.0%

        \[\leadsto 2 \cdot \left(\color{blue}{0.12345679012345678} + \frac{1}{9} \cdot 1\right) \]
      7. metadata-eval100.0%

        \[\leadsto 2 \cdot \left(0.12345679012345678 + \color{blue}{0.1111111111111111} \cdot 1\right) \]
      8. metadata-eval100.0%

        \[\leadsto 2 \cdot \left(0.12345679012345678 + \color{blue}{0.1111111111111111}\right) \]
      9. metadata-eval100.0%

        \[\leadsto 2 \cdot \color{blue}{0.2345679012345679} \]
      10. metadata-eval100.0%

        \[\leadsto \color{blue}{0.4691358024691358} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{0.4691358024691358} \]
    4. Final simplification100.0%

      \[\leadsto 0.4691358024691358 \]

    Developer target: 100.0% accurate, 0.8× speedup?

    \[\left(\left(\frac{1}{9} \cdot 1\right) \cdot 2 + 2 \cdot \left(\frac{1}{9} \cdot \frac{1}{9}\right)\right) + 2 \cdot \left(1 \cdot \frac{1}{9}\right) \]

    Reproduce

    ?
    herbie shell --seed 2023167 
    (FPCore ()
      :name "Rectangular parallelepiped of dimension a×b×c"
      :precision binary64
    
      :herbie-target
      (+ (+ (* (* (/ 1.0 9.0) 1.0) 2.0) (* 2.0 (* (/ 1.0 9.0) (/ 1.0 9.0)))) (* 2.0 (* 1.0 (/ 1.0 9.0))))
    
      (* 2.0 (+ (+ (* 1.0 (/ 1.0 9.0)) (* (/ 1.0 9.0) (/ 1.0 9.0))) (* (/ 1.0 9.0) 1.0))))