
(FPCore (x y z) :precision binary64 (exp (- (+ x (* y (log y))) z)))
double code(double x, double y, double z) {
return exp(((x + (y * log(y))) - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = exp(((x + (y * log(y))) - z))
end function
public static double code(double x, double y, double z) {
return Math.exp(((x + (y * Math.log(y))) - z));
}
def code(x, y, z): return math.exp(((x + (y * math.log(y))) - z))
function code(x, y, z) return exp(Float64(Float64(x + Float64(y * log(y))) - z)) end
function tmp = code(x, y, z) tmp = exp(((x + (y * log(y))) - z)); end
code[x_, y_, z_] := N[Exp[N[(N[(x + N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
e^{\left(x + y \cdot \log y\right) - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (exp (- (+ x (* y (log y))) z)))
double code(double x, double y, double z) {
return exp(((x + (y * log(y))) - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = exp(((x + (y * log(y))) - z))
end function
public static double code(double x, double y, double z) {
return Math.exp(((x + (y * Math.log(y))) - z));
}
def code(x, y, z): return math.exp(((x + (y * math.log(y))) - z))
function code(x, y, z) return exp(Float64(Float64(x + Float64(y * log(y))) - z)) end
function tmp = code(x, y, z) tmp = exp(((x + (y * log(y))) - z)); end
code[x_, y_, z_] := N[Exp[N[(N[(x + N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
e^{\left(x + y \cdot \log y\right) - z}
\end{array}
(FPCore (x y z) :precision binary64 (exp (- (+ x (* y (log y))) z)))
double code(double x, double y, double z) {
return exp(((x + (y * log(y))) - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = exp(((x + (y * log(y))) - z))
end function
public static double code(double x, double y, double z) {
return Math.exp(((x + (y * Math.log(y))) - z));
}
def code(x, y, z): return math.exp(((x + (y * math.log(y))) - z))
function code(x, y, z) return exp(Float64(Float64(x + Float64(y * log(y))) - z)) end
function tmp = code(x, y, z) tmp = exp(((x + (y * log(y))) - z)); end
code[x_, y_, z_] := N[Exp[N[(N[(x + N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
e^{\left(x + y \cdot \log y\right) - z}
\end{array}
Initial program 100.0%
(FPCore (x y z) :precision binary64 (let* ((t_0 (+ x (* y (log y))))) (if (<= t_0 -2e+61) (exp x) (if (<= t_0 200.0) (exp (- z)) (pow y y)))))
double code(double x, double y, double z) {
double t_0 = x + (y * log(y));
double tmp;
if (t_0 <= -2e+61) {
tmp = exp(x);
} else if (t_0 <= 200.0) {
tmp = exp(-z);
} else {
tmp = pow(y, y);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = x + (y * log(y))
if (t_0 <= (-2d+61)) then
tmp = exp(x)
else if (t_0 <= 200.0d0) then
tmp = exp(-z)
else
tmp = y ** y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x + (y * Math.log(y));
double tmp;
if (t_0 <= -2e+61) {
tmp = Math.exp(x);
} else if (t_0 <= 200.0) {
tmp = Math.exp(-z);
} else {
tmp = Math.pow(y, y);
}
return tmp;
}
def code(x, y, z): t_0 = x + (y * math.log(y)) tmp = 0 if t_0 <= -2e+61: tmp = math.exp(x) elif t_0 <= 200.0: tmp = math.exp(-z) else: tmp = math.pow(y, y) return tmp
function code(x, y, z) t_0 = Float64(x + Float64(y * log(y))) tmp = 0.0 if (t_0 <= -2e+61) tmp = exp(x); elseif (t_0 <= 200.0) tmp = exp(Float64(-z)); else tmp = y ^ y; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x + (y * log(y)); tmp = 0.0; if (t_0 <= -2e+61) tmp = exp(x); elseif (t_0 <= 200.0) tmp = exp(-z); else tmp = y ^ y; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x + N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -2e+61], N[Exp[x], $MachinePrecision], If[LessEqual[t$95$0, 200.0], N[Exp[(-z)], $MachinePrecision], N[Power[y, y], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + y \cdot \log y\\
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{+61}:\\
\;\;\;\;e^{x}\\
\mathbf{elif}\;t\_0 \leq 200:\\
\;\;\;\;e^{-z}\\
\mathbf{else}:\\
\;\;\;\;{y}^{y}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 y (log.f64 y))) < -1.9999999999999999e61Initial program 100.0%
Taylor expanded in z around 0
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-exp.f6465.3
Applied rewrites65.3%
Taylor expanded in x around 0
Applied rewrites6.9%
Taylor expanded in y around 0
Applied rewrites93.6%
if -1.9999999999999999e61 < (+.f64 x (*.f64 y (log.f64 y))) < 200Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
lower-neg.f6495.8
Applied rewrites95.8%
if 200 < (+.f64 x (*.f64 y (log.f64 y))) Initial program 100.0%
Taylor expanded in z around 0
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-exp.f6479.9
Applied rewrites79.9%
Taylor expanded in x around 0
Applied rewrites76.2%
(FPCore (x y z) :precision binary64 (if (or (<= x -6.8e+78) (not (<= x 1.05e-11))) (exp (- x z)) (exp (- (* (log y) y) z))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -6.8e+78) || !(x <= 1.05e-11)) {
tmp = exp((x - z));
} else {
tmp = exp(((log(y) * y) - z));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-6.8d+78)) .or. (.not. (x <= 1.05d-11))) then
tmp = exp((x - z))
else
tmp = exp(((log(y) * y) - z))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -6.8e+78) || !(x <= 1.05e-11)) {
tmp = Math.exp((x - z));
} else {
tmp = Math.exp(((Math.log(y) * y) - z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -6.8e+78) or not (x <= 1.05e-11): tmp = math.exp((x - z)) else: tmp = math.exp(((math.log(y) * y) - z)) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -6.8e+78) || !(x <= 1.05e-11)) tmp = exp(Float64(x - z)); else tmp = exp(Float64(Float64(log(y) * y) - z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -6.8e+78) || ~((x <= 1.05e-11))) tmp = exp((x - z)); else tmp = exp(((log(y) * y) - z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -6.8e+78], N[Not[LessEqual[x, 1.05e-11]], $MachinePrecision]], N[Exp[N[(x - z), $MachinePrecision]], $MachinePrecision], N[Exp[N[(N[(N[Log[y], $MachinePrecision] * y), $MachinePrecision] - z), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.8 \cdot 10^{+78} \lor \neg \left(x \leq 1.05 \cdot 10^{-11}\right):\\
\;\;\;\;e^{x - z}\\
\mathbf{else}:\\
\;\;\;\;e^{\log y \cdot y - z}\\
\end{array}
\end{array}
if x < -6.80000000000000014e78 or 1.0499999999999999e-11 < x Initial program 100.0%
Taylor expanded in y around 0
lower--.f6495.5
Applied rewrites95.5%
if -6.80000000000000014e78 < x < 1.0499999999999999e-11Initial program 100.0%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lower-log.f6497.7
Applied rewrites97.7%
Final simplification96.7%
(FPCore (x y z) :precision binary64 (if (or (<= z -130.0) (not (<= z 6.2e+29))) (exp (- x z)) (* (pow y y) (exp x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -130.0) || !(z <= 6.2e+29)) {
tmp = exp((x - z));
} else {
tmp = pow(y, y) * exp(x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-130.0d0)) .or. (.not. (z <= 6.2d+29))) then
tmp = exp((x - z))
else
tmp = (y ** y) * exp(x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -130.0) || !(z <= 6.2e+29)) {
tmp = Math.exp((x - z));
} else {
tmp = Math.pow(y, y) * Math.exp(x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -130.0) or not (z <= 6.2e+29): tmp = math.exp((x - z)) else: tmp = math.pow(y, y) * math.exp(x) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -130.0) || !(z <= 6.2e+29)) tmp = exp(Float64(x - z)); else tmp = Float64((y ^ y) * exp(x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -130.0) || ~((z <= 6.2e+29))) tmp = exp((x - z)); else tmp = (y ^ y) * exp(x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -130.0], N[Not[LessEqual[z, 6.2e+29]], $MachinePrecision]], N[Exp[N[(x - z), $MachinePrecision]], $MachinePrecision], N[(N[Power[y, y], $MachinePrecision] * N[Exp[x], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -130 \lor \neg \left(z \leq 6.2 \cdot 10^{+29}\right):\\
\;\;\;\;e^{x - z}\\
\mathbf{else}:\\
\;\;\;\;{y}^{y} \cdot e^{x}\\
\end{array}
\end{array}
if z < -130 or 6.1999999999999998e29 < z Initial program 100.0%
Taylor expanded in y around 0
lower--.f6492.7
Applied rewrites92.7%
if -130 < z < 6.1999999999999998e29Initial program 100.0%
Taylor expanded in z around 0
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-exp.f6492.6
Applied rewrites92.6%
Final simplification92.7%
(FPCore (x y z) :precision binary64 (if (<= (- (+ x (* y (log y))) z) 5e+236) (exp x) (fma (fma 0.5 x 1.0) x 1.0)))
double code(double x, double y, double z) {
double tmp;
if (((x + (y * log(y))) - z) <= 5e+236) {
tmp = exp(x);
} else {
tmp = fma(fma(0.5, x, 1.0), x, 1.0);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (Float64(Float64(x + Float64(y * log(y))) - z) <= 5e+236) tmp = exp(x); else tmp = fma(fma(0.5, x, 1.0), x, 1.0); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[(N[(x + N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision], 5e+236], N[Exp[x], $MachinePrecision], N[(N[(0.5 * x + 1.0), $MachinePrecision] * x + 1.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(x + y \cdot \log y\right) - z \leq 5 \cdot 10^{+236}:\\
\;\;\;\;e^{x}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(0.5, x, 1\right), x, 1\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 x (*.f64 y (log.f64 y))) z) < 4.9999999999999997e236Initial program 100.0%
Taylor expanded in z around 0
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-exp.f6470.2
Applied rewrites70.2%
Taylor expanded in x around 0
Applied rewrites50.0%
Taylor expanded in y around 0
Applied rewrites54.3%
if 4.9999999999999997e236 < (-.f64 (+.f64 x (*.f64 y (log.f64 y))) z) Initial program 100.0%
Taylor expanded in z around 0
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-exp.f6467.0
Applied rewrites67.0%
Taylor expanded in x around 0
Applied rewrites83.9%
Taylor expanded in y around 0
Applied rewrites35.1%
Taylor expanded in x around 0
Applied rewrites47.8%
(FPCore (x y z) :precision binary64 (if (<= (* y (log y)) 200.0) (exp (- x z)) (pow y y)))
double code(double x, double y, double z) {
double tmp;
if ((y * log(y)) <= 200.0) {
tmp = exp((x - z));
} else {
tmp = pow(y, y);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y * log(y)) <= 200.0d0) then
tmp = exp((x - z))
else
tmp = y ** y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y * Math.log(y)) <= 200.0) {
tmp = Math.exp((x - z));
} else {
tmp = Math.pow(y, y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y * math.log(y)) <= 200.0: tmp = math.exp((x - z)) else: tmp = math.pow(y, y) return tmp
function code(x, y, z) tmp = 0.0 if (Float64(y * log(y)) <= 200.0) tmp = exp(Float64(x - z)); else tmp = y ^ y; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y * log(y)) <= 200.0) tmp = exp((x - z)); else tmp = y ^ y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision], 200.0], N[Exp[N[(x - z), $MachinePrecision]], $MachinePrecision], N[Power[y, y], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \cdot \log y \leq 200:\\
\;\;\;\;e^{x - z}\\
\mathbf{else}:\\
\;\;\;\;{y}^{y}\\
\end{array}
\end{array}
if (*.f64 y (log.f64 y)) < 200Initial program 100.0%
Taylor expanded in y around 0
lower--.f64100.0
Applied rewrites100.0%
if 200 < (*.f64 y (log.f64 y)) Initial program 100.0%
Taylor expanded in z around 0
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-exp.f6468.7
Applied rewrites68.7%
Taylor expanded in x around 0
Applied rewrites82.0%
(FPCore (x y z) :precision binary64 (if (<= (* y (log y)) -5e-302) (exp x) (pow y y)))
double code(double x, double y, double z) {
double tmp;
if ((y * log(y)) <= -5e-302) {
tmp = exp(x);
} else {
tmp = pow(y, y);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y * log(y)) <= (-5d-302)) then
tmp = exp(x)
else
tmp = y ** y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y * Math.log(y)) <= -5e-302) {
tmp = Math.exp(x);
} else {
tmp = Math.pow(y, y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y * math.log(y)) <= -5e-302: tmp = math.exp(x) else: tmp = math.pow(y, y) return tmp
function code(x, y, z) tmp = 0.0 if (Float64(y * log(y)) <= -5e-302) tmp = exp(x); else tmp = y ^ y; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y * log(y)) <= -5e-302) tmp = exp(x); else tmp = y ^ y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision], -5e-302], N[Exp[x], $MachinePrecision], N[Power[y, y], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \cdot \log y \leq -5 \cdot 10^{-302}:\\
\;\;\;\;e^{x}\\
\mathbf{else}:\\
\;\;\;\;{y}^{y}\\
\end{array}
\end{array}
if (*.f64 y (log.f64 y)) < -5.00000000000000033e-302Initial program 100.0%
Taylor expanded in z around 0
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-exp.f6471.2
Applied rewrites71.2%
Taylor expanded in x around 0
Applied rewrites27.0%
Taylor expanded in y around 0
Applied rewrites71.2%
if -5.00000000000000033e-302 < (*.f64 y (log.f64 y)) Initial program 100.0%
Taylor expanded in z around 0
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-exp.f6468.3
Applied rewrites68.3%
Taylor expanded in x around 0
Applied rewrites81.5%
(FPCore (x y z) :precision binary64 (if (<= x -0.00082) (fma (fma 0.5 x 1.0) x 1.0) (fma (fma (fma 0.16666666666666666 x 0.5) x 1.0) x 1.0)))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.00082) {
tmp = fma(fma(0.5, x, 1.0), x, 1.0);
} else {
tmp = fma(fma(fma(0.16666666666666666, x, 0.5), x, 1.0), x, 1.0);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= -0.00082) tmp = fma(fma(0.5, x, 1.0), x, 1.0); else tmp = fma(fma(fma(0.16666666666666666, x, 0.5), x, 1.0), x, 1.0); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, -0.00082], N[(N[(0.5 * x + 1.0), $MachinePrecision] * x + 1.0), $MachinePrecision], N[(N[(N[(0.16666666666666666 * x + 0.5), $MachinePrecision] * x + 1.0), $MachinePrecision] * x + 1.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.00082:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(0.5, x, 1\right), x, 1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.16666666666666666, x, 0.5\right), x, 1\right), x, 1\right)\\
\end{array}
\end{array}
if x < -8.1999999999999998e-4Initial program 100.0%
Taylor expanded in z around 0
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-exp.f6448.6
Applied rewrites48.6%
Taylor expanded in x around 0
Applied rewrites28.4%
Taylor expanded in y around 0
Applied rewrites71.1%
Taylor expanded in x around 0
Applied rewrites11.1%
if -8.1999999999999998e-4 < x Initial program 100.0%
Taylor expanded in z around 0
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-exp.f6477.2
Applied rewrites77.2%
Taylor expanded in x around 0
Applied rewrites66.5%
Taylor expanded in y around 0
Applied rewrites43.3%
Taylor expanded in x around 0
Applied rewrites37.8%
(FPCore (x y z) :precision binary64 (fma (fma 0.5 x 1.0) x 1.0))
double code(double x, double y, double z) {
return fma(fma(0.5, x, 1.0), x, 1.0);
}
function code(x, y, z) return fma(fma(0.5, x, 1.0), x, 1.0) end
code[x_, y_, z_] := N[(N[(0.5 * x + 1.0), $MachinePrecision] * x + 1.0), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\mathsf{fma}\left(0.5, x, 1\right), x, 1\right)
\end{array}
Initial program 100.0%
Taylor expanded in z around 0
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-exp.f6469.6
Applied rewrites69.6%
Taylor expanded in x around 0
Applied rewrites56.4%
Taylor expanded in y around 0
Applied rewrites50.7%
Taylor expanded in x around 0
Applied rewrites27.7%
(FPCore (x y z) :precision binary64 (+ 1.0 x))
double code(double x, double y, double z) {
return 1.0 + x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 1.0d0 + x
end function
public static double code(double x, double y, double z) {
return 1.0 + x;
}
def code(x, y, z): return 1.0 + x
function code(x, y, z) return Float64(1.0 + x) end
function tmp = code(x, y, z) tmp = 1.0 + x; end
code[x_, y_, z_] := N[(1.0 + x), $MachinePrecision]
\begin{array}{l}
\\
1 + x
\end{array}
Initial program 100.0%
Taylor expanded in z around 0
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-exp.f6469.6
Applied rewrites69.6%
Taylor expanded in x around 0
Applied rewrites56.4%
Taylor expanded in y around 0
Applied rewrites50.7%
Taylor expanded in x around 0
Applied rewrites14.4%
(FPCore (x y z) :precision binary64 1.0)
double code(double x, double y, double z) {
return 1.0;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 1.0d0
end function
public static double code(double x, double y, double z) {
return 1.0;
}
def code(x, y, z): return 1.0
function code(x, y, z) return 1.0 end
function tmp = code(x, y, z) tmp = 1.0; end
code[x_, y_, z_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 100.0%
Taylor expanded in z around 0
+-commutativeN/A
exp-sumN/A
lower-*.f64N/A
*-commutativeN/A
exp-to-powN/A
lower-pow.f64N/A
lower-exp.f6469.6
Applied rewrites69.6%
Taylor expanded in x around 0
Applied rewrites56.4%
Taylor expanded in y around 0
Applied rewrites14.1%
(FPCore (x y z) :precision binary64 (exp (+ (- x z) (* (log y) y))))
double code(double x, double y, double z) {
return exp(((x - z) + (log(y) * y)));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = exp(((x - z) + (log(y) * y)))
end function
public static double code(double x, double y, double z) {
return Math.exp(((x - z) + (Math.log(y) * y)));
}
def code(x, y, z): return math.exp(((x - z) + (math.log(y) * y)))
function code(x, y, z) return exp(Float64(Float64(x - z) + Float64(log(y) * y))) end
function tmp = code(x, y, z) tmp = exp(((x - z) + (log(y) * y))); end
code[x_, y_, z_] := N[Exp[N[(N[(x - z), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
e^{\left(x - z\right) + \log y \cdot y}
\end{array}
herbie shell --seed 2024326
(FPCore (x y z)
:name "Statistics.Distribution.Poisson.Internal:probability from math-functions-0.1.5.2"
:precision binary64
:alt
(! :herbie-platform default (exp (+ (- x z) (* (log y) y))))
(exp (- (+ x (* y (log y))) z)))