
(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 18 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 400000000000.0)
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
1.0
(/
x
(+
0.083333333333333
(* z (+ -0.0027777777777778 (* z (+ y 0.0007936500793651))))))))
(+
(* (log x) (+ x -0.5))
(+ 0.91893853320467 (- (* z (* z (/ (- y -0.0007936500793651) x))) x)))))
double code(double x, double y, double z) {
double tmp;
if (x <= 400000000000.0) {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (1.0 / (x / (0.083333333333333 + (z * (-0.0027777777777778 + (z * (y + 0.0007936500793651)))))));
} else {
tmp = (log(x) * (x + -0.5)) + (0.91893853320467 + ((z * (z * ((y - -0.0007936500793651) / 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 (x <= 400000000000.0d0) then
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (1.0d0 / (x / (0.083333333333333d0 + (z * ((-0.0027777777777778d0) + (z * (y + 0.0007936500793651d0)))))))
else
tmp = (log(x) * (x + (-0.5d0))) + (0.91893853320467d0 + ((z * (z * ((y - (-0.0007936500793651d0)) / x))) - x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 400000000000.0) {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (1.0 / (x / (0.083333333333333 + (z * (-0.0027777777777778 + (z * (y + 0.0007936500793651)))))));
} else {
tmp = (Math.log(x) * (x + -0.5)) + (0.91893853320467 + ((z * (z * ((y - -0.0007936500793651) / x))) - x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 400000000000.0: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (1.0 / (x / (0.083333333333333 + (z * (-0.0027777777777778 + (z * (y + 0.0007936500793651))))))) else: tmp = (math.log(x) * (x + -0.5)) + (0.91893853320467 + ((z * (z * ((y - -0.0007936500793651) / x))) - x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 400000000000.0) tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(1.0 / Float64(x / Float64(0.083333333333333 + Float64(z * Float64(-0.0027777777777778 + Float64(z * Float64(y + 0.0007936500793651)))))))); else tmp = Float64(Float64(log(x) * Float64(x + -0.5)) + Float64(0.91893853320467 + Float64(Float64(z * Float64(z * Float64(Float64(y - -0.0007936500793651) / x))) - x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 400000000000.0) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (1.0 / (x / (0.083333333333333 + (z * (-0.0027777777777778 + (z * (y + 0.0007936500793651))))))); else tmp = (log(x) * (x + -0.5)) + (0.91893853320467 + ((z * (z * ((y - -0.0007936500793651) / x))) - x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 400000000000.0], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(1.0 / N[(x / N[(0.083333333333333 + N[(z * N[(-0.0027777777777778 + N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] + N[(0.91893853320467 + N[(N[(z * N[(z * N[(N[(y - -0.0007936500793651), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 400000000000:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{1}{\frac{x}{0.083333333333333 + z \cdot \left(-0.0027777777777778 + z \cdot \left(y + 0.0007936500793651\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\log x \cdot \left(x + -0.5\right) + \left(0.91893853320467 + \left(z \cdot \left(z \cdot \frac{y - -0.0007936500793651}{x}\right) - x\right)\right)\\
\end{array}
\end{array}
if x < 4e11Initial program 99.6%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
metadata-eval99.7%
Applied egg-rr99.7%
if 4e11 < x Initial program 89.0%
Simplified89.1%
Taylor expanded in z around inf
*-commutativeN/A
associate-/l*N/A
unpow2N/A
associate-*l*N/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
distribute-lft-inN/A
metadata-evalN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6499.5%
Simplified99.5%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(if (<= x 500000000000.0)
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
(-
0.083333333333333
(* z (- 0.0027777777777778 (* z (+ y 0.0007936500793651)))))
x))
(+
(* (log x) (+ x -0.5))
(+ 0.91893853320467 (- (* z (* z (/ (- y -0.0007936500793651) x))) x)))))
double code(double x, double y, double z) {
double tmp;
if (x <= 500000000000.0) {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((0.083333333333333 - (z * (0.0027777777777778 - (z * (y + 0.0007936500793651))))) / x);
} else {
tmp = (log(x) * (x + -0.5)) + (0.91893853320467 + ((z * (z * ((y - -0.0007936500793651) / 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 (x <= 500000000000.0d0) then
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((0.083333333333333d0 - (z * (0.0027777777777778d0 - (z * (y + 0.0007936500793651d0))))) / x)
else
tmp = (log(x) * (x + (-0.5d0))) + (0.91893853320467d0 + ((z * (z * ((y - (-0.0007936500793651d0)) / x))) - x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 500000000000.0) {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((0.083333333333333 - (z * (0.0027777777777778 - (z * (y + 0.0007936500793651))))) / x);
} else {
tmp = (Math.log(x) * (x + -0.5)) + (0.91893853320467 + ((z * (z * ((y - -0.0007936500793651) / x))) - x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 500000000000.0: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((0.083333333333333 - (z * (0.0027777777777778 - (z * (y + 0.0007936500793651))))) / x) else: tmp = (math.log(x) * (x + -0.5)) + (0.91893853320467 + ((z * (z * ((y - -0.0007936500793651) / x))) - x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 500000000000.0) tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(0.083333333333333 - Float64(z * Float64(0.0027777777777778 - Float64(z * Float64(y + 0.0007936500793651))))) / x)); else tmp = Float64(Float64(log(x) * Float64(x + -0.5)) + Float64(0.91893853320467 + Float64(Float64(z * Float64(z * Float64(Float64(y - -0.0007936500793651) / x))) - x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 500000000000.0) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((0.083333333333333 - (z * (0.0027777777777778 - (z * (y + 0.0007936500793651))))) / x); else tmp = (log(x) * (x + -0.5)) + (0.91893853320467 + ((z * (z * ((y - -0.0007936500793651) / x))) - x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 500000000000.0], 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[(0.0027777777777778 - N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] + N[(0.91893853320467 + N[(N[(z * N[(z * N[(N[(y - -0.0007936500793651), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 500000000000:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333 - z \cdot \left(0.0027777777777778 - z \cdot \left(y + 0.0007936500793651\right)\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\log x \cdot \left(x + -0.5\right) + \left(0.91893853320467 + \left(z \cdot \left(z \cdot \frac{y - -0.0007936500793651}{x}\right) - x\right)\right)\\
\end{array}
\end{array}
if x < 5e11Initial program 99.6%
if 5e11 < x Initial program 89.0%
Simplified89.1%
Taylor expanded in z around inf
*-commutativeN/A
associate-/l*N/A
unpow2N/A
associate-*l*N/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
distribute-lft-inN/A
metadata-evalN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6499.5%
Simplified99.5%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* (log x) (+ x -0.5))))
(if (<= x 500000000000.0)
(+
t_0
(+
0.91893853320467
(-
(/
(-
(* z (- (* z (- y -0.0007936500793651)) 0.0027777777777778))
-0.083333333333333)
x)
x)))
(+
t_0
(+
0.91893853320467
(- (* z (* z (/ (- y -0.0007936500793651) x))) x))))))
double code(double x, double y, double z) {
double t_0 = log(x) * (x + -0.5);
double tmp;
if (x <= 500000000000.0) {
tmp = t_0 + (0.91893853320467 + ((((z * ((z * (y - -0.0007936500793651)) - 0.0027777777777778)) - -0.083333333333333) / x) - x));
} else {
tmp = t_0 + (0.91893853320467 + ((z * (z * ((y - -0.0007936500793651) / 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 = log(x) * (x + (-0.5d0))
if (x <= 500000000000.0d0) then
tmp = t_0 + (0.91893853320467d0 + ((((z * ((z * (y - (-0.0007936500793651d0))) - 0.0027777777777778d0)) - (-0.083333333333333d0)) / x) - x))
else
tmp = t_0 + (0.91893853320467d0 + ((z * (z * ((y - (-0.0007936500793651d0)) / x))) - x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = Math.log(x) * (x + -0.5);
double tmp;
if (x <= 500000000000.0) {
tmp = t_0 + (0.91893853320467 + ((((z * ((z * (y - -0.0007936500793651)) - 0.0027777777777778)) - -0.083333333333333) / x) - x));
} else {
tmp = t_0 + (0.91893853320467 + ((z * (z * ((y - -0.0007936500793651) / x))) - x));
}
return tmp;
}
def code(x, y, z): t_0 = math.log(x) * (x + -0.5) tmp = 0 if x <= 500000000000.0: tmp = t_0 + (0.91893853320467 + ((((z * ((z * (y - -0.0007936500793651)) - 0.0027777777777778)) - -0.083333333333333) / x) - x)) else: tmp = t_0 + (0.91893853320467 + ((z * (z * ((y - -0.0007936500793651) / x))) - x)) return tmp
function code(x, y, z) t_0 = Float64(log(x) * Float64(x + -0.5)) tmp = 0.0 if (x <= 500000000000.0) tmp = Float64(t_0 + Float64(0.91893853320467 + Float64(Float64(Float64(Float64(z * Float64(Float64(z * Float64(y - -0.0007936500793651)) - 0.0027777777777778)) - -0.083333333333333) / x) - x))); else tmp = Float64(t_0 + Float64(0.91893853320467 + Float64(Float64(z * Float64(z * Float64(Float64(y - -0.0007936500793651) / x))) - x))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = log(x) * (x + -0.5); tmp = 0.0; if (x <= 500000000000.0) tmp = t_0 + (0.91893853320467 + ((((z * ((z * (y - -0.0007936500793651)) - 0.0027777777777778)) - -0.083333333333333) / x) - x)); else tmp = t_0 + (0.91893853320467 + ((z * (z * ((y - -0.0007936500793651) / x))) - x)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 500000000000.0], N[(t$95$0 + N[(0.91893853320467 + N[(N[(N[(N[(z * N[(N[(z * N[(y - -0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] - -0.083333333333333), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(0.91893853320467 + N[(N[(z * N[(z * N[(N[(y - -0.0007936500793651), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log x \cdot \left(x + -0.5\right)\\
\mathbf{if}\;x \leq 500000000000:\\
\;\;\;\;t\_0 + \left(0.91893853320467 + \left(\frac{z \cdot \left(z \cdot \left(y - -0.0007936500793651\right) - 0.0027777777777778\right) - -0.083333333333333}{x} - x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 + \left(0.91893853320467 + \left(z \cdot \left(z \cdot \frac{y - -0.0007936500793651}{x}\right) - x\right)\right)\\
\end{array}
\end{array}
if x < 5e11Initial program 99.6%
Simplified99.6%
if 5e11 < x Initial program 89.0%
Simplified89.1%
Taylor expanded in z around inf
*-commutativeN/A
associate-/l*N/A
unpow2N/A
associate-*l*N/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
distribute-lft-inN/A
metadata-evalN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6499.5%
Simplified99.5%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(if (<= x 0.0033)
(+
(/
1.0
(/
x
(+
0.083333333333333
(* z (+ -0.0027777777777778 (* z (+ y 0.0007936500793651)))))))
(+ 0.91893853320467 (* (log x) -0.5)))
(+
(* (log x) (+ x -0.5))
(+ 0.91893853320467 (- (* z (* z (/ (- y -0.0007936500793651) x))) x)))))
double code(double x, double y, double z) {
double tmp;
if (x <= 0.0033) {
tmp = (1.0 / (x / (0.083333333333333 + (z * (-0.0027777777777778 + (z * (y + 0.0007936500793651))))))) + (0.91893853320467 + (log(x) * -0.5));
} else {
tmp = (log(x) * (x + -0.5)) + (0.91893853320467 + ((z * (z * ((y - -0.0007936500793651) / 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 (x <= 0.0033d0) then
tmp = (1.0d0 / (x / (0.083333333333333d0 + (z * ((-0.0027777777777778d0) + (z * (y + 0.0007936500793651d0))))))) + (0.91893853320467d0 + (log(x) * (-0.5d0)))
else
tmp = (log(x) * (x + (-0.5d0))) + (0.91893853320467d0 + ((z * (z * ((y - (-0.0007936500793651d0)) / x))) - x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 0.0033) {
tmp = (1.0 / (x / (0.083333333333333 + (z * (-0.0027777777777778 + (z * (y + 0.0007936500793651))))))) + (0.91893853320467 + (Math.log(x) * -0.5));
} else {
tmp = (Math.log(x) * (x + -0.5)) + (0.91893853320467 + ((z * (z * ((y - -0.0007936500793651) / x))) - x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 0.0033: tmp = (1.0 / (x / (0.083333333333333 + (z * (-0.0027777777777778 + (z * (y + 0.0007936500793651))))))) + (0.91893853320467 + (math.log(x) * -0.5)) else: tmp = (math.log(x) * (x + -0.5)) + (0.91893853320467 + ((z * (z * ((y - -0.0007936500793651) / x))) - x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 0.0033) tmp = Float64(Float64(1.0 / Float64(x / Float64(0.083333333333333 + Float64(z * Float64(-0.0027777777777778 + Float64(z * Float64(y + 0.0007936500793651))))))) + Float64(0.91893853320467 + Float64(log(x) * -0.5))); else tmp = Float64(Float64(log(x) * Float64(x + -0.5)) + Float64(0.91893853320467 + Float64(Float64(z * Float64(z * Float64(Float64(y - -0.0007936500793651) / x))) - x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 0.0033) tmp = (1.0 / (x / (0.083333333333333 + (z * (-0.0027777777777778 + (z * (y + 0.0007936500793651))))))) + (0.91893853320467 + (log(x) * -0.5)); else tmp = (log(x) * (x + -0.5)) + (0.91893853320467 + ((z * (z * ((y - -0.0007936500793651) / x))) - x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 0.0033], N[(N[(1.0 / N[(x / N[(0.083333333333333 + N[(z * N[(-0.0027777777777778 + N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] + N[(0.91893853320467 + N[(N[(z * N[(z * N[(N[(y - -0.0007936500793651), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.0033:\\
\;\;\;\;\frac{1}{\frac{x}{0.083333333333333 + z \cdot \left(-0.0027777777777778 + z \cdot \left(y + 0.0007936500793651\right)\right)}} + \left(0.91893853320467 + \log x \cdot -0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\log x \cdot \left(x + -0.5\right) + \left(0.91893853320467 + \left(z \cdot \left(z \cdot \frac{y - -0.0007936500793651}{x}\right) - x\right)\right)\\
\end{array}
\end{array}
if x < 0.0033Initial program 99.6%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in x around 0
remove-double-negN/A
log-recN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
log-lowering-log.f6499.2%
Simplified99.2%
if 0.0033 < x Initial program 89.5%
Simplified89.5%
Taylor expanded in z around inf
*-commutativeN/A
associate-/l*N/A
unpow2N/A
associate-*l*N/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
distribute-lft-inN/A
metadata-evalN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6498.5%
Simplified98.5%
Final simplification98.9%
(FPCore (x y z)
:precision binary64
(if (<= x 0.0033)
(/
(+
0.083333333333333
(* z (+ -0.0027777777777778 (* z (+ y 0.0007936500793651)))))
x)
(+
(* (log x) (+ x -0.5))
(+ 0.91893853320467 (- (* z (* z (/ (- y -0.0007936500793651) x))) x)))))
double code(double x, double y, double z) {
double tmp;
if (x <= 0.0033) {
tmp = (0.083333333333333 + (z * (-0.0027777777777778 + (z * (y + 0.0007936500793651))))) / x;
} else {
tmp = (log(x) * (x + -0.5)) + (0.91893853320467 + ((z * (z * ((y - -0.0007936500793651) / 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 (x <= 0.0033d0) then
tmp = (0.083333333333333d0 + (z * ((-0.0027777777777778d0) + (z * (y + 0.0007936500793651d0))))) / x
else
tmp = (log(x) * (x + (-0.5d0))) + (0.91893853320467d0 + ((z * (z * ((y - (-0.0007936500793651d0)) / x))) - x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 0.0033) {
tmp = (0.083333333333333 + (z * (-0.0027777777777778 + (z * (y + 0.0007936500793651))))) / x;
} else {
tmp = (Math.log(x) * (x + -0.5)) + (0.91893853320467 + ((z * (z * ((y - -0.0007936500793651) / x))) - x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 0.0033: tmp = (0.083333333333333 + (z * (-0.0027777777777778 + (z * (y + 0.0007936500793651))))) / x else: tmp = (math.log(x) * (x + -0.5)) + (0.91893853320467 + ((z * (z * ((y - -0.0007936500793651) / x))) - x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 0.0033) tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(-0.0027777777777778 + Float64(z * Float64(y + 0.0007936500793651))))) / x); else tmp = Float64(Float64(log(x) * Float64(x + -0.5)) + Float64(0.91893853320467 + Float64(Float64(z * Float64(z * Float64(Float64(y - -0.0007936500793651) / x))) - x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 0.0033) tmp = (0.083333333333333 + (z * (-0.0027777777777778 + (z * (y + 0.0007936500793651))))) / x; else tmp = (log(x) * (x + -0.5)) + (0.91893853320467 + ((z * (z * ((y - -0.0007936500793651) / x))) - x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 0.0033], N[(N[(0.083333333333333 + N[(z * N[(-0.0027777777777778 + N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] + N[(0.91893853320467 + N[(N[(z * N[(z * N[(N[(y - -0.0007936500793651), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.0033:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(-0.0027777777777778 + z \cdot \left(y + 0.0007936500793651\right)\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\log x \cdot \left(x + -0.5\right) + \left(0.91893853320467 + \left(z \cdot \left(z \cdot \frac{y - -0.0007936500793651}{x}\right) - x\right)\right)\\
\end{array}
\end{array}
if x < 0.0033Initial program 99.6%
Simplified99.6%
Taylor expanded in x around 0
/-lowering-/.f64N/A
Simplified98.5%
if 0.0033 < x Initial program 89.5%
Simplified89.5%
Taylor expanded in z around inf
*-commutativeN/A
associate-/l*N/A
unpow2N/A
associate-*l*N/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
distribute-lft-inN/A
metadata-evalN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6498.5%
Simplified98.5%
Final simplification98.5%
(FPCore (x y z)
:precision binary64
(if (<= x 3200000000000.0)
(+
(/
(-
0.083333333333333
(* z (- 0.0027777777777778 (* z (+ y 0.0007936500793651)))))
x)
(* x (+ (log x) -1.0)))
(+
(+ 0.91893853320467 (- (* z (* z (/ (- y -0.0007936500793651) x))) x))
(* x (log x)))))
double code(double x, double y, double z) {
double tmp;
if (x <= 3200000000000.0) {
tmp = ((0.083333333333333 - (z * (0.0027777777777778 - (z * (y + 0.0007936500793651))))) / x) + (x * (log(x) + -1.0));
} else {
tmp = (0.91893853320467 + ((z * (z * ((y - -0.0007936500793651) / x))) - x)) + (x * log(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 <= 3200000000000.0d0) then
tmp = ((0.083333333333333d0 - (z * (0.0027777777777778d0 - (z * (y + 0.0007936500793651d0))))) / x) + (x * (log(x) + (-1.0d0)))
else
tmp = (0.91893853320467d0 + ((z * (z * ((y - (-0.0007936500793651d0)) / x))) - x)) + (x * log(x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 3200000000000.0) {
tmp = ((0.083333333333333 - (z * (0.0027777777777778 - (z * (y + 0.0007936500793651))))) / x) + (x * (Math.log(x) + -1.0));
} else {
tmp = (0.91893853320467 + ((z * (z * ((y - -0.0007936500793651) / x))) - x)) + (x * Math.log(x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 3200000000000.0: tmp = ((0.083333333333333 - (z * (0.0027777777777778 - (z * (y + 0.0007936500793651))))) / x) + (x * (math.log(x) + -1.0)) else: tmp = (0.91893853320467 + ((z * (z * ((y - -0.0007936500793651) / x))) - x)) + (x * math.log(x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 3200000000000.0) tmp = Float64(Float64(Float64(0.083333333333333 - Float64(z * Float64(0.0027777777777778 - Float64(z * Float64(y + 0.0007936500793651))))) / x) + Float64(x * Float64(log(x) + -1.0))); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(z * Float64(z * Float64(Float64(y - -0.0007936500793651) / x))) - x)) + Float64(x * log(x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 3200000000000.0) tmp = ((0.083333333333333 - (z * (0.0027777777777778 - (z * (y + 0.0007936500793651))))) / x) + (x * (log(x) + -1.0)); else tmp = (0.91893853320467 + ((z * (z * ((y - -0.0007936500793651) / x))) - x)) + (x * log(x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 3200000000000.0], N[(N[(N[(0.083333333333333 - N[(z * N[(0.0027777777777778 - N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(z * N[(z * N[(N[(y - -0.0007936500793651), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 3200000000000:\\
\;\;\;\;\frac{0.083333333333333 - z \cdot \left(0.0027777777777778 - z \cdot \left(y + 0.0007936500793651\right)\right)}{x} + x \cdot \left(\log x + -1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(z \cdot \left(z \cdot \frac{y - -0.0007936500793651}{x}\right) - x\right)\right) + x \cdot \log x\\
\end{array}
\end{array}
if x < 3.2e12Initial program 99.6%
Taylor expanded in x around inf
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
log-lowering-log.f6497.2%
Simplified97.2%
if 3.2e12 < x Initial program 89.0%
Simplified89.1%
Taylor expanded in z around inf
*-commutativeN/A
associate-/l*N/A
unpow2N/A
associate-*l*N/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
distribute-lft-inN/A
metadata-evalN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6499.5%
Simplified99.5%
Taylor expanded in x around inf
mul-1-negN/A
distribute-rgt-neg-inN/A
log-recN/A
remove-double-negN/A
*-lowering-*.f64N/A
log-lowering-log.f6499.5%
Simplified99.5%
Final simplification98.2%
(FPCore (x y z)
:precision binary64
(if (<= x 0.0033)
(/
(+
0.083333333333333
(* z (+ -0.0027777777777778 (* z (+ y 0.0007936500793651)))))
x)
(+
(+ 0.91893853320467 (- (* z (* z (/ (- y -0.0007936500793651) x))) x))
(* x (log x)))))
double code(double x, double y, double z) {
double tmp;
if (x <= 0.0033) {
tmp = (0.083333333333333 + (z * (-0.0027777777777778 + (z * (y + 0.0007936500793651))))) / x;
} else {
tmp = (0.91893853320467 + ((z * (z * ((y - -0.0007936500793651) / x))) - x)) + (x * log(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.0033d0) then
tmp = (0.083333333333333d0 + (z * ((-0.0027777777777778d0) + (z * (y + 0.0007936500793651d0))))) / x
else
tmp = (0.91893853320467d0 + ((z * (z * ((y - (-0.0007936500793651d0)) / x))) - x)) + (x * log(x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 0.0033) {
tmp = (0.083333333333333 + (z * (-0.0027777777777778 + (z * (y + 0.0007936500793651))))) / x;
} else {
tmp = (0.91893853320467 + ((z * (z * ((y - -0.0007936500793651) / x))) - x)) + (x * Math.log(x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 0.0033: tmp = (0.083333333333333 + (z * (-0.0027777777777778 + (z * (y + 0.0007936500793651))))) / x else: tmp = (0.91893853320467 + ((z * (z * ((y - -0.0007936500793651) / x))) - x)) + (x * math.log(x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 0.0033) tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(-0.0027777777777778 + Float64(z * Float64(y + 0.0007936500793651))))) / x); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(z * Float64(z * Float64(Float64(y - -0.0007936500793651) / x))) - x)) + Float64(x * log(x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 0.0033) tmp = (0.083333333333333 + (z * (-0.0027777777777778 + (z * (y + 0.0007936500793651))))) / x; else tmp = (0.91893853320467 + ((z * (z * ((y - -0.0007936500793651) / x))) - x)) + (x * log(x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 0.0033], N[(N[(0.083333333333333 + N[(z * N[(-0.0027777777777778 + N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(z * N[(z * N[(N[(y - -0.0007936500793651), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.0033:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(-0.0027777777777778 + z \cdot \left(y + 0.0007936500793651\right)\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(z \cdot \left(z \cdot \frac{y - -0.0007936500793651}{x}\right) - x\right)\right) + x \cdot \log x\\
\end{array}
\end{array}
if x < 0.0033Initial program 99.6%
Simplified99.6%
Taylor expanded in x around 0
/-lowering-/.f64N/A
Simplified98.5%
if 0.0033 < x Initial program 89.5%
Simplified89.5%
Taylor expanded in z around inf
*-commutativeN/A
associate-/l*N/A
unpow2N/A
associate-*l*N/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
distribute-lft-inN/A
metadata-evalN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6498.5%
Simplified98.5%
Taylor expanded in x around inf
mul-1-negN/A
distribute-rgt-neg-inN/A
log-recN/A
remove-double-negN/A
*-lowering-*.f64N/A
log-lowering-log.f6497.8%
Simplified97.8%
Final simplification98.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ (log x) -1.0)))
(if (<= x 1.6e+74)
(/
(+
0.083333333333333
(* z (+ -0.0027777777777778 (* z (+ y 0.0007936500793651)))))
x)
(if (<= x 4e+143) (* y (* x (/ t_0 y))) (* x t_0)))))
double code(double x, double y, double z) {
double t_0 = log(x) + -1.0;
double tmp;
if (x <= 1.6e+74) {
tmp = (0.083333333333333 + (z * (-0.0027777777777778 + (z * (y + 0.0007936500793651))))) / x;
} else if (x <= 4e+143) {
tmp = y * (x * (t_0 / y));
} else {
tmp = x * 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 = log(x) + (-1.0d0)
if (x <= 1.6d+74) then
tmp = (0.083333333333333d0 + (z * ((-0.0027777777777778d0) + (z * (y + 0.0007936500793651d0))))) / x
else if (x <= 4d+143) then
tmp = y * (x * (t_0 / y))
else
tmp = x * t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = Math.log(x) + -1.0;
double tmp;
if (x <= 1.6e+74) {
tmp = (0.083333333333333 + (z * (-0.0027777777777778 + (z * (y + 0.0007936500793651))))) / x;
} else if (x <= 4e+143) {
tmp = y * (x * (t_0 / y));
} else {
tmp = x * t_0;
}
return tmp;
}
def code(x, y, z): t_0 = math.log(x) + -1.0 tmp = 0 if x <= 1.6e+74: tmp = (0.083333333333333 + (z * (-0.0027777777777778 + (z * (y + 0.0007936500793651))))) / x elif x <= 4e+143: tmp = y * (x * (t_0 / y)) else: tmp = x * t_0 return tmp
function code(x, y, z) t_0 = Float64(log(x) + -1.0) tmp = 0.0 if (x <= 1.6e+74) tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(-0.0027777777777778 + Float64(z * Float64(y + 0.0007936500793651))))) / x); elseif (x <= 4e+143) tmp = Float64(y * Float64(x * Float64(t_0 / y))); else tmp = Float64(x * t_0); end return tmp end
function tmp_2 = code(x, y, z) t_0 = log(x) + -1.0; tmp = 0.0; if (x <= 1.6e+74) tmp = (0.083333333333333 + (z * (-0.0027777777777778 + (z * (y + 0.0007936500793651))))) / x; elseif (x <= 4e+143) tmp = y * (x * (t_0 / y)); else tmp = x * t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]}, If[LessEqual[x, 1.6e+74], N[(N[(0.083333333333333 + N[(z * N[(-0.0027777777777778 + N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, 4e+143], N[(y * N[(x * N[(t$95$0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log x + -1\\
\mathbf{if}\;x \leq 1.6 \cdot 10^{+74}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(-0.0027777777777778 + z \cdot \left(y + 0.0007936500793651\right)\right)}{x}\\
\mathbf{elif}\;x \leq 4 \cdot 10^{+143}:\\
\;\;\;\;y \cdot \left(x \cdot \frac{t\_0}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot t\_0\\
\end{array}
\end{array}
if x < 1.59999999999999997e74Initial program 99.1%
Simplified99.1%
Taylor expanded in x around 0
/-lowering-/.f64N/A
Simplified92.9%
if 1.59999999999999997e74 < x < 4.0000000000000001e143Initial program 92.0%
Taylor expanded in y around inf
Simplified67.7%
Taylor expanded in x around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
log-lowering-log.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6457.1%
Simplified57.1%
Taylor expanded in x around 0
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
remove-double-negN/A
log-recN/A
mul-1-negN/A
associate-*r/N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
div-subN/A
Simplified80.0%
if 4.0000000000000001e143 < x Initial program 85.1%
Simplified85.1%
Taylor expanded in x around inf
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
log-lowering-log.f6481.9%
Simplified81.9%
Final simplification88.9%
(FPCore (x y z)
:precision binary64
(if (<= x 1.75e+74)
(/
(+
0.083333333333333
(* z (+ -0.0027777777777778 (* z (+ y 0.0007936500793651)))))
x)
(* x (+ (log x) -1.0))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.75e+74) {
tmp = (0.083333333333333 + (z * (-0.0027777777777778 + (z * (y + 0.0007936500793651))))) / 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 <= 1.75d+74) then
tmp = (0.083333333333333d0 + (z * ((-0.0027777777777778d0) + (z * (y + 0.0007936500793651d0))))) / 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 <= 1.75e+74) {
tmp = (0.083333333333333 + (z * (-0.0027777777777778 + (z * (y + 0.0007936500793651))))) / x;
} else {
tmp = x * (Math.log(x) + -1.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1.75e+74: tmp = (0.083333333333333 + (z * (-0.0027777777777778 + (z * (y + 0.0007936500793651))))) / x else: tmp = x * (math.log(x) + -1.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1.75e+74) tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(-0.0027777777777778 + Float64(z * Float64(y + 0.0007936500793651))))) / 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 <= 1.75e+74) tmp = (0.083333333333333 + (z * (-0.0027777777777778 + (z * (y + 0.0007936500793651))))) / x; else tmp = x * (log(x) + -1.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1.75e+74], N[(N[(0.083333333333333 + N[(z * N[(-0.0027777777777778 + N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.75 \cdot 10^{+74}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(-0.0027777777777778 + z \cdot \left(y + 0.0007936500793651\right)\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right)\\
\end{array}
\end{array}
if x < 1.75000000000000007e74Initial program 99.1%
Simplified99.1%
Taylor expanded in x around 0
/-lowering-/.f64N/A
Simplified92.9%
if 1.75000000000000007e74 < x Initial program 87.0%
Simplified87.1%
Taylor expanded in x around inf
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
log-lowering-log.f6476.0%
Simplified76.0%
Final simplification87.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (* z (/ (+ y 0.0007936500793651) x)))))
(if (<= z -10.0)
t_0
(if (<= z 1.75e-13) (/ (+ 0.083333333333333 (* y (* z z))) x) t_0))))
double code(double x, double y, double z) {
double t_0 = z * (z * ((y + 0.0007936500793651) / x));
double tmp;
if (z <= -10.0) {
tmp = t_0;
} else if (z <= 1.75e-13) {
tmp = (0.083333333333333 + (y * (z * z))) / 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 = z * (z * ((y + 0.0007936500793651d0) / x))
if (z <= (-10.0d0)) then
tmp = t_0
else if (z <= 1.75d-13) then
tmp = (0.083333333333333d0 + (y * (z * z))) / x
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * (z * ((y + 0.0007936500793651) / x));
double tmp;
if (z <= -10.0) {
tmp = t_0;
} else if (z <= 1.75e-13) {
tmp = (0.083333333333333 + (y * (z * z))) / x;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = z * (z * ((y + 0.0007936500793651) / x)) tmp = 0 if z <= -10.0: tmp = t_0 elif z <= 1.75e-13: tmp = (0.083333333333333 + (y * (z * z))) / x else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(z * Float64(z * Float64(Float64(y + 0.0007936500793651) / x))) tmp = 0.0 if (z <= -10.0) tmp = t_0; elseif (z <= 1.75e-13) tmp = Float64(Float64(0.083333333333333 + Float64(y * Float64(z * z))) / x); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (z * ((y + 0.0007936500793651) / x)); tmp = 0.0; if (z <= -10.0) tmp = t_0; elseif (z <= 1.75e-13) tmp = (0.083333333333333 + (y * (z * z))) / x; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -10.0], t$95$0, If[LessEqual[z, 1.75e-13], N[(N[(0.083333333333333 + N[(y * N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(z \cdot \frac{y + 0.0007936500793651}{x}\right)\\
\mathbf{if}\;z \leq -10:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{-13}:\\
\;\;\;\;\frac{0.083333333333333 + y \cdot \left(z \cdot z\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -10 or 1.7500000000000001e-13 < z Initial program 91.1%
Simplified91.1%
Taylor expanded in z around inf
*-commutativeN/A
associate-/l*N/A
unpow2N/A
associate-*l*N/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
distribute-lft-inN/A
metadata-evalN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6499.0%
Simplified99.0%
Taylor expanded in x around 0
unpow2N/A
associate-*l*N/A
associate-*r/N/A
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f6481.8%
Simplified81.8%
if -10 < z < 1.7500000000000001e-13Initial program 99.4%
Taylor expanded in y around inf
Simplified82.1%
Taylor expanded in y around inf
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6444.4%
Simplified44.4%
Taylor expanded in y around inf
Simplified55.2%
Final simplification69.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (* z (/ (+ y 0.0007936500793651) x)))))
(if (<= z -3e-6)
t_0
(if (<= z 3.5e-36)
(/ (+ 0.083333333333333 (* z -0.0027777777777778)) x)
t_0))))
double code(double x, double y, double z) {
double t_0 = z * (z * ((y + 0.0007936500793651) / x));
double tmp;
if (z <= -3e-6) {
tmp = t_0;
} else if (z <= 3.5e-36) {
tmp = (0.083333333333333 + (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 = z * (z * ((y + 0.0007936500793651d0) / x))
if (z <= (-3d-6)) then
tmp = t_0
else if (z <= 3.5d-36) then
tmp = (0.083333333333333d0 + (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 = z * (z * ((y + 0.0007936500793651) / x));
double tmp;
if (z <= -3e-6) {
tmp = t_0;
} else if (z <= 3.5e-36) {
tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = z * (z * ((y + 0.0007936500793651) / x)) tmp = 0 if z <= -3e-6: tmp = t_0 elif z <= 3.5e-36: tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(z * Float64(z * Float64(Float64(y + 0.0007936500793651) / x))) tmp = 0.0 if (z <= -3e-6) tmp = t_0; elseif (z <= 3.5e-36) tmp = Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (z * ((y + 0.0007936500793651) / x)); tmp = 0.0; if (z <= -3e-6) tmp = t_0; elseif (z <= 3.5e-36) tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3e-6], t$95$0, If[LessEqual[z, 3.5e-36], N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(z \cdot \frac{y + 0.0007936500793651}{x}\right)\\
\mathbf{if}\;z \leq -3 \cdot 10^{-6}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-36}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -3.0000000000000001e-6 or 3.5e-36 < z Initial program 91.3%
Simplified91.3%
Taylor expanded in z around inf
*-commutativeN/A
associate-/l*N/A
unpow2N/A
associate-*l*N/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
distribute-lft-inN/A
metadata-evalN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6498.1%
Simplified98.1%
Taylor expanded in x around 0
unpow2N/A
associate-*l*N/A
associate-*r/N/A
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f6480.7%
Simplified80.7%
if -3.0000000000000001e-6 < z < 3.5e-36Initial program 99.4%
Taylor expanded in y around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6493.5%
Simplified93.5%
Taylor expanded in x around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6449.3%
Simplified49.3%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6449.3%
Simplified49.3%
Final simplification66.7%
(FPCore (x y z)
:precision binary64
(if (<= x 235000000000.0)
(/
(+
0.083333333333333
(* z (+ -0.0027777777777778 (* z (+ y 0.0007936500793651)))))
x)
(* z (* z (/ (+ y 0.0007936500793651) x)))))
double code(double x, double y, double z) {
double tmp;
if (x <= 235000000000.0) {
tmp = (0.083333333333333 + (z * (-0.0027777777777778 + (z * (y + 0.0007936500793651))))) / x;
} else {
tmp = z * (z * ((y + 0.0007936500793651) / 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 <= 235000000000.0d0) then
tmp = (0.083333333333333d0 + (z * ((-0.0027777777777778d0) + (z * (y + 0.0007936500793651d0))))) / x
else
tmp = z * (z * ((y + 0.0007936500793651d0) / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 235000000000.0) {
tmp = (0.083333333333333 + (z * (-0.0027777777777778 + (z * (y + 0.0007936500793651))))) / x;
} else {
tmp = z * (z * ((y + 0.0007936500793651) / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 235000000000.0: tmp = (0.083333333333333 + (z * (-0.0027777777777778 + (z * (y + 0.0007936500793651))))) / x else: tmp = z * (z * ((y + 0.0007936500793651) / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 235000000000.0) tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(-0.0027777777777778 + Float64(z * Float64(y + 0.0007936500793651))))) / x); else tmp = Float64(z * Float64(z * Float64(Float64(y + 0.0007936500793651) / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 235000000000.0) tmp = (0.083333333333333 + (z * (-0.0027777777777778 + (z * (y + 0.0007936500793651))))) / x; else tmp = z * (z * ((y + 0.0007936500793651) / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 235000000000.0], N[(N[(0.083333333333333 + N[(z * N[(-0.0027777777777778 + N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(z * N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 235000000000:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(-0.0027777777777778 + z \cdot \left(y + 0.0007936500793651\right)\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(z \cdot \frac{y + 0.0007936500793651}{x}\right)\\
\end{array}
\end{array}
if x < 2.35e11Initial program 99.6%
Simplified99.6%
Taylor expanded in x around 0
/-lowering-/.f64N/A
Simplified96.7%
if 2.35e11 < x Initial program 89.1%
Simplified89.2%
Taylor expanded in z around inf
*-commutativeN/A
associate-/l*N/A
unpow2N/A
associate-*l*N/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
distribute-lft-inN/A
metadata-evalN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6499.5%
Simplified99.5%
Taylor expanded in x around 0
unpow2N/A
associate-*l*N/A
associate-*r/N/A
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f6437.4%
Simplified37.4%
Final simplification70.1%
(FPCore (x y z)
:precision binary64
(if (<= z -12.0)
(/ (* 0.0007936500793651 (* z z)) x)
(if (<= z 9.2e-33)
(/ (+ 0.083333333333333 (* z -0.0027777777777778)) x)
(* y (/ (* z z) x)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -12.0) {
tmp = (0.0007936500793651 * (z * z)) / x;
} else if (z <= 9.2e-33) {
tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
} else {
tmp = 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 (z <= (-12.0d0)) then
tmp = (0.0007936500793651d0 * (z * z)) / x
else if (z <= 9.2d-33) then
tmp = (0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x
else
tmp = y * ((z * z) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -12.0) {
tmp = (0.0007936500793651 * (z * z)) / x;
} else if (z <= 9.2e-33) {
tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
} else {
tmp = y * ((z * z) / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -12.0: tmp = (0.0007936500793651 * (z * z)) / x elif z <= 9.2e-33: tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x else: tmp = y * ((z * z) / x) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -12.0) tmp = Float64(Float64(0.0007936500793651 * Float64(z * z)) / x); elseif (z <= 9.2e-33) tmp = Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x); else tmp = Float64(y * Float64(Float64(z * z) / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -12.0) tmp = (0.0007936500793651 * (z * z)) / x; elseif (z <= 9.2e-33) tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x; else tmp = y * ((z * z) / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -12.0], N[(N[(0.0007936500793651 * N[(z * z), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[z, 9.2e-33], N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(y * N[(N[(z * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -12:\\
\;\;\;\;\frac{0.0007936500793651 \cdot \left(z \cdot z\right)}{x}\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{-33}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z \cdot z}{x}\\
\end{array}
\end{array}
if z < -12Initial program 89.2%
Taylor expanded in y around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6463.1%
Simplified63.1%
Taylor expanded in z around inf
*-commutativeN/A
associate-*l/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6444.1%
Simplified44.1%
if -12 < z < 9.19999999999999942e-33Initial program 99.4%
Taylor expanded in y around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6493.5%
Simplified93.5%
Taylor expanded in x around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6449.3%
Simplified49.3%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6449.3%
Simplified49.3%
if 9.19999999999999942e-33 < z Initial program 92.9%
Simplified92.9%
Taylor expanded in y around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6457.7%
Simplified57.7%
div-invN/A
associate-*l*N/A
associate-*r*N/A
div-invN/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6458.9%
Applied egg-rr58.9%
Final simplification51.1%
(FPCore (x y z) :precision binary64 (if (<= z -10.0) (/ (* 0.0007936500793651 (* z z)) x) (if (<= z 3.2e-37) (/ 0.083333333333333 x) (* y (/ (* z z) x)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -10.0) {
tmp = (0.0007936500793651 * (z * z)) / x;
} else if (z <= 3.2e-37) {
tmp = 0.083333333333333 / x;
} else {
tmp = 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 (z <= (-10.0d0)) then
tmp = (0.0007936500793651d0 * (z * z)) / x
else if (z <= 3.2d-37) then
tmp = 0.083333333333333d0 / x
else
tmp = y * ((z * z) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -10.0) {
tmp = (0.0007936500793651 * (z * z)) / x;
} else if (z <= 3.2e-37) {
tmp = 0.083333333333333 / x;
} else {
tmp = y * ((z * z) / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -10.0: tmp = (0.0007936500793651 * (z * z)) / x elif z <= 3.2e-37: tmp = 0.083333333333333 / x else: tmp = y * ((z * z) / x) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -10.0) tmp = Float64(Float64(0.0007936500793651 * Float64(z * z)) / x); elseif (z <= 3.2e-37) tmp = Float64(0.083333333333333 / x); else tmp = Float64(y * Float64(Float64(z * z) / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -10.0) tmp = (0.0007936500793651 * (z * z)) / x; elseif (z <= 3.2e-37) tmp = 0.083333333333333 / x; else tmp = y * ((z * z) / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -10.0], N[(N[(0.0007936500793651 * N[(z * z), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[z, 3.2e-37], N[(0.083333333333333 / x), $MachinePrecision], N[(y * N[(N[(z * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -10:\\
\;\;\;\;\frac{0.0007936500793651 \cdot \left(z \cdot z\right)}{x}\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{-37}:\\
\;\;\;\;\frac{0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z \cdot z}{x}\\
\end{array}
\end{array}
if z < -10Initial program 89.2%
Taylor expanded in y around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6463.1%
Simplified63.1%
Taylor expanded in z around inf
*-commutativeN/A
associate-*l/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6444.1%
Simplified44.1%
if -10 < z < 3.1999999999999999e-37Initial program 99.4%
Taylor expanded in z around 0
/-lowering-/.f6493.1%
Simplified93.1%
Taylor expanded in x around 0
/-lowering-/.f6448.9%
Simplified48.9%
if 3.1999999999999999e-37 < z Initial program 92.9%
Simplified92.9%
Taylor expanded in y around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6457.7%
Simplified57.7%
div-invN/A
associate-*l*N/A
associate-*r*N/A
div-invN/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6458.9%
Applied egg-rr58.9%
Final simplification50.9%
(FPCore (x y z) :precision binary64 (let* ((t_0 (* y (/ (* z z) x)))) (if (<= z -6.5e+17) t_0 (if (<= z 1e-33) (/ 0.083333333333333 x) t_0))))
double code(double x, double y, double z) {
double t_0 = y * ((z * z) / x);
double tmp;
if (z <= -6.5e+17) {
tmp = t_0;
} else if (z <= 1e-33) {
tmp = 0.083333333333333 / 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 = y * ((z * z) / x)
if (z <= (-6.5d+17)) then
tmp = t_0
else if (z <= 1d-33) then
tmp = 0.083333333333333d0 / x
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = y * ((z * z) / x);
double tmp;
if (z <= -6.5e+17) {
tmp = t_0;
} else if (z <= 1e-33) {
tmp = 0.083333333333333 / x;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = y * ((z * z) / x) tmp = 0 if z <= -6.5e+17: tmp = t_0 elif z <= 1e-33: tmp = 0.083333333333333 / x else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(y * Float64(Float64(z * z) / x)) tmp = 0.0 if (z <= -6.5e+17) tmp = t_0; elseif (z <= 1e-33) tmp = Float64(0.083333333333333 / x); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = y * ((z * z) / x); tmp = 0.0; if (z <= -6.5e+17) tmp = t_0; elseif (z <= 1e-33) tmp = 0.083333333333333 / x; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(y * N[(N[(z * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.5e+17], t$95$0, If[LessEqual[z, 1e-33], N[(0.083333333333333 / x), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \frac{z \cdot z}{x}\\
\mathbf{if}\;z \leq -6.5 \cdot 10^{+17}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 10^{-33}:\\
\;\;\;\;\frac{0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -6.5e17 or 1.0000000000000001e-33 < z Initial program 90.8%
Simplified90.8%
Taylor expanded in y around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6454.4%
Simplified54.4%
div-invN/A
associate-*l*N/A
associate-*r*N/A
div-invN/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6455.2%
Applied egg-rr55.2%
if -6.5e17 < z < 1.0000000000000001e-33Initial program 99.4%
Taylor expanded in z around 0
/-lowering-/.f6490.6%
Simplified90.6%
Taylor expanded in x around 0
/-lowering-/.f6445.8%
Simplified45.8%
Final simplification50.7%
(FPCore (x y z) :precision binary64 (let* ((t_0 (* (* z y) (/ z x)))) (if (<= z -6.5e+17) t_0 (if (<= z 1.75e-35) (/ 0.083333333333333 x) t_0))))
double code(double x, double y, double z) {
double t_0 = (z * y) * (z / x);
double tmp;
if (z <= -6.5e+17) {
tmp = t_0;
} else if (z <= 1.75e-35) {
tmp = 0.083333333333333 / 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 = (z * y) * (z / x)
if (z <= (-6.5d+17)) then
tmp = t_0
else if (z <= 1.75d-35) then
tmp = 0.083333333333333d0 / x
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (z * y) * (z / x);
double tmp;
if (z <= -6.5e+17) {
tmp = t_0;
} else if (z <= 1.75e-35) {
tmp = 0.083333333333333 / x;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = (z * y) * (z / x) tmp = 0 if z <= -6.5e+17: tmp = t_0 elif z <= 1.75e-35: tmp = 0.083333333333333 / x else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(z * y) * Float64(z / x)) tmp = 0.0 if (z <= -6.5e+17) tmp = t_0; elseif (z <= 1.75e-35) tmp = Float64(0.083333333333333 / x); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (z * y) * (z / x); tmp = 0.0; if (z <= -6.5e+17) tmp = t_0; elseif (z <= 1.75e-35) tmp = 0.083333333333333 / x; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(z * y), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.5e+17], t$95$0, If[LessEqual[z, 1.75e-35], N[(0.083333333333333 / x), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(z \cdot y\right) \cdot \frac{z}{x}\\
\mathbf{if}\;z \leq -6.5 \cdot 10^{+17}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{-35}:\\
\;\;\;\;\frac{0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -6.5e17 or 1.74999999999999998e-35 < z Initial program 90.8%
Simplified90.8%
Taylor expanded in y around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6454.4%
Simplified54.4%
associate-*r*N/A
associate-/l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f6451.4%
Applied egg-rr51.4%
if -6.5e17 < z < 1.74999999999999998e-35Initial program 99.4%
Taylor expanded in z around 0
/-lowering-/.f6490.6%
Simplified90.6%
Taylor expanded in x around 0
/-lowering-/.f6445.8%
Simplified45.8%
(FPCore (x y z) :precision binary64 (let* ((t_0 (* y (/ 0.083333333333333 (* x y))))) (if (<= z -2.05e+101) t_0 (if (<= z 7.5e-58) (/ 0.083333333333333 x) t_0))))
double code(double x, double y, double z) {
double t_0 = y * (0.083333333333333 / (x * y));
double tmp;
if (z <= -2.05e+101) {
tmp = t_0;
} else if (z <= 7.5e-58) {
tmp = 0.083333333333333 / 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 = y * (0.083333333333333d0 / (x * y))
if (z <= (-2.05d+101)) then
tmp = t_0
else if (z <= 7.5d-58) then
tmp = 0.083333333333333d0 / x
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = y * (0.083333333333333 / (x * y));
double tmp;
if (z <= -2.05e+101) {
tmp = t_0;
} else if (z <= 7.5e-58) {
tmp = 0.083333333333333 / x;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = y * (0.083333333333333 / (x * y)) tmp = 0 if z <= -2.05e+101: tmp = t_0 elif z <= 7.5e-58: tmp = 0.083333333333333 / x else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(y * Float64(0.083333333333333 / Float64(x * y))) tmp = 0.0 if (z <= -2.05e+101) tmp = t_0; elseif (z <= 7.5e-58) tmp = Float64(0.083333333333333 / x); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = y * (0.083333333333333 / (x * y)); tmp = 0.0; if (z <= -2.05e+101) tmp = t_0; elseif (z <= 7.5e-58) tmp = 0.083333333333333 / x; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(y * N[(0.083333333333333 / N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.05e+101], t$95$0, If[LessEqual[z, 7.5e-58], N[(0.083333333333333 / x), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \frac{0.083333333333333}{x \cdot y}\\
\mathbf{if}\;z \leq -2.05 \cdot 10^{+101}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{-58}:\\
\;\;\;\;\frac{0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -2.05e101 or 7.50000000000000002e-58 < z Initial program 90.1%
Taylor expanded in y around inf
Simplified79.4%
Taylor expanded in y around inf
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6457.7%
Simplified57.7%
Taylor expanded in y around 0
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6414.8%
Simplified14.8%
if -2.05e101 < z < 7.50000000000000002e-58Initial program 99.4%
Taylor expanded in z around 0
/-lowering-/.f6483.9%
Simplified83.9%
Taylor expanded in x around 0
/-lowering-/.f6440.6%
Simplified40.6%
Final simplification28.1%
(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 94.9%
Taylor expanded in z around 0
/-lowering-/.f6453.1%
Simplified53.1%
Taylor expanded in x around 0
/-lowering-/.f6423.8%
Simplified23.8%
(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 2024191
(FPCore (x y z)
:name "Numeric.SpecFunctions:$slogFactorial from math-functions-0.1.5.2, B"
:precision binary64
:alt
(! :herbie-platform default (+ (+ (+ (* (- x 1/2) (log x)) (- 91893853320467/100000000000000 x)) (/ 83333333333333/1000000000000000 x)) (* (/ z x) (- (* z (+ y 7936500793651/10000000000000000)) 13888888888889/5000000000000000))))
(+ (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467) (/ (+ (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z) 0.083333333333333) x)))