
(FPCore (x) :precision binary64 (* x (/ 1.0 60.0)))
double code(double x) {
return x * (1.0 / 60.0);
}
real(8) function code(x)
real(8), intent (in) :: x
code = x * (1.0d0 / 60.0d0)
end function
public static double code(double x) {
return x * (1.0 / 60.0);
}
def code(x): return x * (1.0 / 60.0)
function code(x) return Float64(x * Float64(1.0 / 60.0)) end
function tmp = code(x) tmp = x * (1.0 / 60.0); end
code[x_] := N[(x * N[(1.0 / 60.0), $MachinePrecision]), $MachinePrecision]
x \cdot \frac{1}{60}
Herbie found 1 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x) :precision binary64 (* x (/ 1.0 60.0)))
double code(double x) {
return x * (1.0 / 60.0);
}
real(8) function code(x)
real(8), intent (in) :: x
code = x * (1.0d0 / 60.0d0)
end function
public static double code(double x) {
return x * (1.0 / 60.0);
}
def code(x): return x * (1.0 / 60.0)
function code(x) return Float64(x * Float64(1.0 / 60.0)) end
function tmp = code(x) tmp = x * (1.0 / 60.0); end
code[x_] := N[(x * N[(1.0 / 60.0), $MachinePrecision]), $MachinePrecision]
x \cdot \frac{1}{60}
(FPCore (x) :precision binary64 (* x 0.016666666666666666))
double code(double x) {
return x * 0.016666666666666666;
}
real(8) function code(x)
real(8), intent (in) :: x
code = x * 0.016666666666666666d0
end function
public static double code(double x) {
return x * 0.016666666666666666;
}
def code(x): return x * 0.016666666666666666
function code(x) return Float64(x * 0.016666666666666666) end
function tmp = code(x) tmp = x * 0.016666666666666666; end
code[x_] := N[(x * 0.016666666666666666), $MachinePrecision]
x \cdot 0.016666666666666666
Initial program 99.9%
lift-/.f64N/A
metadata-eval99.9%
Applied rewrites99.9%
herbie shell --seed 1
(FPCore (x)
:name "x * (1/60)"
:precision binary64
:pre (and (<= 0.0 x) (<= x 300000.0))
(* x (/ 1.0 60.0)))