Average Error: 0.5 → 0.5
Time: 16.5s
Precision: 64
Internal Precision: 128
\[\sqrt{x - 1} \cdot \sqrt{x}\]
\[\sqrt{x} \cdot \sqrt{x - 1}\]

Error

Bits error versus x

Derivation

  1. Initial program 0.5

    \[\sqrt{x - 1} \cdot \sqrt{x}\]
  2. Using strategy rm
  3. Applied *-commutative0.5

    \[\leadsto \color{blue}{\sqrt{x} \cdot \sqrt{x - 1}}\]
  4. Final simplification0.5

    \[\leadsto \sqrt{x} \cdot \sqrt{x - 1}\]

Reproduce

herbie shell --seed 2019091 
(FPCore (x)
  :name "sqrt times"
  (* (sqrt (- x 1)) (sqrt x)))