| Alternative 1 | |
|---|---|
| Error | 0.0 |
| Cost | 6720 |
\[e^{\left(x \cdot y\right) \cdot y}
\]
(FPCore (x y) :precision binary64 (exp (* (* x y) y)))
(FPCore (x y) :precision binary64 (pow (exp -9.0) (* (* y (* x y)) -0.1111111111111111)))
double code(double x, double y) {
return exp(((x * y) * y));
}
double code(double x, double y) {
return pow(exp(-9.0), ((y * (x * y)) * -0.1111111111111111));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = exp(((x * y) * y))
end function
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = exp((-9.0d0)) ** ((y * (x * y)) * (-0.1111111111111111d0))
end function
public static double code(double x, double y) {
return Math.exp(((x * y) * y));
}
public static double code(double x, double y) {
return Math.pow(Math.exp(-9.0), ((y * (x * y)) * -0.1111111111111111));
}
def code(x, y): return math.exp(((x * y) * y))
def code(x, y): return math.pow(math.exp(-9.0), ((y * (x * y)) * -0.1111111111111111))
function code(x, y) return exp(Float64(Float64(x * y) * y)) end
function code(x, y) return exp(-9.0) ^ Float64(Float64(y * Float64(x * y)) * -0.1111111111111111) end
function tmp = code(x, y) tmp = exp(((x * y) * y)); end
function tmp = code(x, y) tmp = exp(-9.0) ^ ((y * (x * y)) * -0.1111111111111111); end
code[x_, y_] := N[Exp[N[(N[(x * y), $MachinePrecision] * y), $MachinePrecision]], $MachinePrecision]
code[x_, y_] := N[Power[N[Exp[-9.0], $MachinePrecision], N[(N[(y * N[(x * y), $MachinePrecision]), $MachinePrecision] * -0.1111111111111111), $MachinePrecision]], $MachinePrecision]
e^{\left(x \cdot y\right) \cdot y}
{\left(e^{-9}\right)}^{\left(\left(y \cdot \left(x \cdot y\right)\right) \cdot -0.1111111111111111\right)}
Results
Initial program 0.0
Applied egg-rr0.0
Applied egg-rr0.7
Applied egg-rr0.7
Applied egg-rr0.0
| Alternative 1 | |
|---|---|
| Error | 0.0 |
| Cost | 6720 |
| Alternative 2 | |
|---|---|
| Error | 21.1 |
| Cost | 64 |
herbie shell --seed 2023033
(FPCore (x y)
:name "Data.Random.Distribution.Normal:normalF from random-fu-0.2.6.2"
:precision binary64
(exp (* (* x y) y)))