
(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 20 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
(if (<= x 6.6e+149)
(+
(- (fma (log x) (+ x -0.5) 0.91893853320467) x)
(/
(+
(* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))
0.083333333333333)
x))
(+ (+ 0.91893853320467 (- (* (log x) (- x 0.5)) x)) (* y (* z (/ z x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 6.6e+149) {
tmp = (fma(log(x), (x + -0.5), 0.91893853320467) - x) + (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x);
} else {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (y * (z * (z / x)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 6.6e+149) tmp = Float64(Float64(fma(log(x), Float64(x + -0.5), 0.91893853320467) - x) + Float64(Float64(Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x)); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(y * Float64(z * Float64(z / x)))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 6.6e+149], N[(N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision] + 0.91893853320467), $MachinePrecision] - x), $MachinePrecision] + N[(N[(N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 6.6 \cdot 10^{+149}:\\
\;\;\;\;\left(\mathsf{fma}\left(\log x, x + -0.5, 0.91893853320467\right) - x\right) + \frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + y \cdot \left(z \cdot \frac{z}{x}\right)\\
\end{array}
\end{array}
if x < 6.6e149Initial program 98.3%
Taylor expanded in x around 0 98.3%
sub-neg98.3%
metadata-eval98.3%
distribute-rgt-in98.3%
*-commutative98.3%
neg-mul-198.3%
associate-+l+98.3%
distribute-rgt-out98.3%
+-commutative98.3%
associate-+r+98.3%
sub-neg98.3%
+-commutative98.3%
fma-define98.3%
Simplified98.3%
if 6.6e149 < x Initial program 87.7%
Taylor expanded in y around inf 84.1%
associate-/l*87.0%
Simplified87.0%
unpow287.0%
associate-/l*96.2%
Applied egg-rr96.2%
Final simplification97.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))))
(if (or (<= t_0 -2e+40) (not (<= t_0 2e+118)))
(- (/ (* (+ y 0.0007936500793651) (pow z 2.0)) x) x)
(+
(+ 0.91893853320467 (- (* x (log x)) x))
(/ 1.0 (* x 12.000000000000048))))))
double code(double x, double y, double z) {
double t_0 = z * (((y + 0.0007936500793651) * z) - 0.0027777777777778);
double tmp;
if ((t_0 <= -2e+40) || !(t_0 <= 2e+118)) {
tmp = (((y + 0.0007936500793651) * pow(z, 2.0)) / x) - x;
} else {
tmp = (0.91893853320467 + ((x * log(x)) - x)) + (1.0 / (x * 12.000000000000048));
}
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) * z) - 0.0027777777777778d0)
if ((t_0 <= (-2d+40)) .or. (.not. (t_0 <= 2d+118))) then
tmp = (((y + 0.0007936500793651d0) * (z ** 2.0d0)) / x) - x
else
tmp = (0.91893853320467d0 + ((x * log(x)) - x)) + (1.0d0 / (x * 12.000000000000048d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * (((y + 0.0007936500793651) * z) - 0.0027777777777778);
double tmp;
if ((t_0 <= -2e+40) || !(t_0 <= 2e+118)) {
tmp = (((y + 0.0007936500793651) * Math.pow(z, 2.0)) / x) - x;
} else {
tmp = (0.91893853320467 + ((x * Math.log(x)) - x)) + (1.0 / (x * 12.000000000000048));
}
return tmp;
}
def code(x, y, z): t_0 = z * (((y + 0.0007936500793651) * z) - 0.0027777777777778) tmp = 0 if (t_0 <= -2e+40) or not (t_0 <= 2e+118): tmp = (((y + 0.0007936500793651) * math.pow(z, 2.0)) / x) - x else: tmp = (0.91893853320467 + ((x * math.log(x)) - x)) + (1.0 / (x * 12.000000000000048)) return tmp
function code(x, y, z) t_0 = Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) tmp = 0.0 if ((t_0 <= -2e+40) || !(t_0 <= 2e+118)) tmp = Float64(Float64(Float64(Float64(y + 0.0007936500793651) * (z ^ 2.0)) / x) - x); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(x * log(x)) - x)) + Float64(1.0 / Float64(x * 12.000000000000048))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (((y + 0.0007936500793651) * z) - 0.0027777777777778); tmp = 0.0; if ((t_0 <= -2e+40) || ~((t_0 <= 2e+118))) tmp = (((y + 0.0007936500793651) * (z ^ 2.0)) / x) - x; else tmp = (0.91893853320467 + ((x * log(x)) - x)) + (1.0 / (x * 12.000000000000048)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, -2e+40], N[Not[LessEqual[t$95$0, 2e+118]], $MachinePrecision]], N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(x * 12.000000000000048), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right)\\
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{+40} \lor \neg \left(t\_0 \leq 2 \cdot 10^{+118}\right):\\
\;\;\;\;\frac{\left(y + 0.0007936500793651\right) \cdot {z}^{2}}{x} - x\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(x \cdot \log x - x\right)\right) + \frac{1}{x \cdot 12.000000000000048}\\
\end{array}
\end{array}
if (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) < -2.00000000000000006e40 or 1.99999999999999993e118 < (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) Initial program 91.5%
add-cube-cbrt91.4%
pow391.4%
sub-neg91.4%
metadata-eval91.4%
*-commutative91.4%
Applied egg-rr91.4%
Taylor expanded in x around inf 81.3%
neg-mul-181.3%
Simplified81.3%
Taylor expanded in z around inf 81.3%
if -2.00000000000000006e40 < (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) < 1.99999999999999993e118Initial program 99.5%
Taylor expanded in z around 0 93.4%
clear-num93.4%
inv-pow93.4%
div-inv93.4%
metadata-eval93.4%
Applied egg-rr93.4%
unpow-193.4%
Simplified93.4%
Taylor expanded in x around inf 90.9%
mul-1-neg90.9%
distribute-rgt-neg-in90.9%
log-rec90.9%
remove-double-neg90.9%
Simplified90.9%
Final simplification86.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))))
(if (or (<= t_0 -2e+40) (not (<= t_0 2e+118)))
(- (/ (* (+ y 0.0007936500793651) (pow z 2.0)) x) x)
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(/ 0.083333333333333 x)))))
double code(double x, double y, double z) {
double t_0 = z * (((y + 0.0007936500793651) * z) - 0.0027777777777778);
double tmp;
if ((t_0 <= -2e+40) || !(t_0 <= 2e+118)) {
tmp = (((y + 0.0007936500793651) * pow(z, 2.0)) / x) - x;
} else {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (0.083333333333333 / 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) * z) - 0.0027777777777778d0)
if ((t_0 <= (-2d+40)) .or. (.not. (t_0 <= 2d+118))) then
tmp = (((y + 0.0007936500793651d0) * (z ** 2.0d0)) / x) - x
else
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * (((y + 0.0007936500793651) * z) - 0.0027777777777778);
double tmp;
if ((t_0 <= -2e+40) || !(t_0 <= 2e+118)) {
tmp = (((y + 0.0007936500793651) * Math.pow(z, 2.0)) / x) - x;
} else {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): t_0 = z * (((y + 0.0007936500793651) * z) - 0.0027777777777778) tmp = 0 if (t_0 <= -2e+40) or not (t_0 <= 2e+118): tmp = (((y + 0.0007936500793651) * math.pow(z, 2.0)) / x) - x else: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + (0.083333333333333 / x) return tmp
function code(x, y, z) t_0 = Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) tmp = 0.0 if ((t_0 <= -2e+40) || !(t_0 <= 2e+118)) tmp = Float64(Float64(Float64(Float64(y + 0.0007936500793651) * (z ^ 2.0)) / x) - x); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (((y + 0.0007936500793651) * z) - 0.0027777777777778); tmp = 0.0; if ((t_0 <= -2e+40) || ~((t_0 <= 2e+118))) tmp = (((y + 0.0007936500793651) * (z ^ 2.0)) / x) - x; else tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, -2e+40], N[Not[LessEqual[t$95$0, 2e+118]], $MachinePrecision]], N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right)\\
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{+40} \lor \neg \left(t\_0 \leq 2 \cdot 10^{+118}\right):\\
\;\;\;\;\frac{\left(y + 0.0007936500793651\right) \cdot {z}^{2}}{x} - x\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) < -2.00000000000000006e40 or 1.99999999999999993e118 < (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) Initial program 91.5%
add-cube-cbrt91.4%
pow391.4%
sub-neg91.4%
metadata-eval91.4%
*-commutative91.4%
Applied egg-rr91.4%
Taylor expanded in x around inf 81.3%
neg-mul-181.3%
Simplified81.3%
Taylor expanded in z around inf 81.3%
if -2.00000000000000006e40 < (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) < 1.99999999999999993e118Initial program 99.5%
Taylor expanded in z around 0 93.4%
Final simplification87.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))))
(if (or (<= t_0 -2e+40) (not (<= t_0 2e+118)))
(- (/ (* (+ y 0.0007936500793651) (pow z 2.0)) x) x)
(+ (* x (+ (log x) -1.0)) (/ 0.083333333333333 x)))))
double code(double x, double y, double z) {
double t_0 = z * (((y + 0.0007936500793651) * z) - 0.0027777777777778);
double tmp;
if ((t_0 <= -2e+40) || !(t_0 <= 2e+118)) {
tmp = (((y + 0.0007936500793651) * pow(z, 2.0)) / x) - x;
} else {
tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / 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) * z) - 0.0027777777777778d0)
if ((t_0 <= (-2d+40)) .or. (.not. (t_0 <= 2d+118))) then
tmp = (((y + 0.0007936500793651d0) * (z ** 2.0d0)) / x) - x
else
tmp = (x * (log(x) + (-1.0d0))) + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * (((y + 0.0007936500793651) * z) - 0.0027777777777778);
double tmp;
if ((t_0 <= -2e+40) || !(t_0 <= 2e+118)) {
tmp = (((y + 0.0007936500793651) * Math.pow(z, 2.0)) / x) - x;
} else {
tmp = (x * (Math.log(x) + -1.0)) + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): t_0 = z * (((y + 0.0007936500793651) * z) - 0.0027777777777778) tmp = 0 if (t_0 <= -2e+40) or not (t_0 <= 2e+118): tmp = (((y + 0.0007936500793651) * math.pow(z, 2.0)) / x) - x else: tmp = (x * (math.log(x) + -1.0)) + (0.083333333333333 / x) return tmp
function code(x, y, z) t_0 = Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) tmp = 0.0 if ((t_0 <= -2e+40) || !(t_0 <= 2e+118)) tmp = Float64(Float64(Float64(Float64(y + 0.0007936500793651) * (z ^ 2.0)) / x) - x); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (((y + 0.0007936500793651) * z) - 0.0027777777777778); tmp = 0.0; if ((t_0 <= -2e+40) || ~((t_0 <= 2e+118))) tmp = (((y + 0.0007936500793651) * (z ^ 2.0)) / x) - x; else tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, -2e+40], N[Not[LessEqual[t$95$0, 2e+118]], $MachinePrecision]], N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right)\\
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{+40} \lor \neg \left(t\_0 \leq 2 \cdot 10^{+118}\right):\\
\;\;\;\;\frac{\left(y + 0.0007936500793651\right) \cdot {z}^{2}}{x} - x\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) < -2.00000000000000006e40 or 1.99999999999999993e118 < (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) Initial program 91.5%
add-cube-cbrt91.4%
pow391.4%
sub-neg91.4%
metadata-eval91.4%
*-commutative91.4%
Applied egg-rr91.4%
Taylor expanded in x around inf 81.3%
neg-mul-181.3%
Simplified81.3%
Taylor expanded in z around inf 81.3%
if -2.00000000000000006e40 < (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) < 1.99999999999999993e118Initial program 99.5%
Taylor expanded in z around 0 93.4%
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%
Final simplification86.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))))
(if (<= t_0 -2e+40)
(- (/ (+ 0.083333333333333 (* z (- (* y z) 0.0027777777777778))) x) x)
(if (<= t_0 2e+118)
(+ (* x (+ (log x) -1.0)) (/ 0.083333333333333 x))
(- (/ (+ t_0 0.083333333333333) x) x)))))
double code(double x, double y, double z) {
double t_0 = z * (((y + 0.0007936500793651) * z) - 0.0027777777777778);
double tmp;
if (t_0 <= -2e+40) {
tmp = ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x) - x;
} else if (t_0 <= 2e+118) {
tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x);
} else {
tmp = ((t_0 + 0.083333333333333) / x) - 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) * z) - 0.0027777777777778d0)
if (t_0 <= (-2d+40)) then
tmp = ((0.083333333333333d0 + (z * ((y * z) - 0.0027777777777778d0))) / x) - x
else if (t_0 <= 2d+118) then
tmp = (x * (log(x) + (-1.0d0))) + (0.083333333333333d0 / x)
else
tmp = ((t_0 + 0.083333333333333d0) / x) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * (((y + 0.0007936500793651) * z) - 0.0027777777777778);
double tmp;
if (t_0 <= -2e+40) {
tmp = ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x) - x;
} else if (t_0 <= 2e+118) {
tmp = (x * (Math.log(x) + -1.0)) + (0.083333333333333 / x);
} else {
tmp = ((t_0 + 0.083333333333333) / x) - x;
}
return tmp;
}
def code(x, y, z): t_0 = z * (((y + 0.0007936500793651) * z) - 0.0027777777777778) tmp = 0 if t_0 <= -2e+40: tmp = ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x) - x elif t_0 <= 2e+118: tmp = (x * (math.log(x) + -1.0)) + (0.083333333333333 / x) else: tmp = ((t_0 + 0.083333333333333) / x) - x return tmp
function code(x, y, z) t_0 = Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) tmp = 0.0 if (t_0 <= -2e+40) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(y * z) - 0.0027777777777778))) / x) - x); elseif (t_0 <= 2e+118) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(0.083333333333333 / x)); else tmp = Float64(Float64(Float64(t_0 + 0.083333333333333) / x) - x); end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (((y + 0.0007936500793651) * z) - 0.0027777777777778); tmp = 0.0; if (t_0 <= -2e+40) tmp = ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x) - x; elseif (t_0 <= 2e+118) tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x); else tmp = ((t_0 + 0.083333333333333) / x) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -2e+40], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(y * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], If[LessEqual[t$95$0, 2e+118], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t$95$0 + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right)\\
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{+40}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(y \cdot z - 0.0027777777777778\right)}{x} - x\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+118}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_0 + 0.083333333333333}{x} - x\\
\end{array}
\end{array}
if (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) < -2.00000000000000006e40Initial program 96.6%
add-cube-cbrt96.3%
pow396.3%
sub-neg96.3%
metadata-eval96.3%
*-commutative96.3%
Applied egg-rr96.3%
Taylor expanded in x around inf 85.9%
neg-mul-185.9%
Simplified85.9%
Taylor expanded in y around inf 85.9%
*-commutative85.9%
Simplified85.9%
if -2.00000000000000006e40 < (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) < 1.99999999999999993e118Initial program 99.5%
Taylor expanded in z around 0 93.4%
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%
if 1.99999999999999993e118 < (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) Initial program 89.9%
add-cube-cbrt89.9%
pow389.9%
sub-neg89.9%
metadata-eval89.9%
*-commutative89.9%
Applied egg-rr89.9%
Taylor expanded in x around inf 79.9%
neg-mul-179.9%
Simplified79.9%
Final simplification86.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (or (<= (+ y 0.0007936500793651) -1000000000000.0)
(not (<= (+ y 0.0007936500793651) 0.00079366)))
(+ t_0 (/ (+ 0.083333333333333 (* z (- (* y z) 0.0027777777777778))) x))
(+
t_0
(/
(+
0.083333333333333
(* z (- (* 0.0007936500793651 z) 0.0027777777777778)))
x)))))
double code(double x, double y, double z) {
double t_0 = x * (log(x) + -1.0);
double tmp;
if (((y + 0.0007936500793651) <= -1000000000000.0) || !((y + 0.0007936500793651) <= 0.00079366)) {
tmp = t_0 + ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x);
} else {
tmp = t_0 + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 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 + 0.0007936500793651d0) <= (-1000000000000.0d0)) .or. (.not. ((y + 0.0007936500793651d0) <= 0.00079366d0))) then
tmp = t_0 + ((0.083333333333333d0 + (z * ((y * z) - 0.0027777777777778d0))) / x)
else
tmp = t_0 + ((0.083333333333333d0 + (z * ((0.0007936500793651d0 * z) - 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 + 0.0007936500793651) <= -1000000000000.0) || !((y + 0.0007936500793651) <= 0.00079366)) {
tmp = t_0 + ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x);
} else {
tmp = t_0 + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x);
}
return tmp;
}
def code(x, y, z): t_0 = x * (math.log(x) + -1.0) tmp = 0 if ((y + 0.0007936500793651) <= -1000000000000.0) or not ((y + 0.0007936500793651) <= 0.00079366): tmp = t_0 + ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x) else: tmp = t_0 + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(log(x) + -1.0)) tmp = 0.0 if ((Float64(y + 0.0007936500793651) <= -1000000000000.0) || !(Float64(y + 0.0007936500793651) <= 0.00079366)) tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(y * z) - 0.0027777777777778))) / x)); else tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(0.0007936500793651 * z) - 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 + 0.0007936500793651) <= -1000000000000.0) || ~(((y + 0.0007936500793651) <= 0.00079366))) tmp = t_0 + ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x); else tmp = t_0 + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 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[N[(y + 0.0007936500793651), $MachinePrecision], -1000000000000.0], N[Not[LessEqual[N[(y + 0.0007936500793651), $MachinePrecision], 0.00079366]], $MachinePrecision]], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * N[(N[(y * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * N[(N[(0.0007936500793651 * z), $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 + 0.0007936500793651 \leq -1000000000000 \lor \neg \left(y + 0.0007936500793651 \leq 0.00079366\right):\\
\;\;\;\;t\_0 + \frac{0.083333333333333 + z \cdot \left(y \cdot z - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;t\_0 + \frac{0.083333333333333 + z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x}\\
\end{array}
\end{array}
if (+.f64 y 7936500793651/10000000000000000) < -1e12 or 7.9365999999999996e-4 < (+.f64 y 7936500793651/10000000000000000) Initial program 95.9%
Taylor expanded in x around inf 94.7%
sub-neg49.0%
mul-1-neg49.0%
log-rec49.0%
remove-double-neg49.0%
metadata-eval49.0%
Simplified94.7%
Taylor expanded in y around inf 94.7%
*-commutative68.4%
Simplified94.7%
if -1e12 < (+.f64 y 7936500793651/10000000000000000) < 7.9365999999999996e-4Initial program 95.6%
Taylor expanded in x around inf 94.1%
sub-neg61.9%
mul-1-neg61.9%
log-rec61.9%
remove-double-neg61.9%
metadata-eval61.9%
Simplified94.1%
Taylor expanded in y around 0 94.1%
Final simplification94.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))))
(if (<= x 1e+150)
(+
(/
(+
(* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))
0.083333333333333)
x)
t_0)
(+ t_0 (* y (* z (/ z x)))))))
double code(double x, double y, double z) {
double t_0 = 0.91893853320467 + ((log(x) * (x - 0.5)) - x);
double tmp;
if (x <= 1e+150) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + t_0;
} else {
tmp = t_0 + (y * (z * (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 = 0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)
if (x <= 1d+150) then
tmp = (((z * (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) + t_0
else
tmp = t_0 + (y * (z * (z / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x);
double tmp;
if (x <= 1e+150) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + t_0;
} else {
tmp = t_0 + (y * (z * (z / x)));
}
return tmp;
}
def code(x, y, z): t_0 = 0.91893853320467 + ((math.log(x) * (x - 0.5)) - x) tmp = 0 if x <= 1e+150: tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + t_0 else: tmp = t_0 + (y * (z * (z / x))) return tmp
function code(x, y, z) t_0 = Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) tmp = 0.0 if (x <= 1e+150) tmp = Float64(Float64(Float64(Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + t_0); else tmp = Float64(t_0 + Float64(y * Float64(z * Float64(z / x)))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 0.91893853320467 + ((log(x) * (x - 0.5)) - x); tmp = 0.0; if (x <= 1e+150) tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + t_0; else tmp = t_0 + (y * (z * (z / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 1e+150], N[(N[(N[(N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + t$95$0), $MachinePrecision], N[(t$95$0 + N[(y * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\\
\mathbf{if}\;x \leq 10^{+150}:\\
\;\;\;\;\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x} + t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_0 + y \cdot \left(z \cdot \frac{z}{x}\right)\\
\end{array}
\end{array}
if x < 9.99999999999999981e149Initial program 98.3%
if 9.99999999999999981e149 < x Initial program 87.7%
Taylor expanded in y around inf 84.1%
associate-/l*87.0%
Simplified87.0%
unpow287.0%
associate-/l*96.2%
Applied egg-rr96.2%
Final simplification97.8%
(FPCore (x y z)
:precision binary64
(if (<= x 1.2e+150)
(+
(/
(+
(* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))
0.083333333333333)
x)
(* x (+ (log x) -1.0)))
(+ (+ 0.91893853320467 (- (* (log x) (- x 0.5)) x)) (* y (* z (/ z x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.2e+150) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + (x * (log(x) + -1.0));
} else {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (y * (z * (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) :: tmp
if (x <= 1.2d+150) then
tmp = (((z * (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) + (x * (log(x) + (-1.0d0)))
else
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + (y * (z * (z / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 1.2e+150) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + (x * (Math.log(x) + -1.0));
} else {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + (y * (z * (z / x)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1.2e+150: tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + (x * (math.log(x) + -1.0)) else: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + (y * (z * (z / x))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1.2e+150) tmp = Float64(Float64(Float64(Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + Float64(x * Float64(log(x) + -1.0))); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(y * Float64(z * Float64(z / x)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1.2e+150) tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + (x * (log(x) + -1.0)); else tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (y * (z * (z / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1.2e+150], N[(N[(N[(N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.2 \cdot 10^{+150}:\\
\;\;\;\;\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x} + x \cdot \left(\log x + -1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + y \cdot \left(z \cdot \frac{z}{x}\right)\\
\end{array}
\end{array}
if x < 1.20000000000000001e150Initial program 98.3%
Taylor expanded in x around inf 96.5%
sub-neg47.1%
mul-1-neg47.1%
log-rec47.1%
remove-double-neg47.1%
metadata-eval47.1%
Simplified96.5%
if 1.20000000000000001e150 < x Initial program 87.7%
Taylor expanded in y around inf 84.1%
associate-/l*87.0%
Simplified87.0%
unpow287.0%
associate-/l*96.2%
Applied egg-rr96.2%
Final simplification96.4%
(FPCore (x y z)
:precision binary64
(if (<= x 1e+150)
(+
(/
(+
(* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))
0.083333333333333)
x)
(- (* x (log x)) x))
(+ (+ 0.91893853320467 (- (* (log x) (- x 0.5)) x)) (* y (* z (/ z x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1e+150) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((x * log(x)) - x);
} else {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (y * (z * (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) :: tmp
if (x <= 1d+150) then
tmp = (((z * (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) + ((x * log(x)) - x)
else
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + (y * (z * (z / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 1e+150) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((x * Math.log(x)) - x);
} else {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + (y * (z * (z / x)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1e+150: tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((x * math.log(x)) - x) else: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + (y * (z * (z / x))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1e+150) tmp = Float64(Float64(Float64(Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + Float64(Float64(x * log(x)) - x)); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(y * Float64(z * Float64(z / x)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1e+150) tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((x * log(x)) - x); else tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (y * (z * (z / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1e+150], N[(N[(N[(N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 10^{+150}:\\
\;\;\;\;\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x} + \left(x \cdot \log x - x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + y \cdot \left(z \cdot \frac{z}{x}\right)\\
\end{array}
\end{array}
if x < 9.99999999999999981e149Initial program 98.3%
Taylor expanded in x around 0 98.3%
sub-neg98.3%
metadata-eval98.3%
distribute-rgt-in98.3%
*-commutative98.3%
neg-mul-198.3%
associate-+l+98.3%
distribute-rgt-out98.3%
+-commutative98.3%
associate-+r+98.3%
sub-neg98.3%
+-commutative98.3%
fma-define98.3%
Simplified98.3%
Taylor expanded in x around inf 96.5%
mul-1-neg96.5%
distribute-rgt-neg-in96.5%
log-rec96.5%
remove-double-neg96.5%
Simplified96.5%
if 9.99999999999999981e149 < x Initial program 87.7%
Taylor expanded in y around inf 84.1%
associate-/l*87.0%
Simplified87.0%
unpow287.0%
associate-/l*96.2%
Applied egg-rr96.2%
Final simplification96.5%
(FPCore (x y z)
:precision binary64
(if (<= x 106.0)
(+
(/
(+
(* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))
0.083333333333333)
x)
(- 0.91893853320467 x))
(+
(* x (+ (log x) -1.0))
(/
(+
0.083333333333333
(* z (- (* 0.0007936500793651 z) 0.0027777777777778)))
x))))
double code(double x, double y, double z) {
double tmp;
if (x <= 106.0) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 - x);
} else {
tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 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) :: tmp
if (x <= 106.0d0) then
tmp = (((z * (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) + (0.91893853320467d0 - x)
else
tmp = (x * (log(x) + (-1.0d0))) + ((0.083333333333333d0 + (z * ((0.0007936500793651d0 * z) - 0.0027777777777778d0))) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 106.0) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 - x);
} else {
tmp = (x * (Math.log(x) + -1.0)) + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 106.0: tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 - x) else: tmp = (x * (math.log(x) + -1.0)) + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 106.0) tmp = Float64(Float64(Float64(Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + Float64(0.91893853320467 - x)); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(0.0007936500793651 * z) - 0.0027777777777778))) / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 106.0) tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 - x); else tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 106.0], N[(N[(N[(N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(N[(0.0007936500793651 * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 106:\\
\;\;\;\;\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x} + \left(0.91893853320467 - x\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x}\\
\end{array}
\end{array}
if x < 106Initial program 99.7%
add-cube-cbrt99.7%
pow399.7%
sub-neg99.7%
metadata-eval99.7%
*-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 98.0%
neg-mul-198.0%
sub-neg98.0%
Simplified98.0%
if 106 < x Initial program 91.0%
Taylor expanded in x around inf 90.2%
sub-neg68.5%
mul-1-neg68.5%
log-rec68.5%
remove-double-neg68.5%
metadata-eval68.5%
Simplified90.2%
Taylor expanded in y around 0 79.7%
Final simplification89.6%
(FPCore (x y z)
:precision binary64
(if (<= x 0.016)
(+
(/
(+
(* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))
0.083333333333333)
x)
(- 0.91893853320467 x))
(+ (+ 0.91893853320467 (- (* (log x) (- x 0.5)) x)) (* y (* z (/ z x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 0.016) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 - x);
} else {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (y * (z * (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) :: tmp
if (x <= 0.016d0) then
tmp = (((z * (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) + (0.91893853320467d0 - x)
else
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + (y * (z * (z / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 0.016) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 - x);
} else {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + (y * (z * (z / x)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 0.016: tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 - x) else: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + (y * (z * (z / x))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 0.016) tmp = Float64(Float64(Float64(Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + Float64(0.91893853320467 - x)); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(y * Float64(z * Float64(z / x)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 0.016) tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 - x); else tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (y * (z * (z / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 0.016], N[(N[(N[(N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.016:\\
\;\;\;\;\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x} + \left(0.91893853320467 - x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + y \cdot \left(z \cdot \frac{z}{x}\right)\\
\end{array}
\end{array}
if x < 0.016Initial program 99.7%
add-cube-cbrt99.7%
pow399.7%
sub-neg99.7%
metadata-eval99.7%
*-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 98.6%
neg-mul-198.6%
sub-neg98.6%
Simplified98.6%
if 0.016 < x Initial program 91.2%
Taylor expanded in y around inf 80.6%
associate-/l*82.8%
Simplified82.8%
unpow282.8%
associate-/l*87.7%
Applied egg-rr87.7%
Final simplification93.4%
(FPCore (x y z)
:precision binary64
(if (or (<= z -380000000000.0) (not (<= z 8e+14)))
(-
(/
(+
0.083333333333333
(* z (- (* 0.0007936500793651 z) 0.0027777777777778)))
x)
x)
(+ x (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -380000000000.0) || !(z <= 8e+14)) {
tmp = ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x) - x;
} else {
tmp = x + (0.083333333333333 / 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 <= (-380000000000.0d0)) .or. (.not. (z <= 8d+14))) then
tmp = ((0.083333333333333d0 + (z * ((0.0007936500793651d0 * z) - 0.0027777777777778d0))) / x) - x
else
tmp = x + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -380000000000.0) || !(z <= 8e+14)) {
tmp = ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x) - x;
} else {
tmp = x + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -380000000000.0) or not (z <= 8e+14): tmp = ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x) - x else: tmp = x + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -380000000000.0) || !(z <= 8e+14)) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(0.0007936500793651 * z) - 0.0027777777777778))) / x) - x); else tmp = Float64(x + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -380000000000.0) || ~((z <= 8e+14))) tmp = ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x) - x; else tmp = x + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -380000000000.0], N[Not[LessEqual[z, 8e+14]], $MachinePrecision]], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(0.0007936500793651 * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], N[(x + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -380000000000 \lor \neg \left(z \leq 8 \cdot 10^{+14}\right):\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x} - x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -3.8e11 or 8e14 < z Initial program 91.2%
add-cube-cbrt91.2%
pow391.2%
sub-neg91.2%
metadata-eval91.2%
*-commutative91.2%
Applied egg-rr91.2%
Taylor expanded in x around inf 79.2%
neg-mul-179.2%
Simplified79.2%
Taylor expanded in y around 0 58.2%
if -3.8e11 < z < 8e14Initial program 99.5%
add-cube-cbrt98.9%
pow398.9%
sub-neg98.9%
metadata-eval98.9%
*-commutative98.9%
Applied egg-rr98.9%
Taylor expanded in x around inf 52.7%
neg-mul-152.7%
Simplified52.7%
Taylor expanded in z around 0 43.1%
*-un-lft-identity43.1%
*-un-lft-identity43.1%
*-un-lft-identity43.1%
add-sqr-sqrt0.0%
sqrt-unprod48.1%
sqr-neg48.1%
sqrt-unprod49.2%
add-sqr-sqrt49.2%
Applied egg-rr49.2%
*-lft-identity49.2%
Simplified49.2%
Final simplification53.3%
(FPCore (x y z)
:precision binary64
(if (or (<= y -0.0008) (not (<= y 2e-27)))
(- (/ (+ 0.083333333333333 (* z (- (* y z) 0.0027777777777778))) x) x)
(-
(/
(+
0.083333333333333
(* z (- (* 0.0007936500793651 z) 0.0027777777777778)))
x)
x)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -0.0008) || !(y <= 2e-27)) {
tmp = ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x) - x;
} else {
tmp = ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x) - 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 ((y <= (-0.0008d0)) .or. (.not. (y <= 2d-27))) then
tmp = ((0.083333333333333d0 + (z * ((y * z) - 0.0027777777777778d0))) / x) - x
else
tmp = ((0.083333333333333d0 + (z * ((0.0007936500793651d0 * z) - 0.0027777777777778d0))) / x) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -0.0008) || !(y <= 2e-27)) {
tmp = ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x) - x;
} else {
tmp = ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x) - x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -0.0008) or not (y <= 2e-27): tmp = ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x) - x else: tmp = ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x) - x return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -0.0008) || !(y <= 2e-27)) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(y * z) - 0.0027777777777778))) / x) - x); else tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(0.0007936500793651 * z) - 0.0027777777777778))) / x) - x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -0.0008) || ~((y <= 2e-27))) tmp = ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x) - x; else tmp = ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -0.0008], N[Not[LessEqual[y, 2e-27]], $MachinePrecision]], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(y * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(0.0007936500793651 * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.0008 \lor \neg \left(y \leq 2 \cdot 10^{-27}\right):\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(y \cdot z - 0.0027777777777778\right)}{x} - x\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x} - x\\
\end{array}
\end{array}
if y < -8.00000000000000038e-4 or 2.0000000000000001e-27 < y Initial program 95.9%
add-cube-cbrt95.6%
pow395.6%
sub-neg95.6%
metadata-eval95.6%
*-commutative95.6%
Applied egg-rr95.6%
Taylor expanded in x around inf 69.0%
neg-mul-169.0%
Simplified69.0%
Taylor expanded in y around inf 69.0%
*-commutative69.0%
Simplified69.0%
if -8.00000000000000038e-4 < y < 2.0000000000000001e-27Initial program 95.5%
add-cube-cbrt95.2%
pow395.1%
sub-neg95.1%
metadata-eval95.1%
*-commutative95.1%
Applied egg-rr95.1%
Taylor expanded in x around inf 61.1%
neg-mul-161.1%
Simplified61.1%
Taylor expanded in y around 0 61.1%
Final simplification64.9%
(FPCore (x y z) :precision binary64 (if (<= x 3.8e-17) (- (+ (* (/ z x) -0.0027777777777778) (* 0.083333333333333 (/ 1.0 x))) x) (+ x (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if (x <= 3.8e-17) {
tmp = (((z / x) * -0.0027777777777778) + (0.083333333333333 * (1.0 / x))) - x;
} else {
tmp = x + (0.083333333333333 / 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 (x <= 3.8d-17) then
tmp = (((z / x) * (-0.0027777777777778d0)) + (0.083333333333333d0 * (1.0d0 / x))) - x
else
tmp = x + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 3.8e-17) {
tmp = (((z / x) * -0.0027777777777778) + (0.083333333333333 * (1.0 / x))) - x;
} else {
tmp = x + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 3.8e-17: tmp = (((z / x) * -0.0027777777777778) + (0.083333333333333 * (1.0 / x))) - x else: tmp = x + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 3.8e-17) tmp = Float64(Float64(Float64(Float64(z / x) * -0.0027777777777778) + Float64(0.083333333333333 * Float64(1.0 / x))) - x); else tmp = Float64(x + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 3.8e-17) tmp = (((z / x) * -0.0027777777777778) + (0.083333333333333 * (1.0 / x))) - x; else tmp = x + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 3.8e-17], N[(N[(N[(N[(z / x), $MachinePrecision] * -0.0027777777777778), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision], N[(x + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 3.8 \cdot 10^{-17}:\\
\;\;\;\;\left(\frac{z}{x} \cdot -0.0027777777777778 + 0.083333333333333 \cdot \frac{1}{x}\right) - x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if x < 3.8000000000000001e-17Initial program 99.7%
add-cube-cbrt99.7%
pow399.7%
sub-neg99.7%
metadata-eval99.7%
*-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 99.7%
neg-mul-199.7%
Simplified99.7%
Taylor expanded in z around 0 58.6%
if 3.8000000000000001e-17 < x Initial program 91.6%
add-cube-cbrt90.9%
pow390.9%
sub-neg90.9%
metadata-eval90.9%
*-commutative90.9%
Applied egg-rr90.9%
Taylor expanded in x around inf 29.5%
neg-mul-129.5%
Simplified29.5%
Taylor expanded in z around 0 2.4%
*-un-lft-identity2.4%
*-un-lft-identity2.4%
*-un-lft-identity2.4%
add-sqr-sqrt0.0%
sqrt-unprod13.3%
sqr-neg13.3%
sqrt-unprod11.6%
add-sqr-sqrt11.6%
Applied egg-rr11.6%
*-lft-identity11.6%
Simplified11.6%
Final simplification35.3%
(FPCore (x y z)
:precision binary64
(+
(/
(+
(* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))
0.083333333333333)
x)
(- 0.91893853320467 x)))
double code(double x, double y, double z) {
return (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 - x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (((z * (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) + (0.91893853320467d0 - x)
end function
public static double code(double x, double y, double z) {
return (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 - x);
}
def code(x, y, z): return (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 - x)
function code(x, y, z) return Float64(Float64(Float64(Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + Float64(0.91893853320467 - x)) end
function tmp = code(x, y, z) tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 - x); end
code[x_, y_, z_] := N[(N[(N[(N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x} + \left(0.91893853320467 - x\right)
\end{array}
Initial program 95.7%
add-cube-cbrt95.4%
pow395.4%
sub-neg95.4%
metadata-eval95.4%
*-commutative95.4%
Applied egg-rr95.4%
Taylor expanded in x around inf 64.9%
neg-mul-164.9%
sub-neg64.9%
Simplified64.9%
Final simplification64.9%
(FPCore (x y z)
:precision binary64
(-
(/
(+
(* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))
0.083333333333333)
x)
x))
double code(double x, double y, double z) {
return (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) - x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (((z * (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) - x
end function
public static double code(double x, double y, double z) {
return (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) - x;
}
def code(x, y, z): return (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) - x
function code(x, y, z) return Float64(Float64(Float64(Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) - x) end
function tmp = code(x, y, z) tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) - x; end
code[x_, y_, z_] := N[(N[(N[(N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision]
\begin{array}{l}
\\
\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x} - x
\end{array}
Initial program 95.7%
add-cube-cbrt95.4%
pow395.4%
sub-neg95.4%
metadata-eval95.4%
*-commutative95.4%
Applied egg-rr95.4%
Taylor expanded in x around inf 64.9%
neg-mul-164.9%
Simplified64.9%
Final simplification64.9%
(FPCore (x y z) :precision binary64 (if (<= z -8e+137) (- (/ (+ 0.083333333333333 (* z -0.0027777777777778)) x) x) (+ x (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if (z <= -8e+137) {
tmp = ((0.083333333333333 + (z * -0.0027777777777778)) / x) - x;
} else {
tmp = x + (0.083333333333333 / 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 <= (-8d+137)) then
tmp = ((0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x) - x
else
tmp = x + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -8e+137) {
tmp = ((0.083333333333333 + (z * -0.0027777777777778)) / x) - x;
} else {
tmp = x + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -8e+137: tmp = ((0.083333333333333 + (z * -0.0027777777777778)) / x) - x else: tmp = x + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -8e+137) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x) - x); else tmp = Float64(x + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -8e+137) tmp = ((0.083333333333333 + (z * -0.0027777777777778)) / x) - x; else tmp = x + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -8e+137], N[(N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], N[(x + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+137}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x} - x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -8.0000000000000003e137Initial program 94.0%
add-cube-cbrt94.0%
pow394.0%
sub-neg94.0%
metadata-eval94.0%
*-commutative94.0%
Applied egg-rr94.0%
Taylor expanded in x around inf 94.0%
neg-mul-194.0%
Simplified94.0%
Taylor expanded in z around 0 51.3%
*-commutative51.3%
Simplified51.3%
if -8.0000000000000003e137 < z Initial program 95.9%
add-cube-cbrt95.6%
pow395.6%
sub-neg95.6%
metadata-eval95.6%
*-commutative95.6%
Applied egg-rr95.6%
Taylor expanded in x around inf 60.9%
neg-mul-160.9%
Simplified60.9%
Taylor expanded in z around 0 27.5%
*-un-lft-identity27.5%
*-un-lft-identity27.5%
*-un-lft-identity27.5%
add-sqr-sqrt0.0%
sqrt-unprod33.2%
sqr-neg33.2%
sqrt-unprod32.6%
add-sqr-sqrt32.6%
Applied egg-rr32.6%
*-lft-identity32.6%
Simplified32.6%
Final simplification34.8%
(FPCore (x y z) :precision binary64 (+ x (/ 0.083333333333333 x)))
double code(double x, double y, double z) {
return x + (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.083333333333333d0 / x)
end function
public static double code(double x, double y, double z) {
return x + (0.083333333333333 / x);
}
def code(x, y, z): return x + (0.083333333333333 / x)
function code(x, y, z) return Float64(x + Float64(0.083333333333333 / x)) end
function tmp = code(x, y, z) tmp = x + (0.083333333333333 / x); end
code[x_, y_, z_] := N[(x + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{0.083333333333333}{x}
\end{array}
Initial program 95.7%
add-cube-cbrt95.4%
pow395.4%
sub-neg95.4%
metadata-eval95.4%
*-commutative95.4%
Applied egg-rr95.4%
Taylor expanded in x around inf 64.9%
neg-mul-164.9%
Simplified64.9%
Taylor expanded in z around 0 24.7%
*-un-lft-identity24.7%
*-un-lft-identity24.7%
*-un-lft-identity24.7%
add-sqr-sqrt0.0%
sqrt-unprod30.1%
sqr-neg30.1%
sqrt-unprod29.3%
add-sqr-sqrt29.3%
Applied egg-rr29.3%
*-lft-identity29.3%
Simplified29.3%
Final simplification29.3%
(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 95.7%
add-cube-cbrt95.4%
pow395.4%
sub-neg95.4%
metadata-eval95.4%
*-commutative95.4%
Applied egg-rr95.4%
Taylor expanded in x around inf 64.9%
neg-mul-164.9%
Simplified64.9%
Taylor expanded in z around 0 24.7%
Taylor expanded in x around 0 25.6%
Final simplification25.6%
(FPCore (x y z) :precision binary64 (- x))
double code(double x, double y, double z) {
return -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
end function
public static double code(double x, double y, double z) {
return -x;
}
def code(x, y, z): return -x
function code(x, y, z) return Float64(-x) end
function tmp = code(x, y, z) tmp = -x; end
code[x_, y_, z_] := (-x)
\begin{array}{l}
\\
-x
\end{array}
Initial program 95.7%
add-cube-cbrt95.4%
pow395.4%
sub-neg95.4%
metadata-eval95.4%
*-commutative95.4%
Applied egg-rr95.4%
Taylor expanded in x around inf 64.9%
neg-mul-164.9%
Simplified64.9%
Taylor expanded in z around 0 24.7%
Taylor expanded in x around inf 1.3%
mul-1-neg1.3%
Simplified1.3%
Final simplification1.3%
(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 2024067
(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)))