(FPCore (x) :precision binary64 (/ (* x 2.56) 1.32))
(FPCore (x) :precision binary64 (/ x 0.515625))
double code(double x) { return (x * 2.56) / 1.32; }
double code(double x) { return x / 0.515625; }
real(8) function code(x) real(8), intent (in) :: x code = (x * 2.56d0) / 1.32d0 end function
real(8) function code(x) real(8), intent (in) :: x code = x / 0.515625d0 end function
public static double code(double x) { return (x * 2.56) / 1.32; }
public static double code(double x) { return x / 0.515625; }
def code(x): return (x * 2.56) / 1.32
def code(x): return x / 0.515625
function code(x) return Float64(Float64(x * 2.56) / 1.32) end
function code(x) return Float64(x / 0.515625) end
function tmp = code(x) tmp = (x * 2.56) / 1.32; end
function tmp = code(x) tmp = x / 0.515625; end
code[x_] := N[(N[(x * 2.56), $MachinePrecision] / 1.32), $MachinePrecision]
code[x_] := N[(x / 0.515625), $MachinePrecision]
\frac{x \cdot 2.56}{1.32}
\frac{x}{0.515625}
Results
Initial program 0.3
Simplified0.2
[Start]0.3 | \[ \frac{x \cdot 2.56}{1.32}
\] |
---|---|
associate-/l* [=>]0.2 | \[ \color{blue}{\frac{x}{\frac{1.32}{2.56}}}
\] |
metadata-eval [=>]0.2 | \[ \frac{x}{\color{blue}{0.515625}}
\] |
Final simplification0.2
herbie shell --seed 1
(FPCore (x)
:name "x * 2.56 / 1.32"
:precision binary64
:pre (and (<= -1.79e+308 x) (<= x 1.79e+308))
(/ (* x 2.56) 1.32))