
(FPCore (x y z)
:precision binary64
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
(+
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
0.083333333333333)
x)))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) + 0.083333333333333d0) / x)
end function
public static double code(double x, double y, double z) {
return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
def code(x, y, z): return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)) end
function tmp = code(x, y, z) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x); end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z)
:precision binary64
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
(+
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
0.083333333333333)
x)))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) + 0.083333333333333d0) / x)
end function
public static double code(double x, double y, double z) {
return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
def code(x, y, z): return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)) end
function tmp = code(x, y, z) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x); end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}
\end{array}
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (+ y 0.0007936500793651))))
(if (<= x 1e-82)
(+
(* x (+ (log x) -1.0))
(/ (+ 0.083333333333333 (+ (* z t_0) (* z -0.0027777777777778))) x))
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(+
(/ 0.083333333333333 x)
(+ (* t_0 (/ z x)) (* -0.0027777777777778 (/ z x))))))))
double code(double x, double y, double z) {
double t_0 = z * (y + 0.0007936500793651);
double tmp;
if (x <= 1e-82) {
tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 + ((z * t_0) + (z * -0.0027777777777778))) / x);
} else {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((0.083333333333333 / x) + ((t_0 * (z / x)) + (-0.0027777777777778 * (z / 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) :: t_0
real(8) :: tmp
t_0 = z * (y + 0.0007936500793651d0)
if (x <= 1d-82) then
tmp = (x * (log(x) + (-1.0d0))) + ((0.083333333333333d0 + ((z * t_0) + (z * (-0.0027777777777778d0)))) / x)
else
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((0.083333333333333d0 / x) + ((t_0 * (z / x)) + ((-0.0027777777777778d0) * (z / x))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * (y + 0.0007936500793651);
double tmp;
if (x <= 1e-82) {
tmp = (x * (Math.log(x) + -1.0)) + ((0.083333333333333 + ((z * t_0) + (z * -0.0027777777777778))) / x);
} else {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((0.083333333333333 / x) + ((t_0 * (z / x)) + (-0.0027777777777778 * (z / x))));
}
return tmp;
}
def code(x, y, z): t_0 = z * (y + 0.0007936500793651) tmp = 0 if x <= 1e-82: tmp = (x * (math.log(x) + -1.0)) + ((0.083333333333333 + ((z * t_0) + (z * -0.0027777777777778))) / x) else: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((0.083333333333333 / x) + ((t_0 * (z / x)) + (-0.0027777777777778 * (z / x)))) return tmp
function code(x, y, z) t_0 = Float64(z * Float64(y + 0.0007936500793651)) tmp = 0.0 if (x <= 1e-82) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(0.083333333333333 + Float64(Float64(z * t_0) + Float64(z * -0.0027777777777778))) / x)); else tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(0.083333333333333 / x) + Float64(Float64(t_0 * Float64(z / x)) + Float64(-0.0027777777777778 * Float64(z / x))))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (y + 0.0007936500793651); tmp = 0.0; if (x <= 1e-82) tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 + ((z * t_0) + (z * -0.0027777777777778))) / x); else tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((0.083333333333333 / x) + ((t_0 * (z / x)) + (-0.0027777777777778 * (z / x)))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 1e-82], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(N[(z * t$95$0), $MachinePrecision] + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(N[(t$95$0 * N[(z / x), $MachinePrecision]), $MachinePrecision] + N[(-0.0027777777777778 * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(y + 0.0007936500793651\right)\\
\mathbf{if}\;x \leq 10^{-82}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + \left(z \cdot t_0 + z \cdot -0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{0.083333333333333}{x} + \left(t_0 \cdot \frac{z}{x} + -0.0027777777777778 \cdot \frac{z}{x}\right)\right)\\
\end{array}
\end{array}
if x < 1e-82Initial program 99.8%
Taylor expanded in x around inf 99.8%
sub-neg99.8%
mul-1-neg99.8%
log-rec99.8%
remove-double-neg99.8%
metadata-eval99.8%
Simplified99.8%
*-commutative99.8%
fma-neg99.8%
metadata-eval99.8%
fma-udef99.8%
distribute-rgt-in99.8%
*-commutative99.8%
Applied egg-rr99.8%
if 1e-82 < x Initial program 87.2%
*-commutative87.2%
fma-udef87.2%
fma-neg87.2%
metadata-eval87.2%
div-inv87.2%
Applied egg-rr87.2%
*-commutative87.2%
fma-udef87.2%
distribute-lft-in87.2%
associate-/r/87.2%
clear-num87.2%
Applied egg-rr87.2%
metadata-eval87.2%
fma-neg87.2%
associate-*r*97.1%
sub-neg97.1%
metadata-eval97.1%
distribute-lft-in97.1%
associate-*l/97.1%
*-un-lft-identity97.1%
*-commutative97.1%
associate-*l/97.1%
*-un-lft-identity97.1%
Applied egg-rr97.1%
Final simplification98.1%
(FPCore (x y z) :precision binary64 (+ (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467) (+ (/ (fma z (+ y 0.0007936500793651) -0.0027777777777778) (/ x z)) (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((fma(z, (y + 0.0007936500793651), -0.0027777777777778) / (x / z)) + (0.083333333333333 / x));
}
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(fma(z, Float64(y + 0.0007936500793651), -0.0027777777777778) / Float64(x / z)) + Float64(0.083333333333333 / x))) end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision] + -0.0027777777777778), $MachinePrecision] / N[(x / z), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{\mathsf{fma}\left(z, y + 0.0007936500793651, -0.0027777777777778\right)}{\frac{x}{z}} + \frac{0.083333333333333}{x}\right)
\end{array}
Initial program 92.0%
*-commutative92.0%
fma-udef92.0%
fma-neg92.0%
metadata-eval92.0%
div-inv91.9%
Applied egg-rr91.9%
*-commutative91.9%
fma-udef91.9%
distribute-lft-in91.9%
associate-/r/91.9%
clear-num92.0%
Applied egg-rr92.0%
associate-*l/91.9%
metadata-eval91.9%
fma-neg91.9%
*-un-lft-identity91.9%
*-commutative91.9%
associate-/l*98.1%
*-commutative98.1%
fma-neg98.1%
metadata-eval98.1%
Applied egg-rr98.1%
Final simplification98.1%
(FPCore (x y z) :precision binary64 (+ (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467) (+ (/ 0.083333333333333 x) (/ z (/ x (fma z (+ y 0.0007936500793651) -0.0027777777777778))))))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((0.083333333333333 / x) + (z / (x / fma(z, (y + 0.0007936500793651), -0.0027777777777778))));
}
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(0.083333333333333 / x) + Float64(z / Float64(x / fma(z, Float64(y + 0.0007936500793651), -0.0027777777777778))))) end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(z / N[(x / N[(z * N[(y + 0.0007936500793651), $MachinePrecision] + -0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{0.083333333333333}{x} + \frac{z}{\frac{x}{\mathsf{fma}\left(z, y + 0.0007936500793651, -0.0027777777777778\right)}}\right)
\end{array}
Initial program 92.0%
*-commutative92.0%
fma-udef92.0%
fma-neg92.0%
metadata-eval92.0%
div-inv91.9%
Applied egg-rr91.9%
*-commutative91.9%
fma-udef91.9%
distribute-lft-in91.9%
associate-/r/91.9%
clear-num92.0%
Applied egg-rr92.0%
associate-*l/91.9%
metadata-eval91.9%
fma-neg91.9%
*-un-lft-identity91.9%
associate-/l*97.4%
*-commutative97.4%
fma-neg97.4%
metadata-eval97.4%
Applied egg-rr97.4%
Final simplification97.4%
(FPCore (x y z)
:precision binary64
(if (<= x 7.2e+207)
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x))
(* x (+ (log x) -1.0))))
double code(double x, double y, double z) {
double tmp;
if (x <= 7.2e+207) {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = x * (log(x) + -1.0);
}
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 <= 7.2d+207) then
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x)
else
tmp = x * (log(x) + (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 7.2e+207) {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = x * (Math.log(x) + -1.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 7.2e+207: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) else: tmp = x * (math.log(x) + -1.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 7.2e+207) tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x)); else tmp = Float64(x * Float64(log(x) + -1.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 7.2e+207) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x); else tmp = x * (log(x) + -1.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 7.2e+207], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 7.2 \cdot 10^{+207}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right)\\
\end{array}
\end{array}
if x < 7.20000000000000028e207Initial program 96.1%
if 7.20000000000000028e207 < x Initial program 76.2%
Taylor expanded in y around inf 73.9%
*-commutative73.9%
associate-*r/82.8%
Simplified82.8%
Taylor expanded in x around inf 82.8%
sub-neg76.2%
mul-1-neg76.2%
log-rec76.2%
remove-double-neg76.2%
metadata-eval76.2%
Simplified82.8%
Taylor expanded in z around 0 91.3%
Final simplification95.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (<= x 6.5e+207)
(+
t_0
(/
(+
0.083333333333333
(+ (* z (* z (+ y 0.0007936500793651))) (* z -0.0027777777777778)))
x))
t_0)))
double code(double x, double y, double z) {
double t_0 = x * (log(x) + -1.0);
double tmp;
if (x <= 6.5e+207) {
tmp = t_0 + ((0.083333333333333 + ((z * (z * (y + 0.0007936500793651))) + (z * -0.0027777777777778))) / x);
} else {
tmp = t_0;
}
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 * (log(x) + (-1.0d0))
if (x <= 6.5d+207) then
tmp = t_0 + ((0.083333333333333d0 + ((z * (z * (y + 0.0007936500793651d0))) + (z * (-0.0027777777777778d0)))) / x)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (Math.log(x) + -1.0);
double tmp;
if (x <= 6.5e+207) {
tmp = t_0 + ((0.083333333333333 + ((z * (z * (y + 0.0007936500793651))) + (z * -0.0027777777777778))) / x);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = x * (math.log(x) + -1.0) tmp = 0 if x <= 6.5e+207: tmp = t_0 + ((0.083333333333333 + ((z * (z * (y + 0.0007936500793651))) + (z * -0.0027777777777778))) / x) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(x * Float64(log(x) + -1.0)) tmp = 0.0 if (x <= 6.5e+207) tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(Float64(z * Float64(z * Float64(y + 0.0007936500793651))) + Float64(z * -0.0027777777777778))) / x)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (log(x) + -1.0); tmp = 0.0; if (x <= 6.5e+207) tmp = t_0 + ((0.083333333333333 + ((z * (z * (y + 0.0007936500793651))) + (z * -0.0027777777777778))) / x); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 6.5e+207], N[(t$95$0 + N[(N[(0.083333333333333 + N[(N[(z * N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], t$95$0]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;x \leq 6.5 \cdot 10^{+207}:\\
\;\;\;\;t_0 + \frac{0.083333333333333 + \left(z \cdot \left(z \cdot \left(y + 0.0007936500793651\right)\right) + z \cdot -0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x < 6.5000000000000001e207Initial program 96.1%
Taylor expanded in x around inf 94.8%
sub-neg94.8%
mul-1-neg94.8%
log-rec94.8%
remove-double-neg94.8%
metadata-eval94.8%
Simplified94.8%
*-commutative94.8%
fma-neg94.8%
metadata-eval94.8%
fma-udef94.8%
distribute-rgt-in94.8%
*-commutative94.8%
Applied egg-rr94.8%
if 6.5000000000000001e207 < x Initial program 76.2%
Taylor expanded in y around inf 73.9%
*-commutative73.9%
associate-*r/82.8%
Simplified82.8%
Taylor expanded in x around inf 82.8%
sub-neg76.2%
mul-1-neg76.2%
log-rec76.2%
remove-double-neg76.2%
metadata-eval76.2%
Simplified82.8%
Taylor expanded in z around 0 91.3%
Final simplification94.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (or (<= y -70000000.0) (not (<= y 5e-16)))
(+ t_0 (/ (+ 0.083333333333333 (* z (- (* z y) 0.0027777777777778))) x))
(+
t_0
(/
(+
0.083333333333333
(* z (- (* z 0.0007936500793651) 0.0027777777777778)))
x)))))
double code(double x, double y, double z) {
double t_0 = x * (log(x) + -1.0);
double tmp;
if ((y <= -70000000.0) || !(y <= 5e-16)) {
tmp = t_0 + ((0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x);
} else {
tmp = t_0 + ((0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / 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) :: t_0
real(8) :: tmp
t_0 = x * (log(x) + (-1.0d0))
if ((y <= (-70000000.0d0)) .or. (.not. (y <= 5d-16))) then
tmp = t_0 + ((0.083333333333333d0 + (z * ((z * y) - 0.0027777777777778d0))) / x)
else
tmp = t_0 + ((0.083333333333333d0 + (z * ((z * 0.0007936500793651d0) - 0.0027777777777778d0))) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (Math.log(x) + -1.0);
double tmp;
if ((y <= -70000000.0) || !(y <= 5e-16)) {
tmp = t_0 + ((0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x);
} else {
tmp = t_0 + ((0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x);
}
return tmp;
}
def code(x, y, z): t_0 = x * (math.log(x) + -1.0) tmp = 0 if (y <= -70000000.0) or not (y <= 5e-16): tmp = t_0 + ((0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x) else: tmp = t_0 + ((0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(log(x) + -1.0)) tmp = 0.0 if ((y <= -70000000.0) || !(y <= 5e-16)) tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * y) - 0.0027777777777778))) / x)); else tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * 0.0007936500793651) - 0.0027777777777778))) / x)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (log(x) + -1.0); tmp = 0.0; if ((y <= -70000000.0) || ~((y <= 5e-16))) tmp = t_0 + ((0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x); else tmp = t_0 + ((0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y, -70000000.0], N[Not[LessEqual[y, 5e-16]], $MachinePrecision]], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * N[(N[(z * y), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * N[(N[(z * 0.0007936500793651), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;y \leq -70000000 \lor \neg \left(y \leq 5 \cdot 10^{-16}\right):\\
\;\;\;\;t_0 + \frac{0.083333333333333 + z \cdot \left(z \cdot y - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{0.083333333333333 + z \cdot \left(z \cdot 0.0007936500793651 - 0.0027777777777778\right)}{x}\\
\end{array}
\end{array}
if y < -7e7 or 5.0000000000000004e-16 < y Initial program 91.6%
Taylor expanded in x around inf 91.3%
sub-neg91.3%
mul-1-neg91.3%
log-rec91.3%
remove-double-neg91.3%
metadata-eval91.3%
Simplified91.3%
Taylor expanded in y around inf 91.3%
*-commutative91.3%
Simplified91.3%
if -7e7 < y < 5.0000000000000004e-16Initial program 92.4%
Taylor expanded in x around inf 90.6%
sub-neg90.6%
mul-1-neg90.6%
log-rec90.6%
remove-double-neg90.6%
metadata-eval90.6%
Simplified90.6%
Taylor expanded in y around 0 90.6%
*-commutative90.6%
Simplified90.6%
Final simplification90.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (<= x 7.2e+207)
(+
t_0
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x))
t_0)))
double code(double x, double y, double z) {
double t_0 = x * (log(x) + -1.0);
double tmp;
if (x <= 7.2e+207) {
tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = t_0;
}
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 * (log(x) + (-1.0d0))
if (x <= 7.2d+207) then
tmp = t_0 + ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (Math.log(x) + -1.0);
double tmp;
if (x <= 7.2e+207) {
tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = x * (math.log(x) + -1.0) tmp = 0 if x <= 7.2e+207: tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(x * Float64(log(x) + -1.0)) tmp = 0.0 if (x <= 7.2e+207) tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (log(x) + -1.0); tmp = 0.0; if (x <= 7.2e+207) tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 7.2e+207], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], t$95$0]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;x \leq 7.2 \cdot 10^{+207}:\\
\;\;\;\;t_0 + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x < 7.20000000000000028e207Initial program 96.1%
Taylor expanded in x around inf 94.8%
sub-neg94.8%
mul-1-neg94.8%
log-rec94.8%
remove-double-neg94.8%
metadata-eval94.8%
Simplified94.8%
if 7.20000000000000028e207 < x Initial program 76.2%
Taylor expanded in y around inf 73.9%
*-commutative73.9%
associate-*r/82.8%
Simplified82.8%
Taylor expanded in x around inf 82.8%
sub-neg76.2%
mul-1-neg76.2%
log-rec76.2%
remove-double-neg76.2%
metadata-eval76.2%
Simplified82.8%
Taylor expanded in z around 0 91.3%
Final simplification94.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (<= y -70000000.0)
(+ t_0 (/ (+ 0.083333333333333 (* z -0.0027777777777778)) x))
(+
t_0
(/
(+
0.083333333333333
(* z (- (* z 0.0007936500793651) 0.0027777777777778)))
x)))))
double code(double x, double y, double z) {
double t_0 = x * (log(x) + -1.0);
double tmp;
if (y <= -70000000.0) {
tmp = t_0 + ((0.083333333333333 + (z * -0.0027777777777778)) / x);
} else {
tmp = t_0 + ((0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / 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) :: t_0
real(8) :: tmp
t_0 = x * (log(x) + (-1.0d0))
if (y <= (-70000000.0d0)) then
tmp = t_0 + ((0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x)
else
tmp = t_0 + ((0.083333333333333d0 + (z * ((z * 0.0007936500793651d0) - 0.0027777777777778d0))) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (Math.log(x) + -1.0);
double tmp;
if (y <= -70000000.0) {
tmp = t_0 + ((0.083333333333333 + (z * -0.0027777777777778)) / x);
} else {
tmp = t_0 + ((0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x);
}
return tmp;
}
def code(x, y, z): t_0 = x * (math.log(x) + -1.0) tmp = 0 if y <= -70000000.0: tmp = t_0 + ((0.083333333333333 + (z * -0.0027777777777778)) / x) else: tmp = t_0 + ((0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(log(x) + -1.0)) tmp = 0.0 if (y <= -70000000.0) tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x)); else tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * 0.0007936500793651) - 0.0027777777777778))) / x)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (log(x) + -1.0); tmp = 0.0; if (y <= -70000000.0) tmp = t_0 + ((0.083333333333333 + (z * -0.0027777777777778)) / x); else tmp = t_0 + ((0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -70000000.0], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * N[(N[(z * 0.0007936500793651), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;y \leq -70000000:\\
\;\;\;\;t_0 + \frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{0.083333333333333 + z \cdot \left(z \cdot 0.0007936500793651 - 0.0027777777777778\right)}{x}\\
\end{array}
\end{array}
if y < -7e7Initial program 87.6%
Taylor expanded in x around inf 87.7%
sub-neg87.7%
mul-1-neg87.7%
log-rec87.7%
remove-double-neg87.7%
metadata-eval87.7%
Simplified87.7%
Taylor expanded in z around 0 58.5%
*-commutative58.5%
Simplified58.5%
if -7e7 < y Initial program 93.5%
Taylor expanded in x around inf 92.1%
sub-neg92.1%
mul-1-neg92.1%
log-rec92.1%
remove-double-neg92.1%
metadata-eval92.1%
Simplified92.1%
Taylor expanded in y around 0 87.9%
*-commutative87.9%
Simplified87.9%
Final simplification80.3%
(FPCore (x y z) :precision binary64 (+ (* x (+ (log x) -1.0)) (/ (+ 0.083333333333333 (* z -0.0027777777777778)) x)))
double code(double x, double y, double z) {
return (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * -0.0027777777777778)) / x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x * (log(x) + (-1.0d0))) + ((0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x)
end function
public static double code(double x, double y, double z) {
return (x * (Math.log(x) + -1.0)) + ((0.083333333333333 + (z * -0.0027777777777778)) / x);
}
def code(x, y, z): return (x * (math.log(x) + -1.0)) + ((0.083333333333333 + (z * -0.0027777777777778)) / x)
function code(x, y, z) return Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x)) end
function tmp = code(x, y, z) tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * -0.0027777777777778)) / x); end
code[x_, y_, z_] := N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}
\end{array}
Initial program 92.0%
Taylor expanded in x around inf 90.9%
sub-neg90.9%
mul-1-neg90.9%
log-rec90.9%
remove-double-neg90.9%
metadata-eval90.9%
Simplified90.9%
Taylor expanded in z around 0 63.0%
*-commutative63.0%
Simplified63.0%
Final simplification63.0%
(FPCore (x y z) :precision binary64 (+ (* x (+ (log x) -1.0)) (/ 1.0 (* x 12.000000000000048))))
double code(double x, double y, double z) {
return (x * (log(x) + -1.0)) + (1.0 / (x * 12.000000000000048));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x * (log(x) + (-1.0d0))) + (1.0d0 / (x * 12.000000000000048d0))
end function
public static double code(double x, double y, double z) {
return (x * (Math.log(x) + -1.0)) + (1.0 / (x * 12.000000000000048));
}
def code(x, y, z): return (x * (math.log(x) + -1.0)) + (1.0 / (x * 12.000000000000048))
function code(x, y, z) return Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(1.0 / Float64(x * 12.000000000000048))) end
function tmp = code(x, y, z) tmp = (x * (log(x) + -1.0)) + (1.0 / (x * 12.000000000000048)); end
code[x_, y_, z_] := N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(x * 12.000000000000048), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\log x + -1\right) + \frac{1}{x \cdot 12.000000000000048}
\end{array}
Initial program 92.0%
Taylor expanded in z around 0 57.5%
Taylor expanded in x around inf 56.5%
sub-neg90.9%
mul-1-neg90.9%
log-rec90.9%
remove-double-neg90.9%
metadata-eval90.9%
Simplified56.5%
clear-num24.9%
inv-pow24.9%
div-inv24.9%
metadata-eval24.9%
Applied egg-rr56.5%
unpow-124.9%
Simplified56.5%
Final simplification56.5%
(FPCore (x y z) :precision binary64 (+ (/ 0.083333333333333 x) (* x (+ (log x) -1.0))))
double code(double x, double y, double z) {
return (0.083333333333333 / x) + (x * (log(x) + -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 = (0.083333333333333d0 / x) + (x * (log(x) + (-1.0d0)))
end function
public static double code(double x, double y, double z) {
return (0.083333333333333 / x) + (x * (Math.log(x) + -1.0));
}
def code(x, y, z): return (0.083333333333333 / x) + (x * (math.log(x) + -1.0))
function code(x, y, z) return Float64(Float64(0.083333333333333 / x) + Float64(x * Float64(log(x) + -1.0))) end
function tmp = code(x, y, z) tmp = (0.083333333333333 / x) + (x * (log(x) + -1.0)); end
code[x_, y_, z_] := N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.083333333333333}{x} + x \cdot \left(\log x + -1\right)
\end{array}
Initial program 92.0%
Taylor expanded in z around 0 57.5%
Taylor expanded in x around inf 56.5%
sub-neg90.9%
mul-1-neg90.9%
log-rec90.9%
remove-double-neg90.9%
metadata-eval90.9%
Simplified56.5%
Final simplification56.5%
(FPCore (x y z) :precision binary64 (if (<= x 2.8) (/ 1.0 (* x 12.000000000000048)) (* x (+ (log x) -1.0))))
double code(double x, double y, double z) {
double tmp;
if (x <= 2.8) {
tmp = 1.0 / (x * 12.000000000000048);
} else {
tmp = x * (log(x) + -1.0);
}
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 <= 2.8d0) then
tmp = 1.0d0 / (x * 12.000000000000048d0)
else
tmp = x * (log(x) + (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 2.8) {
tmp = 1.0 / (x * 12.000000000000048);
} else {
tmp = x * (Math.log(x) + -1.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 2.8: tmp = 1.0 / (x * 12.000000000000048) else: tmp = x * (math.log(x) + -1.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 2.8) tmp = Float64(1.0 / Float64(x * 12.000000000000048)); else tmp = Float64(x * Float64(log(x) + -1.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 2.8) tmp = 1.0 / (x * 12.000000000000048); else tmp = x * (log(x) + -1.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 2.8], N[(1.0 / N[(x * 12.000000000000048), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.8:\\
\;\;\;\;\frac{1}{x \cdot 12.000000000000048}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right)\\
\end{array}
\end{array}
if x < 2.7999999999999998Initial program 99.7%
Taylor expanded in z around 0 49.0%
Taylor expanded in x around inf 48.4%
sub-neg99.0%
mul-1-neg99.0%
log-rec99.0%
remove-double-neg99.0%
metadata-eval99.0%
Simplified48.4%
Taylor expanded in x around 0 48.4%
clear-num48.3%
inv-pow48.3%
div-inv48.4%
metadata-eval48.4%
Applied egg-rr48.4%
unpow-148.4%
Simplified48.4%
if 2.7999999999999998 < x Initial program 84.7%
Taylor expanded in y around inf 76.7%
*-commutative76.7%
associate-*r/81.7%
Simplified81.7%
Taylor expanded in x around inf 81.1%
sub-neg83.4%
mul-1-neg83.4%
log-rec83.4%
remove-double-neg83.4%
metadata-eval83.4%
Simplified81.1%
Taylor expanded in z around 0 64.2%
Final simplification56.5%
(FPCore (x y z) :precision binary64 (/ 1.0 (* x 12.000000000000048)))
double code(double x, double y, double z) {
return 1.0 / (x * 12.000000000000048);
}
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 * 12.000000000000048d0)
end function
public static double code(double x, double y, double z) {
return 1.0 / (x * 12.000000000000048);
}
def code(x, y, z): return 1.0 / (x * 12.000000000000048)
function code(x, y, z) return Float64(1.0 / Float64(x * 12.000000000000048)) end
function tmp = code(x, y, z) tmp = 1.0 / (x * 12.000000000000048); end
code[x_, y_, z_] := N[(1.0 / N[(x * 12.000000000000048), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{x \cdot 12.000000000000048}
\end{array}
Initial program 92.0%
Taylor expanded in z around 0 57.5%
Taylor expanded in x around inf 56.5%
sub-neg90.9%
mul-1-neg90.9%
log-rec90.9%
remove-double-neg90.9%
metadata-eval90.9%
Simplified56.5%
Taylor expanded in x around 0 24.9%
clear-num24.9%
inv-pow24.9%
div-inv24.9%
metadata-eval24.9%
Applied egg-rr24.9%
unpow-124.9%
Simplified24.9%
Final simplification24.9%
(FPCore (x y z) :precision binary64 (/ 0.083333333333333 x))
double code(double x, double y, double z) {
return 0.083333333333333 / x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 0.083333333333333d0 / x
end function
public static double code(double x, double y, double z) {
return 0.083333333333333 / x;
}
def code(x, y, z): return 0.083333333333333 / x
function code(x, y, z) return Float64(0.083333333333333 / x) end
function tmp = code(x, y, z) tmp = 0.083333333333333 / x; end
code[x_, y_, z_] := N[(0.083333333333333 / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.083333333333333}{x}
\end{array}
Initial program 92.0%
Taylor expanded in z around 0 57.5%
Taylor expanded in x around inf 56.5%
sub-neg90.9%
mul-1-neg90.9%
log-rec90.9%
remove-double-neg90.9%
metadata-eval90.9%
Simplified56.5%
Taylor expanded in x around 0 24.9%
Final simplification24.9%
(FPCore (x y z) :precision binary64 (+ (+ (+ (* (- x 0.5) (log x)) (- 0.91893853320467 x)) (/ 0.083333333333333 x)) (* (/ z x) (- (* z (+ y 0.0007936500793651)) 0.0027777777777778))))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((((x - 0.5d0) * log(x)) + (0.91893853320467d0 - x)) + (0.083333333333333d0 / x)) + ((z / x) * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))
end function
public static double code(double x, double y, double z) {
return ((((x - 0.5) * Math.log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778));
}
def code(x, y, z): return ((((x - 0.5) * math.log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) + Float64(0.91893853320467 - x)) + Float64(0.083333333333333 / x)) + Float64(Float64(z / x) * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) end
function tmp = code(x, y, z) tmp = ((((x - 0.5) * log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)); end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(z / x), $MachinePrecision] * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x - 0.5\right) \cdot \log x + \left(0.91893853320467 - x\right)\right) + \frac{0.083333333333333}{x}\right) + \frac{z}{x} \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)
\end{array}
herbie shell --seed 2023311
(FPCore (x y z)
:name "Numeric.SpecFunctions:$slogFactorial from math-functions-0.1.5.2, B"
:precision binary64
:herbie-target
(+ (+ (+ (* (- x 0.5) (log x)) (- 0.91893853320467 x)) (/ 0.083333333333333 x)) (* (/ z x) (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
(+ (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467) (/ (+ (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z) 0.083333333333333) x)))