
(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
(let* ((t_0 (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)))
(if (<= x 8e-47)
(+
t_0
(+
(* (fma z (+ 0.0007936500793651 y) -0.0027777777777778) (/ z x))
(* 0.083333333333333 (/ 1.0 x))))
(+
t_0
(+
(*
z
(+
(* z (+ (* 0.0007936500793651 (/ 1.0 x)) (/ y x)))
(* 0.0027777777777778 (/ -1.0 x))))
(sqrt (/ 0.0069444444444443885 (pow x 2.0))))))))
double code(double x, double y, double z) {
double t_0 = (((x - 0.5) * log(x)) - x) + 0.91893853320467;
double tmp;
if (x <= 8e-47) {
tmp = t_0 + ((fma(z, (0.0007936500793651 + y), -0.0027777777777778) * (z / x)) + (0.083333333333333 * (1.0 / x)));
} else {
tmp = t_0 + ((z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + sqrt((0.0069444444444443885 / pow(x, 2.0))));
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) tmp = 0.0 if (x <= 8e-47) tmp = Float64(t_0 + Float64(Float64(fma(z, Float64(0.0007936500793651 + y), -0.0027777777777778) * Float64(z / x)) + Float64(0.083333333333333 * Float64(1.0 / x)))); else tmp = Float64(t_0 + Float64(Float64(z * Float64(Float64(z * Float64(Float64(0.0007936500793651 * Float64(1.0 / x)) + Float64(y / x))) + Float64(0.0027777777777778 * Float64(-1.0 / x)))) + sqrt(Float64(0.0069444444444443885 / (x ^ 2.0))))); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision]}, If[LessEqual[x, 8e-47], N[(t$95$0 + N[(N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision] + -0.0027777777777778), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(z * N[(N[(z * N[(N[(0.0007936500793651 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.0027777777777778 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[(0.0069444444444443885 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\\
\mathbf{if}\;x \leq 8 \cdot 10^{-47}:\\
\;\;\;\;t\_0 + \left(\mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right) \cdot \frac{z}{x} + 0.083333333333333 \cdot \frac{1}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 + \left(z \cdot \left(z \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) + 0.0027777777777778 \cdot \frac{-1}{x}\right) + \sqrt{\frac{0.0069444444444443885}{{x}^{2}}}\right)\\
\end{array}
\end{array}
if x < 7.9999999999999998e-47Initial program 99.6%
Taylor expanded in z around 0 91.4%
Taylor expanded in x around 0 97.9%
Taylor expanded in x around 0 99.7%
fma-neg99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/l*99.7%
Simplified99.7%
if 7.9999999999999998e-47 < x Initial program 89.0%
Taylor expanded in z around 0 99.6%
div-inv99.6%
add-sqr-sqrt99.6%
sqrt-unprod99.6%
frac-times99.6%
metadata-eval99.6%
pow299.6%
Applied egg-rr99.6%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)))
(if (<= x 8e-47)
(+
t_0
(+
(* (fma z (+ 0.0007936500793651 y) -0.0027777777777778) (/ z x))
(* 0.083333333333333 (/ 1.0 x))))
(+
t_0
(+
(*
z
(+
(* z (+ (* 0.0007936500793651 (/ 1.0 x)) (/ y x)))
(* 0.0027777777777778 (/ -1.0 x))))
(/ 1.0 (/ x 0.083333333333333)))))))
double code(double x, double y, double z) {
double t_0 = (((x - 0.5) * log(x)) - x) + 0.91893853320467;
double tmp;
if (x <= 8e-47) {
tmp = t_0 + ((fma(z, (0.0007936500793651 + y), -0.0027777777777778) * (z / x)) + (0.083333333333333 * (1.0 / x)));
} else {
tmp = t_0 + ((z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (1.0 / (x / 0.083333333333333)));
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) tmp = 0.0 if (x <= 8e-47) tmp = Float64(t_0 + Float64(Float64(fma(z, Float64(0.0007936500793651 + y), -0.0027777777777778) * Float64(z / x)) + Float64(0.083333333333333 * Float64(1.0 / x)))); else tmp = Float64(t_0 + Float64(Float64(z * Float64(Float64(z * Float64(Float64(0.0007936500793651 * Float64(1.0 / x)) + Float64(y / x))) + Float64(0.0027777777777778 * Float64(-1.0 / x)))) + Float64(1.0 / Float64(x / 0.083333333333333)))); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision]}, If[LessEqual[x, 8e-47], N[(t$95$0 + N[(N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision] + -0.0027777777777778), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(z * N[(N[(z * N[(N[(0.0007936500793651 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.0027777777777778 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(x / 0.083333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\\
\mathbf{if}\;x \leq 8 \cdot 10^{-47}:\\
\;\;\;\;t\_0 + \left(\mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right) \cdot \frac{z}{x} + 0.083333333333333 \cdot \frac{1}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 + \left(z \cdot \left(z \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) + 0.0027777777777778 \cdot \frac{-1}{x}\right) + \frac{1}{\frac{x}{0.083333333333333}}\right)\\
\end{array}
\end{array}
if x < 7.9999999999999998e-47Initial program 99.6%
Taylor expanded in z around 0 91.4%
Taylor expanded in x around 0 97.9%
Taylor expanded in x around 0 99.7%
fma-neg99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/l*99.7%
Simplified99.7%
if 7.9999999999999998e-47 < x Initial program 89.0%
Taylor expanded in z around 0 99.6%
div-inv99.6%
clear-num99.6%
Applied egg-rr99.6%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(if (<= x 8e-47)
(+
(* x (+ (log x) -1.0))
(/
(+
0.083333333333333
(+ (* (+ 0.0007936500793651 y) (pow z 2.0)) (* z -0.0027777777777778)))
x))
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(+
(*
z
(+
(* z (+ (* 0.0007936500793651 (/ 1.0 x)) (/ y x)))
(* 0.0027777777777778 (/ -1.0 x))))
(/ 1.0 (/ x 0.083333333333333))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 8e-47) {
tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 + (((0.0007936500793651 + y) * pow(z, 2.0)) + (z * -0.0027777777777778))) / x);
} else {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (1.0 / (x / 0.083333333333333)));
}
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 <= 8d-47) then
tmp = (x * (log(x) + (-1.0d0))) + ((0.083333333333333d0 + (((0.0007936500793651d0 + y) * (z ** 2.0d0)) + (z * (-0.0027777777777778d0)))) / x)
else
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((z * ((z * ((0.0007936500793651d0 * (1.0d0 / x)) + (y / x))) + (0.0027777777777778d0 * ((-1.0d0) / x)))) + (1.0d0 / (x / 0.083333333333333d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 8e-47) {
tmp = (x * (Math.log(x) + -1.0)) + ((0.083333333333333 + (((0.0007936500793651 + y) * Math.pow(z, 2.0)) + (z * -0.0027777777777778))) / x);
} else {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (1.0 / (x / 0.083333333333333)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 8e-47: tmp = (x * (math.log(x) + -1.0)) + ((0.083333333333333 + (((0.0007936500793651 + y) * math.pow(z, 2.0)) + (z * -0.0027777777777778))) / x) else: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (1.0 / (x / 0.083333333333333))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 8e-47) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(0.083333333333333 + Float64(Float64(Float64(0.0007936500793651 + y) * (z ^ 2.0)) + Float64(z * -0.0027777777777778))) / x)); else tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(z * Float64(Float64(z * Float64(Float64(0.0007936500793651 * Float64(1.0 / x)) + Float64(y / x))) + Float64(0.0027777777777778 * Float64(-1.0 / x)))) + Float64(1.0 / Float64(x / 0.083333333333333)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 8e-47) tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 + (((0.0007936500793651 + y) * (z ^ 2.0)) + (z * -0.0027777777777778))) / x); else tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (1.0 / (x / 0.083333333333333))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 8e-47], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision] + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(z * N[(N[(z * N[(N[(0.0007936500793651 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.0027777777777778 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(x / 0.083333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 8 \cdot 10^{-47}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + \left(\left(0.0007936500793651 + y\right) \cdot {z}^{2} + z \cdot -0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(z \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) + 0.0027777777777778 \cdot \frac{-1}{x}\right) + \frac{1}{\frac{x}{0.083333333333333}}\right)\\
\end{array}
\end{array}
if x < 7.9999999999999998e-47Initial program 99.6%
Taylor expanded in x around inf 99.6%
sub-neg99.6%
mul-1-neg99.6%
log-rec99.6%
remove-double-neg99.6%
metadata-eval99.6%
+-commutative99.6%
Simplified99.6%
*-commutative99.6%
sub-neg99.6%
distribute-lft-in99.6%
+-commutative99.6%
*-commutative99.6%
associate-*l*99.7%
unpow299.7%
*-commutative99.7%
metadata-eval99.7%
Applied egg-rr99.7%
if 7.9999999999999998e-47 < x Initial program 89.0%
Taylor expanded in z around 0 99.6%
div-inv99.6%
clear-num99.6%
Applied egg-rr99.6%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)))
(if (<= x 0.0095)
(+
t_0
(+
(/ 1.0 (/ x 0.083333333333333))
(/ (* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)) x)))
(+
t_0
(+
(* 0.083333333333333 (/ 1.0 x))
(*
z
(+
(* z (+ (* 0.0007936500793651 (/ 1.0 x)) (/ y x)))
(* 0.0027777777777778 (/ -1.0 x)))))))))
double code(double x, double y, double z) {
double t_0 = (((x - 0.5) * log(x)) - x) + 0.91893853320467;
double tmp;
if (x <= 0.0095) {
tmp = t_0 + ((1.0 / (x / 0.083333333333333)) + ((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x));
} else {
tmp = t_0 + ((0.083333333333333 * (1.0 / x)) + (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / 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 - 0.5d0) * log(x)) - x) + 0.91893853320467d0
if (x <= 0.0095d0) then
tmp = t_0 + ((1.0d0 / (x / 0.083333333333333d0)) + ((z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0)) / x))
else
tmp = t_0 + ((0.083333333333333d0 * (1.0d0 / x)) + (z * ((z * ((0.0007936500793651d0 * (1.0d0 / x)) + (y / x))) + (0.0027777777777778d0 * ((-1.0d0) / x)))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (((x - 0.5) * Math.log(x)) - x) + 0.91893853320467;
double tmp;
if (x <= 0.0095) {
tmp = t_0 + ((1.0 / (x / 0.083333333333333)) + ((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x));
} else {
tmp = t_0 + ((0.083333333333333 * (1.0 / x)) + (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))));
}
return tmp;
}
def code(x, y, z): t_0 = (((x - 0.5) * math.log(x)) - x) + 0.91893853320467 tmp = 0 if x <= 0.0095: tmp = t_0 + ((1.0 / (x / 0.083333333333333)) + ((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x)) else: tmp = t_0 + ((0.083333333333333 * (1.0 / x)) + (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x))))) return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) tmp = 0.0 if (x <= 0.0095) tmp = Float64(t_0 + Float64(Float64(1.0 / Float64(x / 0.083333333333333)) + Float64(Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778)) / x))); else tmp = Float64(t_0 + Float64(Float64(0.083333333333333 * Float64(1.0 / x)) + Float64(z * Float64(Float64(z * Float64(Float64(0.0007936500793651 * Float64(1.0 / x)) + Float64(y / x))) + Float64(0.0027777777777778 * Float64(-1.0 / x)))))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (((x - 0.5) * log(x)) - x) + 0.91893853320467; tmp = 0.0; if (x <= 0.0095) tmp = t_0 + ((1.0 / (x / 0.083333333333333)) + ((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x)); else tmp = t_0 + ((0.083333333333333 * (1.0 / x)) + (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x))))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision]}, If[LessEqual[x, 0.0095], N[(t$95$0 + N[(N[(1.0 / N[(x / 0.083333333333333), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(z * N[(N[(z * N[(N[(0.0007936500793651 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.0027777777777778 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\\
\mathbf{if}\;x \leq 0.0095:\\
\;\;\;\;t\_0 + \left(\frac{1}{\frac{x}{0.083333333333333}} + \frac{z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 + \left(0.083333333333333 \cdot \frac{1}{x} + z \cdot \left(z \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) + 0.0027777777777778 \cdot \frac{-1}{x}\right)\right)\\
\end{array}
\end{array}
if x < 0.00949999999999999976Initial program 99.6%
Taylor expanded in z around 0 93.1%
Taylor expanded in x around 0 99.7%
div-inv93.1%
clear-num93.1%
Applied egg-rr99.7%
if 0.00949999999999999976 < x Initial program 86.7%
Taylor expanded in z around 0 99.6%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))))
(if (<= t_0 (- INFINITY))
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(+ (* 0.083333333333333 (/ 1.0 x)) (* z (* z (/ y x)))))
(+ (* x (+ (log x) -1.0)) (/ t_0 x)))))
double code(double x, double y, double z) {
double t_0 = 0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778));
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((0.083333333333333 * (1.0 / x)) + (z * (z * (y / x))));
} else {
tmp = (x * (log(x) + -1.0)) + (t_0 / x);
}
return tmp;
}
public static double code(double x, double y, double z) {
double t_0 = 0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778));
double tmp;
if (t_0 <= -Double.POSITIVE_INFINITY) {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((0.083333333333333 * (1.0 / x)) + (z * (z * (y / x))));
} else {
tmp = (x * (Math.log(x) + -1.0)) + (t_0 / x);
}
return tmp;
}
def code(x, y, z): t_0 = 0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) tmp = 0 if t_0 <= -math.inf: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((0.083333333333333 * (1.0 / x)) + (z * (z * (y / x)))) else: tmp = (x * (math.log(x) + -1.0)) + (t_0 / x) return tmp
function code(x, y, z) t_0 = Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(0.083333333333333 * Float64(1.0 / x)) + Float64(z * Float64(z * Float64(y / x))))); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(t_0 / x)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)); tmp = 0.0; if (t_0 <= -Inf) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((0.083333333333333 * (1.0 / x)) + (z * (z * (y / x)))); else tmp = (x * (log(x) + -1.0)) + (t_0 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(z * N[(z * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(0.083333333333333 \cdot \frac{1}{x} + z \cdot \left(z \cdot \frac{y}{x}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{t\_0}{x}\\
\end{array}
\end{array}
if (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) < -inf.0Initial program 72.0%
Taylor expanded in z around 0 99.9%
Taylor expanded in x around 0 92.8%
Taylor expanded in z around inf 85.0%
unpow285.0%
associate-*l*99.9%
distribute-rgt-in75.6%
associate-*r/75.6%
metadata-eval75.6%
associate-*l/75.6%
associate-*r/72.9%
associate-*l/65.8%
associate-/l*72.9%
distribute-rgt-out99.9%
Simplified99.9%
Taylor expanded in y around inf 92.8%
*-commutative92.8%
associate-/l*99.9%
Simplified99.9%
if -inf.0 < (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) Initial program 97.0%
Taylor expanded in x around inf 95.5%
sub-neg95.5%
mul-1-neg95.5%
log-rec95.5%
remove-double-neg95.5%
metadata-eval95.5%
+-commutative95.5%
Simplified95.5%
Final simplification96.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)))
(if (<= x 2.45e-46)
(+
t_0
(+
(/ 1.0 (/ x 0.083333333333333))
(/ (* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)) x)))
(+
t_0
(+
(* 0.083333333333333 (/ 1.0 x))
(* z (/ (+ 0.0007936500793651 y) (/ x z))))))))
double code(double x, double y, double z) {
double t_0 = (((x - 0.5) * log(x)) - x) + 0.91893853320467;
double tmp;
if (x <= 2.45e-46) {
tmp = t_0 + ((1.0 / (x / 0.083333333333333)) + ((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x));
} else {
tmp = t_0 + ((0.083333333333333 * (1.0 / x)) + (z * ((0.0007936500793651 + y) / (x / z))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0
if (x <= 2.45d-46) then
tmp = t_0 + ((1.0d0 / (x / 0.083333333333333d0)) + ((z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0)) / x))
else
tmp = t_0 + ((0.083333333333333d0 * (1.0d0 / x)) + (z * ((0.0007936500793651d0 + y) / (x / z))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (((x - 0.5) * Math.log(x)) - x) + 0.91893853320467;
double tmp;
if (x <= 2.45e-46) {
tmp = t_0 + ((1.0 / (x / 0.083333333333333)) + ((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x));
} else {
tmp = t_0 + ((0.083333333333333 * (1.0 / x)) + (z * ((0.0007936500793651 + y) / (x / z))));
}
return tmp;
}
def code(x, y, z): t_0 = (((x - 0.5) * math.log(x)) - x) + 0.91893853320467 tmp = 0 if x <= 2.45e-46: tmp = t_0 + ((1.0 / (x / 0.083333333333333)) + ((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x)) else: tmp = t_0 + ((0.083333333333333 * (1.0 / x)) + (z * ((0.0007936500793651 + y) / (x / z)))) return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) tmp = 0.0 if (x <= 2.45e-46) tmp = Float64(t_0 + Float64(Float64(1.0 / Float64(x / 0.083333333333333)) + Float64(Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778)) / x))); else tmp = Float64(t_0 + Float64(Float64(0.083333333333333 * Float64(1.0 / x)) + Float64(z * Float64(Float64(0.0007936500793651 + y) / Float64(x / z))))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (((x - 0.5) * log(x)) - x) + 0.91893853320467; tmp = 0.0; if (x <= 2.45e-46) tmp = t_0 + ((1.0 / (x / 0.083333333333333)) + ((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x)); else tmp = t_0 + ((0.083333333333333 * (1.0 / x)) + (z * ((0.0007936500793651 + y) / (x / z)))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision]}, If[LessEqual[x, 2.45e-46], N[(t$95$0 + N[(N[(1.0 / N[(x / 0.083333333333333), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(z * N[(N[(0.0007936500793651 + y), $MachinePrecision] / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\\
\mathbf{if}\;x \leq 2.45 \cdot 10^{-46}:\\
\;\;\;\;t\_0 + \left(\frac{1}{\frac{x}{0.083333333333333}} + \frac{z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 + \left(0.083333333333333 \cdot \frac{1}{x} + z \cdot \frac{0.0007936500793651 + y}{\frac{x}{z}}\right)\\
\end{array}
\end{array}
if x < 2.45e-46Initial program 99.6%
Taylor expanded in z around 0 91.5%
Taylor expanded in x around 0 99.6%
div-inv91.5%
clear-num91.5%
Applied egg-rr99.7%
if 2.45e-46 < x Initial program 89.0%
Taylor expanded in z around 0 99.6%
Taylor expanded in x around 0 96.6%
Taylor expanded in z around inf 92.8%
unpow292.8%
associate-*l*99.6%
distribute-rgt-in99.6%
associate-*r/99.6%
metadata-eval99.6%
associate-*l/99.6%
associate-*r/99.6%
associate-*l/96.6%
associate-/l*98.9%
distribute-rgt-out99.5%
Simplified99.5%
*-commutative99.5%
clear-num99.5%
un-div-inv99.6%
Applied egg-rr99.6%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 0.083333333333333 (/ 1.0 x))))
(if (<= x 8e-47)
(+
(+ 0.91893853320467 (* (log x) -0.5))
(+
t_0
(/ (* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)) x)))
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(+ t_0 (* z (/ (+ 0.0007936500793651 y) (/ x z))))))))
double code(double x, double y, double z) {
double t_0 = 0.083333333333333 * (1.0 / x);
double tmp;
if (x <= 8e-47) {
tmp = (0.91893853320467 + (log(x) * -0.5)) + (t_0 + ((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x));
} else {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (t_0 + (z * ((0.0007936500793651 + y) / (x / z))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = 0.083333333333333d0 * (1.0d0 / x)
if (x <= 8d-47) then
tmp = (0.91893853320467d0 + (log(x) * (-0.5d0))) + (t_0 + ((z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0)) / x))
else
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (t_0 + (z * ((0.0007936500793651d0 + y) / (x / z))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 0.083333333333333 * (1.0 / x);
double tmp;
if (x <= 8e-47) {
tmp = (0.91893853320467 + (Math.log(x) * -0.5)) + (t_0 + ((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x));
} else {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (t_0 + (z * ((0.0007936500793651 + y) / (x / z))));
}
return tmp;
}
def code(x, y, z): t_0 = 0.083333333333333 * (1.0 / x) tmp = 0 if x <= 8e-47: tmp = (0.91893853320467 + (math.log(x) * -0.5)) + (t_0 + ((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x)) else: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (t_0 + (z * ((0.0007936500793651 + y) / (x / z)))) return tmp
function code(x, y, z) t_0 = Float64(0.083333333333333 * Float64(1.0 / x)) tmp = 0.0 if (x <= 8e-47) tmp = Float64(Float64(0.91893853320467 + Float64(log(x) * -0.5)) + Float64(t_0 + Float64(Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778)) / x))); else tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(t_0 + Float64(z * Float64(Float64(0.0007936500793651 + y) / Float64(x / z))))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 0.083333333333333 * (1.0 / x); tmp = 0.0; if (x <= 8e-47) tmp = (0.91893853320467 + (log(x) * -0.5)) + (t_0 + ((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x)); else tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (t_0 + (z * ((0.0007936500793651 + y) / (x / z)))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 8e-47], N[(N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 + N[(N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(t$95$0 + N[(z * N[(N[(0.0007936500793651 + y), $MachinePrecision] / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.083333333333333 \cdot \frac{1}{x}\\
\mathbf{if}\;x \leq 8 \cdot 10^{-47}:\\
\;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + \left(t\_0 + \frac{z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(t\_0 + z \cdot \frac{0.0007936500793651 + y}{\frac{x}{z}}\right)\\
\end{array}
\end{array}
if x < 7.9999999999999998e-47Initial program 99.6%
Taylor expanded in z around 0 91.4%
Taylor expanded in x around 0 99.7%
Taylor expanded in x around 0 99.7%
+-commutative99.7%
Simplified99.7%
if 7.9999999999999998e-47 < x Initial program 89.0%
Taylor expanded in z around 0 99.6%
Taylor expanded in x around 0 96.6%
Taylor expanded in z around inf 92.9%
unpow292.9%
associate-*l*99.6%
distribute-rgt-in99.6%
associate-*r/99.6%
metadata-eval99.6%
associate-*l/99.6%
associate-*r/99.6%
associate-*l/96.6%
associate-/l*98.9%
distribute-rgt-out99.5%
Simplified99.5%
*-commutative99.5%
clear-num99.5%
un-div-inv99.6%
Applied egg-rr99.6%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(if (<= x 5e-198)
(+
(+ 0.91893853320467 (* (log x) -0.5))
(+
(* 0.083333333333333 (/ 1.0 x))
(/ (* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)) x)))
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(+
(/ 1.0 (/ x 0.083333333333333))
(* z (* (+ 0.0007936500793651 y) (/ z x)))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 5e-198) {
tmp = (0.91893853320467 + (log(x) * -0.5)) + ((0.083333333333333 * (1.0 / x)) + ((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x));
} else {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((1.0 / (x / 0.083333333333333)) + (z * ((0.0007936500793651 + y) * (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 <= 5d-198) then
tmp = (0.91893853320467d0 + (log(x) * (-0.5d0))) + ((0.083333333333333d0 * (1.0d0 / x)) + ((z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0)) / x))
else
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((1.0d0 / (x / 0.083333333333333d0)) + (z * ((0.0007936500793651d0 + y) * (z / x))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 5e-198) {
tmp = (0.91893853320467 + (Math.log(x) * -0.5)) + ((0.083333333333333 * (1.0 / x)) + ((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x));
} else {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((1.0 / (x / 0.083333333333333)) + (z * ((0.0007936500793651 + y) * (z / x))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 5e-198: tmp = (0.91893853320467 + (math.log(x) * -0.5)) + ((0.083333333333333 * (1.0 / x)) + ((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x)) else: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((1.0 / (x / 0.083333333333333)) + (z * ((0.0007936500793651 + y) * (z / x)))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 5e-198) tmp = Float64(Float64(0.91893853320467 + Float64(log(x) * -0.5)) + Float64(Float64(0.083333333333333 * Float64(1.0 / x)) + Float64(Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778)) / x))); else tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(1.0 / Float64(x / 0.083333333333333)) + Float64(z * Float64(Float64(0.0007936500793651 + y) * Float64(z / x))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 5e-198) tmp = (0.91893853320467 + (log(x) * -0.5)) + ((0.083333333333333 * (1.0 / x)) + ((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x)); else tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((1.0 / (x / 0.083333333333333)) + (z * ((0.0007936500793651 + y) * (z / x)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 5e-198], N[(N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(1.0 / N[(x / 0.083333333333333), $MachinePrecision]), $MachinePrecision] + N[(z * N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 5 \cdot 10^{-198}:\\
\;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + \left(0.083333333333333 \cdot \frac{1}{x} + \frac{z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{1}{\frac{x}{0.083333333333333}} + z \cdot \left(\left(0.0007936500793651 + y\right) \cdot \frac{z}{x}\right)\right)\\
\end{array}
\end{array}
if x < 4.9999999999999999e-198Initial program 99.6%
Taylor expanded in z around 0 88.9%
Taylor expanded in x around 0 99.7%
Taylor expanded in x around 0 99.7%
+-commutative99.7%
Simplified99.7%
if 4.9999999999999999e-198 < x Initial program 92.1%
Taylor expanded in z around 0 97.7%
Taylor expanded in x around 0 97.5%
Taylor expanded in z around inf 92.9%
unpow292.9%
associate-*l*97.7%
distribute-rgt-in94.9%
associate-*r/94.9%
metadata-eval94.9%
associate-*l/94.9%
associate-*r/94.9%
associate-*l/94.6%
associate-/l*94.8%
distribute-rgt-out99.6%
Simplified99.6%
div-inv97.7%
clear-num97.8%
Applied egg-rr99.6%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(if (<= x 2e-28)
(+
(+ 0.91893853320467 (* (log x) -0.5))
(+
(* 0.083333333333333 (/ 1.0 x))
(/ (* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)) x)))
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(+ (* z (* (+ 0.0007936500793651 y) (/ z x))) (/ 0.083333333333333 x)))))
double code(double x, double y, double z) {
double tmp;
if (x <= 2e-28) {
tmp = (0.91893853320467 + (log(x) * -0.5)) + ((0.083333333333333 * (1.0 / x)) + ((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x));
} else {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((z * ((0.0007936500793651 + y) * (z / 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 <= 2d-28) then
tmp = (0.91893853320467d0 + (log(x) * (-0.5d0))) + ((0.083333333333333d0 * (1.0d0 / x)) + ((z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0)) / x))
else
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((z * ((0.0007936500793651d0 + y) * (z / x))) + (0.083333333333333d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 2e-28) {
tmp = (0.91893853320467 + (Math.log(x) * -0.5)) + ((0.083333333333333 * (1.0 / x)) + ((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x));
} else {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((z * ((0.0007936500793651 + y) * (z / x))) + (0.083333333333333 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 2e-28: tmp = (0.91893853320467 + (math.log(x) * -0.5)) + ((0.083333333333333 * (1.0 / x)) + ((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x)) else: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((z * ((0.0007936500793651 + y) * (z / x))) + (0.083333333333333 / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 2e-28) tmp = Float64(Float64(0.91893853320467 + Float64(log(x) * -0.5)) + Float64(Float64(0.083333333333333 * Float64(1.0 / x)) + Float64(Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778)) / x))); else tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(z * Float64(Float64(0.0007936500793651 + y) * Float64(z / x))) + Float64(0.083333333333333 / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 2e-28) tmp = (0.91893853320467 + (log(x) * -0.5)) + ((0.083333333333333 * (1.0 / x)) + ((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x)); else tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((z * ((0.0007936500793651 + y) * (z / x))) + (0.083333333333333 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 2e-28], N[(N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(z * N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2 \cdot 10^{-28}:\\
\;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + \left(0.083333333333333 \cdot \frac{1}{x} + \frac{z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(\left(0.0007936500793651 + y\right) \cdot \frac{z}{x}\right) + \frac{0.083333333333333}{x}\right)\\
\end{array}
\end{array}
if x < 1.99999999999999994e-28Initial program 99.6%
Taylor expanded in z around 0 91.9%
Taylor expanded in x around 0 99.7%
Taylor expanded in x around 0 99.7%
+-commutative99.7%
Simplified99.7%
if 1.99999999999999994e-28 < x Initial program 88.5%
Taylor expanded in z around 0 99.6%
Taylor expanded in x around 0 96.5%
Taylor expanded in z around inf 92.5%
unpow292.5%
associate-*l*99.6%
distribute-rgt-in99.6%
associate-*r/99.6%
metadata-eval99.6%
associate-*l/99.6%
associate-*r/99.6%
associate-*l/96.5%
associate-/l*98.8%
distribute-rgt-out99.5%
Simplified99.5%
Taylor expanded in x around 0 99.5%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(if (<= z -7.8e+25)
(* (+ 0.0007936500793651 y) (/ (pow z 2.0) x))
(if (<= z 20500000000.0)
(+
(* x (+ (log x) -1.0))
(/
(+
0.083333333333333
(* z (- (* z 0.0007936500793651) 0.0027777777777778)))
x))
(* (pow z 2.0) (/ (+ 0.0007936500793651 y) x)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -7.8e+25) {
tmp = (0.0007936500793651 + y) * (pow(z, 2.0) / x);
} else if (z <= 20500000000.0) {
tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x);
} else {
tmp = pow(z, 2.0) * ((0.0007936500793651 + y) / 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 <= (-7.8d+25)) then
tmp = (0.0007936500793651d0 + y) * ((z ** 2.0d0) / x)
else if (z <= 20500000000.0d0) then
tmp = (x * (log(x) + (-1.0d0))) + ((0.083333333333333d0 + (z * ((z * 0.0007936500793651d0) - 0.0027777777777778d0))) / x)
else
tmp = (z ** 2.0d0) * ((0.0007936500793651d0 + y) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -7.8e+25) {
tmp = (0.0007936500793651 + y) * (Math.pow(z, 2.0) / x);
} else if (z <= 20500000000.0) {
tmp = (x * (Math.log(x) + -1.0)) + ((0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x);
} else {
tmp = Math.pow(z, 2.0) * ((0.0007936500793651 + y) / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -7.8e+25: tmp = (0.0007936500793651 + y) * (math.pow(z, 2.0) / x) elif z <= 20500000000.0: tmp = (x * (math.log(x) + -1.0)) + ((0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x) else: tmp = math.pow(z, 2.0) * ((0.0007936500793651 + y) / x) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -7.8e+25) tmp = Float64(Float64(0.0007936500793651 + y) * Float64((z ^ 2.0) / x)); elseif (z <= 20500000000.0) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * 0.0007936500793651) - 0.0027777777777778))) / x)); else tmp = Float64((z ^ 2.0) * Float64(Float64(0.0007936500793651 + y) / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -7.8e+25) tmp = (0.0007936500793651 + y) * ((z ^ 2.0) / x); elseif (z <= 20500000000.0) tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x); else tmp = (z ^ 2.0) * ((0.0007936500793651 + y) / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -7.8e+25], N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(N[Power[z, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 20500000000.0], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(N[(z * 0.0007936500793651), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[Power[z, 2.0], $MachinePrecision] * N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.8 \cdot 10^{+25}:\\
\;\;\;\;\left(0.0007936500793651 + y\right) \cdot \frac{{z}^{2}}{x}\\
\mathbf{elif}\;z \leq 20500000000:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot 0.0007936500793651 - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}\\
\end{array}
\end{array}
if z < -7.8000000000000004e25Initial program 89.1%
Taylor expanded in z around inf 89.1%
Taylor expanded in x around 0 84.4%
+-commutative84.4%
Simplified84.4%
Taylor expanded in x around 0 84.5%
*-commutative84.5%
associate-*r/87.5%
Simplified87.5%
if -7.8000000000000004e25 < z < 2.05e10Initial program 98.6%
Taylor expanded in x around inf 96.1%
sub-neg96.1%
mul-1-neg96.1%
log-rec96.1%
remove-double-neg96.1%
metadata-eval96.1%
+-commutative96.1%
Simplified96.1%
Taylor expanded in y around 0 87.8%
if 2.05e10 < z Initial program 86.2%
Taylor expanded in z around inf 86.2%
Taylor expanded in x around 0 78.1%
+-commutative78.1%
Simplified78.1%
Taylor expanded in x around 0 78.3%
associate-/l*79.8%
Simplified79.8%
Final simplification85.8%
(FPCore (x y z)
:precision binary64
(if (<= z -0.0295)
(* (+ 0.0007936500793651 y) (/ (pow z 2.0) x))
(if (<= z 105000000.0)
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/ 0.083333333333333 x))
(* (pow z 2.0) (/ (+ 0.0007936500793651 y) x)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.0295) {
tmp = (0.0007936500793651 + y) * (pow(z, 2.0) / x);
} else if (z <= 105000000.0) {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
} else {
tmp = pow(z, 2.0) * ((0.0007936500793651 + y) / 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 <= (-0.0295d0)) then
tmp = (0.0007936500793651d0 + y) * ((z ** 2.0d0) / x)
else if (z <= 105000000.0d0) then
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (0.083333333333333d0 / x)
else
tmp = (z ** 2.0d0) * ((0.0007936500793651d0 + y) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.0295) {
tmp = (0.0007936500793651 + y) * (Math.pow(z, 2.0) / x);
} else if (z <= 105000000.0) {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
} else {
tmp = Math.pow(z, 2.0) * ((0.0007936500793651 + y) / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.0295: tmp = (0.0007936500793651 + y) * (math.pow(z, 2.0) / x) elif z <= 105000000.0: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x) else: tmp = math.pow(z, 2.0) * ((0.0007936500793651 + y) / x) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.0295) tmp = Float64(Float64(0.0007936500793651 + y) * Float64((z ^ 2.0) / x)); elseif (z <= 105000000.0) tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(0.083333333333333 / x)); else tmp = Float64((z ^ 2.0) * Float64(Float64(0.0007936500793651 + y) / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.0295) tmp = (0.0007936500793651 + y) * ((z ^ 2.0) / x); elseif (z <= 105000000.0) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x); else tmp = (z ^ 2.0) * ((0.0007936500793651 + y) / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.0295], N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(N[Power[z, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 105000000.0], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], N[(N[Power[z, 2.0], $MachinePrecision] * N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.0295:\\
\;\;\;\;\left(0.0007936500793651 + y\right) \cdot \frac{{z}^{2}}{x}\\
\mathbf{elif}\;z \leq 105000000:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}\\
\end{array}
\end{array}
if z < -0.029499999999999998Initial program 88.9%
Taylor expanded in z around inf 88.9%
Taylor expanded in x around 0 81.9%
+-commutative81.9%
Simplified81.9%
Taylor expanded in x around 0 82.0%
*-commutative82.0%
associate-*r/84.7%
Simplified84.7%
if -0.029499999999999998 < z < 1.05e8Initial program 99.3%
Taylor expanded in z around 0 89.0%
if 1.05e8 < z Initial program 86.2%
Taylor expanded in z around inf 86.2%
Taylor expanded in x around 0 78.1%
+-commutative78.1%
Simplified78.1%
Taylor expanded in x around 0 78.3%
associate-/l*79.8%
Simplified79.8%
(FPCore (x y z)
:precision binary64
(if (<= z -0.057)
(* (+ 0.0007936500793651 y) (/ (pow z 2.0) x))
(if (<= z 35000000000.0)
(+
(* x (+ (log x) -1.0))
(/ (+ 0.083333333333333 (* z -0.0027777777777778)) x))
(* (pow z 2.0) (/ (+ 0.0007936500793651 y) x)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.057) {
tmp = (0.0007936500793651 + y) * (pow(z, 2.0) / x);
} else if (z <= 35000000000.0) {
tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * -0.0027777777777778)) / x);
} else {
tmp = pow(z, 2.0) * ((0.0007936500793651 + y) / 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 <= (-0.057d0)) then
tmp = (0.0007936500793651d0 + y) * ((z ** 2.0d0) / x)
else if (z <= 35000000000.0d0) then
tmp = (x * (log(x) + (-1.0d0))) + ((0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x)
else
tmp = (z ** 2.0d0) * ((0.0007936500793651d0 + y) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.057) {
tmp = (0.0007936500793651 + y) * (Math.pow(z, 2.0) / x);
} else if (z <= 35000000000.0) {
tmp = (x * (Math.log(x) + -1.0)) + ((0.083333333333333 + (z * -0.0027777777777778)) / x);
} else {
tmp = Math.pow(z, 2.0) * ((0.0007936500793651 + y) / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.057: tmp = (0.0007936500793651 + y) * (math.pow(z, 2.0) / x) elif z <= 35000000000.0: tmp = (x * (math.log(x) + -1.0)) + ((0.083333333333333 + (z * -0.0027777777777778)) / x) else: tmp = math.pow(z, 2.0) * ((0.0007936500793651 + y) / x) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.057) tmp = Float64(Float64(0.0007936500793651 + y) * Float64((z ^ 2.0) / x)); elseif (z <= 35000000000.0) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x)); else tmp = Float64((z ^ 2.0) * Float64(Float64(0.0007936500793651 + y) / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.057) tmp = (0.0007936500793651 + y) * ((z ^ 2.0) / x); elseif (z <= 35000000000.0) tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * -0.0027777777777778)) / x); else tmp = (z ^ 2.0) * ((0.0007936500793651 + y) / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.057], N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(N[Power[z, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 35000000000.0], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[Power[z, 2.0], $MachinePrecision] * N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.057:\\
\;\;\;\;\left(0.0007936500793651 + y\right) \cdot \frac{{z}^{2}}{x}\\
\mathbf{elif}\;z \leq 35000000000:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\
\mathbf{else}:\\
\;\;\;\;{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}\\
\end{array}
\end{array}
if z < -0.0570000000000000021Initial program 88.9%
Taylor expanded in z around inf 88.9%
Taylor expanded in x around 0 81.9%
+-commutative81.9%
Simplified81.9%
Taylor expanded in x around 0 82.0%
*-commutative82.0%
associate-*r/84.7%
Simplified84.7%
if -0.0570000000000000021 < z < 3.5e10Initial program 99.3%
Taylor expanded in x around inf 96.7%
sub-neg96.7%
mul-1-neg96.7%
log-rec96.7%
remove-double-neg96.7%
metadata-eval96.7%
+-commutative96.7%
Simplified96.7%
Taylor expanded in z around 0 86.5%
*-commutative86.5%
Simplified86.5%
if 3.5e10 < z Initial program 86.2%
Taylor expanded in z around inf 86.2%
Taylor expanded in x around 0 78.1%
+-commutative78.1%
Simplified78.1%
Taylor expanded in x around 0 78.3%
associate-/l*79.8%
Simplified79.8%
Final simplification84.4%
(FPCore (x y z)
:precision binary64
(if (<= z -0.175)
(* (+ 0.0007936500793651 y) (/ (pow z 2.0) x))
(if (<= z 85000000.0)
(+ (* 0.083333333333333 (/ 1.0 x)) (* x (+ (log x) -1.0)))
(* (pow z 2.0) (/ (+ 0.0007936500793651 y) x)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.175) {
tmp = (0.0007936500793651 + y) * (pow(z, 2.0) / x);
} else if (z <= 85000000.0) {
tmp = (0.083333333333333 * (1.0 / x)) + (x * (log(x) + -1.0));
} else {
tmp = pow(z, 2.0) * ((0.0007936500793651 + y) / 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 <= (-0.175d0)) then
tmp = (0.0007936500793651d0 + y) * ((z ** 2.0d0) / x)
else if (z <= 85000000.0d0) then
tmp = (0.083333333333333d0 * (1.0d0 / x)) + (x * (log(x) + (-1.0d0)))
else
tmp = (z ** 2.0d0) * ((0.0007936500793651d0 + y) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.175) {
tmp = (0.0007936500793651 + y) * (Math.pow(z, 2.0) / x);
} else if (z <= 85000000.0) {
tmp = (0.083333333333333 * (1.0 / x)) + (x * (Math.log(x) + -1.0));
} else {
tmp = Math.pow(z, 2.0) * ((0.0007936500793651 + y) / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.175: tmp = (0.0007936500793651 + y) * (math.pow(z, 2.0) / x) elif z <= 85000000.0: tmp = (0.083333333333333 * (1.0 / x)) + (x * (math.log(x) + -1.0)) else: tmp = math.pow(z, 2.0) * ((0.0007936500793651 + y) / x) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.175) tmp = Float64(Float64(0.0007936500793651 + y) * Float64((z ^ 2.0) / x)); elseif (z <= 85000000.0) tmp = Float64(Float64(0.083333333333333 * Float64(1.0 / x)) + Float64(x * Float64(log(x) + -1.0))); else tmp = Float64((z ^ 2.0) * Float64(Float64(0.0007936500793651 + y) / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.175) tmp = (0.0007936500793651 + y) * ((z ^ 2.0) / x); elseif (z <= 85000000.0) tmp = (0.083333333333333 * (1.0 / x)) + (x * (log(x) + -1.0)); else tmp = (z ^ 2.0) * ((0.0007936500793651 + y) / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.175], N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(N[Power[z, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 85000000.0], N[(N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[z, 2.0], $MachinePrecision] * N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.175:\\
\;\;\;\;\left(0.0007936500793651 + y\right) \cdot \frac{{z}^{2}}{x}\\
\mathbf{elif}\;z \leq 85000000:\\
\;\;\;\;0.083333333333333 \cdot \frac{1}{x} + x \cdot \left(\log x + -1\right)\\
\mathbf{else}:\\
\;\;\;\;{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}\\
\end{array}
\end{array}
if z < -0.17499999999999999Initial program 88.9%
Taylor expanded in z around inf 88.9%
Taylor expanded in x around 0 81.9%
+-commutative81.9%
Simplified81.9%
Taylor expanded in x around 0 82.0%
*-commutative82.0%
associate-*r/84.7%
Simplified84.7%
if -0.17499999999999999 < z < 8.5e7Initial program 99.3%
Taylor expanded in z around 0 89.0%
Taylor expanded in x around inf 86.4%
sub-neg96.7%
mul-1-neg96.7%
log-rec96.7%
remove-double-neg96.7%
metadata-eval96.7%
+-commutative96.7%
Simplified86.4%
div-inv86.4%
*-commutative86.4%
Applied egg-rr86.4%
if 8.5e7 < z Initial program 86.2%
Taylor expanded in z around inf 86.2%
Taylor expanded in x around 0 78.1%
+-commutative78.1%
Simplified78.1%
Taylor expanded in x around 0 78.3%
associate-/l*79.8%
Simplified79.8%
Final simplification84.4%
(FPCore (x y z)
:precision binary64
(if (<= z -0.0009)
(* (+ 0.0007936500793651 y) (/ (pow z 2.0) x))
(if (<= z 23500000000.0)
(+ (* x (+ (log x) -1.0)) (/ 0.083333333333333 x))
(* (pow z 2.0) (/ (+ 0.0007936500793651 y) x)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.0009) {
tmp = (0.0007936500793651 + y) * (pow(z, 2.0) / x);
} else if (z <= 23500000000.0) {
tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x);
} else {
tmp = pow(z, 2.0) * ((0.0007936500793651 + y) / 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 <= (-0.0009d0)) then
tmp = (0.0007936500793651d0 + y) * ((z ** 2.0d0) / x)
else if (z <= 23500000000.0d0) then
tmp = (x * (log(x) + (-1.0d0))) + (0.083333333333333d0 / x)
else
tmp = (z ** 2.0d0) * ((0.0007936500793651d0 + y) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.0009) {
tmp = (0.0007936500793651 + y) * (Math.pow(z, 2.0) / x);
} else if (z <= 23500000000.0) {
tmp = (x * (Math.log(x) + -1.0)) + (0.083333333333333 / x);
} else {
tmp = Math.pow(z, 2.0) * ((0.0007936500793651 + y) / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.0009: tmp = (0.0007936500793651 + y) * (math.pow(z, 2.0) / x) elif z <= 23500000000.0: tmp = (x * (math.log(x) + -1.0)) + (0.083333333333333 / x) else: tmp = math.pow(z, 2.0) * ((0.0007936500793651 + y) / x) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.0009) tmp = Float64(Float64(0.0007936500793651 + y) * Float64((z ^ 2.0) / x)); elseif (z <= 23500000000.0) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(0.083333333333333 / x)); else tmp = Float64((z ^ 2.0) * Float64(Float64(0.0007936500793651 + y) / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.0009) tmp = (0.0007936500793651 + y) * ((z ^ 2.0) / x); elseif (z <= 23500000000.0) tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x); else tmp = (z ^ 2.0) * ((0.0007936500793651 + y) / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.0009], N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(N[Power[z, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 23500000000.0], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], N[(N[Power[z, 2.0], $MachinePrecision] * N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.0009:\\
\;\;\;\;\left(0.0007936500793651 + y\right) \cdot \frac{{z}^{2}}{x}\\
\mathbf{elif}\;z \leq 23500000000:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}\\
\end{array}
\end{array}
if z < -8.9999999999999998e-4Initial program 88.9%
Taylor expanded in z around inf 88.9%
Taylor expanded in x around 0 81.9%
+-commutative81.9%
Simplified81.9%
Taylor expanded in x around 0 82.0%
*-commutative82.0%
associate-*r/84.7%
Simplified84.7%
if -8.9999999999999998e-4 < z < 2.35e10Initial program 99.3%
Taylor expanded in z around 0 89.0%
Taylor expanded in x around inf 86.4%
sub-neg96.7%
mul-1-neg96.7%
log-rec96.7%
remove-double-neg96.7%
metadata-eval96.7%
+-commutative96.7%
Simplified86.4%
if 2.35e10 < z Initial program 86.2%
Taylor expanded in z around inf 86.2%
Taylor expanded in x around 0 78.1%
+-commutative78.1%
Simplified78.1%
Taylor expanded in x around 0 78.3%
associate-/l*79.8%
Simplified79.8%
Final simplification84.4%
(FPCore (x y z)
:precision binary64
(+
(* x (+ (log x) -1.0))
(/
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
x)))
double code(double x, double y, double z) {
return (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x * (log(x) + (-1.0d0))) + ((0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x)
end function
public static double code(double x, double y, double z) {
return (x * (Math.log(x) + -1.0)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
}
def code(x, y, z): return (x * (math.log(x) + -1.0)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x)
function code(x, y, z) return Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x)) end
function tmp = code(x, y, z) tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x); end
code[x_, y_, z_] := N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}
\end{array}
Initial program 93.4%
Taylor expanded in x around inf 92.1%
sub-neg92.1%
mul-1-neg92.1%
log-rec92.1%
remove-double-neg92.1%
metadata-eval92.1%
+-commutative92.1%
Simplified92.1%
Final simplification92.1%
(FPCore (x y z) :precision binary64 (if (or (<= z -0.000166) (not (<= z 1.7e-41))) (* (+ 0.0007936500793651 y) (/ (pow z 2.0) x)) (* 0.083333333333333 (/ 1.0 x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -0.000166) || !(z <= 1.7e-41)) {
tmp = (0.0007936500793651 + y) * (pow(z, 2.0) / x);
} else {
tmp = 0.083333333333333 * (1.0 / 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 <= (-0.000166d0)) .or. (.not. (z <= 1.7d-41))) then
tmp = (0.0007936500793651d0 + y) * ((z ** 2.0d0) / x)
else
tmp = 0.083333333333333d0 * (1.0d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -0.000166) || !(z <= 1.7e-41)) {
tmp = (0.0007936500793651 + y) * (Math.pow(z, 2.0) / x);
} else {
tmp = 0.083333333333333 * (1.0 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -0.000166) or not (z <= 1.7e-41): tmp = (0.0007936500793651 + y) * (math.pow(z, 2.0) / x) else: tmp = 0.083333333333333 * (1.0 / x) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -0.000166) || !(z <= 1.7e-41)) tmp = Float64(Float64(0.0007936500793651 + y) * Float64((z ^ 2.0) / x)); else tmp = Float64(0.083333333333333 * Float64(1.0 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -0.000166) || ~((z <= 1.7e-41))) tmp = (0.0007936500793651 + y) * ((z ^ 2.0) / x); else tmp = 0.083333333333333 * (1.0 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -0.000166], N[Not[LessEqual[z, 1.7e-41]], $MachinePrecision]], N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(N[Power[z, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.000166 \lor \neg \left(z \leq 1.7 \cdot 10^{-41}\right):\\
\;\;\;\;\left(0.0007936500793651 + y\right) \cdot \frac{{z}^{2}}{x}\\
\mathbf{else}:\\
\;\;\;\;0.083333333333333 \cdot \frac{1}{x}\\
\end{array}
\end{array}
if z < -1.65999999999999996e-4 or 1.6999999999999999e-41 < z Initial program 89.1%
Taylor expanded in z around inf 86.4%
Taylor expanded in x around 0 74.5%
+-commutative77.2%
Simplified74.5%
Taylor expanded in x around 0 74.6%
*-commutative74.6%
associate-*r/76.5%
Simplified76.5%
if -1.65999999999999996e-4 < z < 1.6999999999999999e-41Initial program 99.3%
Taylor expanded in z around 0 93.9%
Taylor expanded in x around inf 90.8%
sub-neg96.2%
mul-1-neg96.2%
log-rec96.2%
remove-double-neg96.2%
metadata-eval96.2%
+-commutative96.2%
Simplified90.8%
Taylor expanded in x around 0 46.9%
div-inv90.8%
*-commutative90.8%
Applied egg-rr46.9%
Final simplification63.9%
(FPCore (x y z)
:precision binary64
(if (<= z -0.0055)
(* (+ 0.0007936500793651 y) (/ (pow z 2.0) x))
(if (<= z 5.2e-41)
(* 0.083333333333333 (/ 1.0 x))
(* (pow z 2.0) (/ (+ 0.0007936500793651 y) x)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.0055) {
tmp = (0.0007936500793651 + y) * (pow(z, 2.0) / x);
} else if (z <= 5.2e-41) {
tmp = 0.083333333333333 * (1.0 / x);
} else {
tmp = pow(z, 2.0) * ((0.0007936500793651 + y) / 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 <= (-0.0055d0)) then
tmp = (0.0007936500793651d0 + y) * ((z ** 2.0d0) / x)
else if (z <= 5.2d-41) then
tmp = 0.083333333333333d0 * (1.0d0 / x)
else
tmp = (z ** 2.0d0) * ((0.0007936500793651d0 + y) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.0055) {
tmp = (0.0007936500793651 + y) * (Math.pow(z, 2.0) / x);
} else if (z <= 5.2e-41) {
tmp = 0.083333333333333 * (1.0 / x);
} else {
tmp = Math.pow(z, 2.0) * ((0.0007936500793651 + y) / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.0055: tmp = (0.0007936500793651 + y) * (math.pow(z, 2.0) / x) elif z <= 5.2e-41: tmp = 0.083333333333333 * (1.0 / x) else: tmp = math.pow(z, 2.0) * ((0.0007936500793651 + y) / x) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.0055) tmp = Float64(Float64(0.0007936500793651 + y) * Float64((z ^ 2.0) / x)); elseif (z <= 5.2e-41) tmp = Float64(0.083333333333333 * Float64(1.0 / x)); else tmp = Float64((z ^ 2.0) * Float64(Float64(0.0007936500793651 + y) / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.0055) tmp = (0.0007936500793651 + y) * ((z ^ 2.0) / x); elseif (z <= 5.2e-41) tmp = 0.083333333333333 * (1.0 / x); else tmp = (z ^ 2.0) * ((0.0007936500793651 + y) / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.0055], N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(N[Power[z, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e-41], N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], N[(N[Power[z, 2.0], $MachinePrecision] * N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.0055:\\
\;\;\;\;\left(0.0007936500793651 + y\right) \cdot \frac{{z}^{2}}{x}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-41}:\\
\;\;\;\;0.083333333333333 \cdot \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}\\
\end{array}
\end{array}
if z < -0.0054999999999999997Initial program 88.9%
Taylor expanded in z around inf 88.9%
Taylor expanded in x around 0 81.9%
+-commutative81.9%
Simplified81.9%
Taylor expanded in x around 0 82.0%
*-commutative82.0%
associate-*r/84.7%
Simplified84.7%
if -0.0054999999999999997 < z < 5.1999999999999999e-41Initial program 99.3%
Taylor expanded in z around 0 93.9%
Taylor expanded in x around inf 90.8%
sub-neg96.2%
mul-1-neg96.2%
log-rec96.2%
remove-double-neg96.2%
metadata-eval96.2%
+-commutative96.2%
Simplified90.8%
Taylor expanded in x around 0 46.9%
div-inv90.8%
*-commutative90.8%
Applied egg-rr46.9%
if 5.1999999999999999e-41 < z Initial program 89.2%
Taylor expanded in z around inf 84.2%
Taylor expanded in x around 0 68.0%
+-commutative73.1%
Simplified68.0%
Taylor expanded in x around 0 68.2%
associate-/l*69.3%
Simplified69.3%
Final simplification63.9%
(FPCore (x y z) :precision binary64 (if (or (<= z -0.000166) (not (<= z 5e-37))) (* (/ y x) (pow z 2.0)) (* 0.083333333333333 (/ 1.0 x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -0.000166) || !(z <= 5e-37)) {
tmp = (y / x) * pow(z, 2.0);
} else {
tmp = 0.083333333333333 * (1.0 / 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 <= (-0.000166d0)) .or. (.not. (z <= 5d-37))) then
tmp = (y / x) * (z ** 2.0d0)
else
tmp = 0.083333333333333d0 * (1.0d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -0.000166) || !(z <= 5e-37)) {
tmp = (y / x) * Math.pow(z, 2.0);
} else {
tmp = 0.083333333333333 * (1.0 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -0.000166) or not (z <= 5e-37): tmp = (y / x) * math.pow(z, 2.0) else: tmp = 0.083333333333333 * (1.0 / x) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -0.000166) || !(z <= 5e-37)) tmp = Float64(Float64(y / x) * (z ^ 2.0)); else tmp = Float64(0.083333333333333 * Float64(1.0 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -0.000166) || ~((z <= 5e-37))) tmp = (y / x) * (z ^ 2.0); else tmp = 0.083333333333333 * (1.0 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -0.000166], N[Not[LessEqual[z, 5e-37]], $MachinePrecision]], N[(N[(y / x), $MachinePrecision] * N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision], N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.000166 \lor \neg \left(z \leq 5 \cdot 10^{-37}\right):\\
\;\;\;\;\frac{y}{x} \cdot {z}^{2}\\
\mathbf{else}:\\
\;\;\;\;0.083333333333333 \cdot \frac{1}{x}\\
\end{array}
\end{array}
if z < -1.65999999999999996e-4 or 4.9999999999999997e-37 < z Initial program 89.1%
Taylor expanded in z around inf 86.4%
Taylor expanded in x around 0 74.5%
+-commutative77.2%
Simplified74.5%
Taylor expanded in y around inf 54.3%
*-commutative54.3%
associate-*r/56.2%
Simplified56.2%
if -1.65999999999999996e-4 < z < 4.9999999999999997e-37Initial program 99.3%
Taylor expanded in z around 0 93.9%
Taylor expanded in x around inf 90.8%
sub-neg96.2%
mul-1-neg96.2%
log-rec96.2%
remove-double-neg96.2%
metadata-eval96.2%
+-commutative96.2%
Simplified90.8%
Taylor expanded in x around 0 46.9%
div-inv90.8%
*-commutative90.8%
Applied egg-rr46.9%
Final simplification52.2%
(FPCore (x y z) :precision binary64 (* 0.083333333333333 (/ 1.0 x)))
double code(double x, double y, double z) {
return 0.083333333333333 * (1.0 / x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 0.083333333333333d0 * (1.0d0 / x)
end function
public static double code(double x, double y, double z) {
return 0.083333333333333 * (1.0 / x);
}
def code(x, y, z): return 0.083333333333333 * (1.0 / x)
function code(x, y, z) return Float64(0.083333333333333 * Float64(1.0 / x)) end
function tmp = code(x, y, z) tmp = 0.083333333333333 * (1.0 / x); end
code[x_, y_, z_] := N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.083333333333333 \cdot \frac{1}{x}
\end{array}
Initial program 93.4%
Taylor expanded in z around 0 52.1%
Taylor expanded in x around inf 50.8%
sub-neg92.1%
mul-1-neg92.1%
log-rec92.1%
remove-double-neg92.1%
metadata-eval92.1%
+-commutative92.1%
Simplified50.8%
Taylor expanded in x around 0 22.7%
div-inv50.8%
*-commutative50.8%
Applied egg-rr22.7%
Final simplification22.7%
(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 93.4%
Taylor expanded in z around 0 52.1%
Taylor expanded in x around inf 50.8%
sub-neg92.1%
mul-1-neg92.1%
log-rec92.1%
remove-double-neg92.1%
metadata-eval92.1%
+-commutative92.1%
Simplified50.8%
Taylor expanded in x around 0 22.7%
(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 2024091
(FPCore (x y z)
:name "Numeric.SpecFunctions:$slogFactorial from math-functions-0.1.5.2, B"
:precision binary64
:alt
(+ (+ (+ (* (- 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)))