
(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 19 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 1e+16)
(+
(- (* (log x) (+ x -0.5)) (+ x -0.91893853320467))
(/
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
x))
(-
(+
0.91893853320467
(+
(/ 0.083333333333333 x)
(+
(* z (+ (* (/ z x) (+ 0.0007936500793651 y)) (/ -0.0027777777777778 x)))
(* x (log x)))))
x)))
double code(double x, double y, double z) {
double tmp;
if (x <= 1e+16) {
tmp = ((log(x) * (x + -0.5)) - (x + -0.91893853320467)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
} else {
tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * (((z / x) * (0.0007936500793651 + y)) + (-0.0027777777777778 / x))) + (x * log(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 <= 1d+16) then
tmp = ((log(x) * (x + (-0.5d0))) - (x + (-0.91893853320467d0))) + ((0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x)
else
tmp = (0.91893853320467d0 + ((0.083333333333333d0 / x) + ((z * (((z / x) * (0.0007936500793651d0 + y)) + ((-0.0027777777777778d0) / x))) + (x * log(x))))) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 1e+16) {
tmp = ((Math.log(x) * (x + -0.5)) - (x + -0.91893853320467)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
} else {
tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * (((z / x) * (0.0007936500793651 + y)) + (-0.0027777777777778 / x))) + (x * Math.log(x))))) - x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1e+16: tmp = ((math.log(x) * (x + -0.5)) - (x + -0.91893853320467)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) else: tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * (((z / x) * (0.0007936500793651 + y)) + (-0.0027777777777778 / x))) + (x * math.log(x))))) - x return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1e+16) tmp = Float64(Float64(Float64(log(x) * Float64(x + -0.5)) - Float64(x + -0.91893853320467)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x)); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(0.083333333333333 / x) + Float64(Float64(z * Float64(Float64(Float64(z / x) * Float64(0.0007936500793651 + y)) + Float64(-0.0027777777777778 / x))) + Float64(x * log(x))))) - x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1e+16) tmp = ((log(x) * (x + -0.5)) - (x + -0.91893853320467)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x); else tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * (((z / x) * (0.0007936500793651 + y)) + (-0.0027777777777778 / x))) + (x * log(x))))) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1e+16], N[(N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] - N[(x + -0.91893853320467), $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], N[(N[(0.91893853320467 + N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(N[(z * N[(N[(N[(z / x), $MachinePrecision] * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] + N[(-0.0027777777777778 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 10^{+16}:\\
\;\;\;\;\left(\log x \cdot \left(x + -0.5\right) - \left(x + -0.91893853320467\right)\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \frac{-0.0027777777777778}{x}\right) + x \cdot \log x\right)\right)\right) - x\\
\end{array}
\end{array}
if x < 1e16Initial program 99.7%
associate-+l-99.7%
sub-neg99.7%
metadata-eval99.7%
sub-neg99.7%
metadata-eval99.7%
Applied egg-rr99.7%
if 1e16 < x Initial program 83.1%
sub-neg83.1%
associate-+l+83.1%
fma-define83.2%
sub-neg83.2%
metadata-eval83.2%
+-commutative83.2%
unsub-neg83.2%
*-commutative83.2%
fma-define83.2%
fma-neg83.2%
metadata-eval83.2%
Simplified83.2%
Taylor expanded in z around 0 99.4%
pow199.4%
fma-neg99.4%
*-commutative99.4%
div-inv99.5%
+-commutative99.5%
*-commutative99.5%
un-div-inv99.5%
Applied egg-rr99.5%
unpow199.5%
fma-undefine99.5%
+-commutative99.5%
distribute-rgt-out99.5%
associate-*l/99.4%
associate-*r/99.4%
associate-*l/95.6%
associate-/l*99.4%
distribute-rgt-out99.4%
distribute-neg-frac99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around 0 99.4%
Taylor expanded in x around inf 99.4%
mul-1-neg99.4%
distribute-rgt-neg-in99.4%
log-rec99.4%
remove-double-neg99.4%
Simplified99.4%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(if (<= x 2.85e+171)
(+
(/
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
x)
(- (/ (log x) (/ 1.0 (+ x -0.5))) (+ x -0.91893853320467)))
(-
(+
0.91893853320467
(+
(/ 0.083333333333333 x)
(+
(* (log x) (- x 0.5))
(* z (+ (/ -0.0027777777777778 x) (* z (/ 0.0007936500793651 x)))))))
x)))
double code(double x, double y, double z) {
double tmp;
if (x <= 2.85e+171) {
tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + ((log(x) / (1.0 / (x + -0.5))) - (x + -0.91893853320467));
} else {
tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((log(x) * (x - 0.5)) + (z * ((-0.0027777777777778 / x) + (z * (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 <= 2.85d+171) then
tmp = ((0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x) + ((log(x) / (1.0d0 / (x + (-0.5d0)))) - (x + (-0.91893853320467d0)))
else
tmp = (0.91893853320467d0 + ((0.083333333333333d0 / x) + ((log(x) * (x - 0.5d0)) + (z * (((-0.0027777777777778d0) / x) + (z * (0.0007936500793651d0 / x))))))) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 2.85e+171) {
tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + ((Math.log(x) / (1.0 / (x + -0.5))) - (x + -0.91893853320467));
} else {
tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((Math.log(x) * (x - 0.5)) + (z * ((-0.0027777777777778 / x) + (z * (0.0007936500793651 / x))))))) - x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 2.85e+171: tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + ((math.log(x) / (1.0 / (x + -0.5))) - (x + -0.91893853320467)) else: tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((math.log(x) * (x - 0.5)) + (z * ((-0.0027777777777778 / x) + (z * (0.0007936500793651 / x))))))) - x return tmp
function code(x, y, z) tmp = 0.0 if (x <= 2.85e+171) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x) + Float64(Float64(log(x) / Float64(1.0 / Float64(x + -0.5))) - Float64(x + -0.91893853320467))); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(0.083333333333333 / x) + Float64(Float64(log(x) * Float64(x - 0.5)) + Float64(z * Float64(Float64(-0.0027777777777778 / x) + Float64(z * Float64(0.0007936500793651 / x))))))) - x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 2.85e+171) tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + ((log(x) / (1.0 / (x + -0.5))) - (x + -0.91893853320467)); else tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((log(x) * (x - 0.5)) + (z * ((-0.0027777777777778 / x) + (z * (0.0007936500793651 / x))))))) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 2.85e+171], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(N[(N[Log[x], $MachinePrecision] / N[(1.0 / N[(x + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x + -0.91893853320467), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] + N[(z * N[(N[(-0.0027777777777778 / x), $MachinePrecision] + N[(z * N[(0.0007936500793651 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.85 \cdot 10^{+171}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} + \left(\frac{\log x}{\frac{1}{x + -0.5}} - \left(x + -0.91893853320467\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(\log x \cdot \left(x - 0.5\right) + z \cdot \left(\frac{-0.0027777777777778}{x} + z \cdot \frac{0.0007936500793651}{x}\right)\right)\right)\right) - x\\
\end{array}
\end{array}
if x < 2.85e171Initial program 98.2%
flip--94.7%
metadata-eval94.7%
metadata-eval94.7%
clear-num94.7%
fma-neg94.7%
metadata-eval94.7%
metadata-eval94.7%
Applied egg-rr94.7%
associate-+l-94.7%
associate-*l/94.7%
*-un-lft-identity94.7%
clear-num94.7%
metadata-eval94.7%
metadata-eval94.7%
fma-neg94.7%
metadata-eval94.7%
metadata-eval94.7%
*-un-lft-identity94.7%
fma-define94.7%
metadata-eval94.7%
fma-neg94.7%
*-un-lft-identity94.7%
flip-+98.2%
*-un-lft-identity98.2%
fma-neg98.2%
metadata-eval98.2%
fma-define98.2%
*-un-lft-identity98.2%
Applied egg-rr98.2%
if 2.85e171 < x Initial program 74.0%
sub-neg74.0%
associate-+l+74.0%
fma-define74.0%
sub-neg74.0%
metadata-eval74.0%
+-commutative74.0%
unsub-neg74.0%
*-commutative74.0%
fma-define74.0%
fma-neg74.0%
metadata-eval74.0%
Simplified74.0%
Taylor expanded in z around 0 99.5%
pow199.5%
fma-neg99.5%
*-commutative99.5%
div-inv99.5%
+-commutative99.5%
*-commutative99.5%
un-div-inv99.5%
Applied egg-rr99.5%
unpow199.5%
fma-undefine99.5%
+-commutative99.5%
distribute-rgt-out99.5%
associate-*l/99.5%
associate-*r/99.5%
associate-*l/93.8%
associate-/l*99.5%
distribute-rgt-out99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around 0 99.5%
Taylor expanded in y around 0 87.1%
*-commutative87.1%
associate-*l/87.1%
associate-*r/87.1%
Simplified87.1%
Final simplification95.4%
(FPCore (x y z)
:precision binary64
(if (<= x 3.4e+246)
(+
(/
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
x)
(- (/ (log x) (/ 1.0 (+ x -0.5))) (+ x -0.91893853320467)))
(* x (+ (log x) -1.0))))
double code(double x, double y, double z) {
double tmp;
if (x <= 3.4e+246) {
tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + ((log(x) / (1.0 / (x + -0.5))) - (x + -0.91893853320467));
} 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 <= 3.4d+246) then
tmp = ((0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x) + ((log(x) / (1.0d0 / (x + (-0.5d0)))) - (x + (-0.91893853320467d0)))
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 <= 3.4e+246) {
tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + ((Math.log(x) / (1.0 / (x + -0.5))) - (x + -0.91893853320467));
} else {
tmp = x * (Math.log(x) + -1.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 3.4e+246: tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + ((math.log(x) / (1.0 / (x + -0.5))) - (x + -0.91893853320467)) else: tmp = x * (math.log(x) + -1.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 3.4e+246) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x) + Float64(Float64(log(x) / Float64(1.0 / Float64(x + -0.5))) - Float64(x + -0.91893853320467))); 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 <= 3.4e+246) tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + ((log(x) / (1.0 / (x + -0.5))) - (x + -0.91893853320467)); else tmp = x * (log(x) + -1.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 3.4e+246], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(N[(N[Log[x], $MachinePrecision] / N[(1.0 / N[(x + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x + -0.91893853320467), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 3.4 \cdot 10^{+246}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} + \left(\frac{\log x}{\frac{1}{x + -0.5}} - \left(x + -0.91893853320467\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right)\\
\end{array}
\end{array}
if x < 3.39999999999999988e246Initial program 95.6%
flip--82.3%
metadata-eval82.3%
metadata-eval82.3%
clear-num82.3%
fma-neg82.3%
metadata-eval82.3%
metadata-eval82.3%
Applied egg-rr82.3%
associate-+l-82.3%
associate-*l/82.3%
*-un-lft-identity82.3%
clear-num82.3%
metadata-eval82.3%
metadata-eval82.3%
fma-neg82.3%
metadata-eval82.3%
metadata-eval82.3%
*-un-lft-identity82.3%
fma-define82.3%
metadata-eval82.3%
fma-neg82.3%
*-un-lft-identity82.3%
flip-+95.6%
*-un-lft-identity95.6%
fma-neg95.6%
metadata-eval95.6%
fma-define95.6%
*-un-lft-identity95.6%
Applied egg-rr95.6%
if 3.39999999999999988e246 < x Initial program 64.0%
sub-neg64.0%
associate-+l+64.0%
fma-define64.0%
sub-neg64.0%
metadata-eval64.0%
+-commutative64.0%
unsub-neg64.0%
*-commutative64.0%
fma-define64.0%
fma-neg64.0%
metadata-eval64.0%
Simplified64.0%
Taylor expanded in y around inf 39.2%
Taylor expanded in x around inf 88.9%
*-commutative88.9%
associate-*l*54.3%
sub-neg54.3%
mul-1-neg54.3%
distribute-frac-neg54.3%
log-rec54.3%
remove-double-neg54.3%
distribute-neg-frac54.3%
metadata-eval54.3%
Simplified54.3%
Taylor expanded in y around 0 92.3%
Final simplification95.2%
(FPCore (x y z)
:precision binary64
(if (<= x 4.4e+243)
(+
(- (* (log x) (+ x -0.5)) (+ x -0.91893853320467))
(/
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
x))
(* x (+ (log x) -1.0))))
double code(double x, double y, double z) {
double tmp;
if (x <= 4.4e+243) {
tmp = ((log(x) * (x + -0.5)) - (x + -0.91893853320467)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
} else {
tmp = x * (log(x) + -1.0);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 4.4d+243) then
tmp = ((log(x) * (x + (-0.5d0))) - (x + (-0.91893853320467d0))) + ((0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x)
else
tmp = x * (log(x) + (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 4.4e+243) {
tmp = ((Math.log(x) * (x + -0.5)) - (x + -0.91893853320467)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
} else {
tmp = x * (Math.log(x) + -1.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 4.4e+243: tmp = ((math.log(x) * (x + -0.5)) - (x + -0.91893853320467)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) else: tmp = x * (math.log(x) + -1.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 4.4e+243) tmp = Float64(Float64(Float64(log(x) * Float64(x + -0.5)) - Float64(x + -0.91893853320467)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x)); else tmp = Float64(x * Float64(log(x) + -1.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 4.4e+243) tmp = ((log(x) * (x + -0.5)) - (x + -0.91893853320467)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x); else tmp = x * (log(x) + -1.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 4.4e+243], N[(N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] - N[(x + -0.91893853320467), $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], N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4.4 \cdot 10^{+243}:\\
\;\;\;\;\left(\log x \cdot \left(x + -0.5\right) - \left(x + -0.91893853320467\right)\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right)\\
\end{array}
\end{array}
if x < 4.40000000000000018e243Initial program 95.5%
associate-+l-95.5%
sub-neg95.5%
metadata-eval95.5%
sub-neg95.5%
metadata-eval95.5%
Applied egg-rr95.5%
if 4.40000000000000018e243 < x Initial program 66.4%
sub-neg66.4%
associate-+l+66.4%
fma-define66.4%
sub-neg66.4%
metadata-eval66.4%
+-commutative66.4%
unsub-neg66.4%
*-commutative66.4%
fma-define66.4%
fma-neg66.4%
metadata-eval66.4%
Simplified66.4%
Taylor expanded in y around inf 39.9%
Taylor expanded in x around inf 89.6%
*-commutative89.6%
associate-*l*54.3%
sub-neg54.3%
mul-1-neg54.3%
distribute-frac-neg54.3%
log-rec54.3%
remove-double-neg54.3%
distribute-neg-frac54.3%
metadata-eval54.3%
Simplified54.3%
Taylor expanded in y around 0 92.7%
Final simplification95.2%
(FPCore (x y z)
:precision binary64
(if (<= x 4.4e+243)
(+
(/
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
x)
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x)))
(* x (+ (log x) -1.0))))
double code(double x, double y, double z) {
double tmp;
if (x <= 4.4e+243) {
tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + (0.91893853320467 + ((log(x) * (x - 0.5)) - 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 <= 4.4d+243) then
tmp = ((0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x) + (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - 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 <= 4.4e+243) {
tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x));
} else {
tmp = x * (Math.log(x) + -1.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 4.4e+243: tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) else: tmp = x * (math.log(x) + -1.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 4.4e+243) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x) + Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - 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 <= 4.4e+243) tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + (0.91893853320467 + ((log(x) * (x - 0.5)) - x)); else tmp = x * (log(x) + -1.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 4.4e+243], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4.4 \cdot 10^{+243}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right)\\
\end{array}
\end{array}
if x < 4.40000000000000018e243Initial program 95.5%
if 4.40000000000000018e243 < x Initial program 66.4%
sub-neg66.4%
associate-+l+66.4%
fma-define66.4%
sub-neg66.4%
metadata-eval66.4%
+-commutative66.4%
unsub-neg66.4%
*-commutative66.4%
fma-define66.4%
fma-neg66.4%
metadata-eval66.4%
Simplified66.4%
Taylor expanded in y around inf 39.9%
Taylor expanded in x around inf 89.6%
*-commutative89.6%
associate-*l*54.3%
sub-neg54.3%
mul-1-neg54.3%
distribute-frac-neg54.3%
log-rec54.3%
remove-double-neg54.3%
distribute-neg-frac54.3%
metadata-eval54.3%
Simplified54.3%
Taylor expanded in y around 0 92.7%
Final simplification95.2%
(FPCore (x y z)
:precision binary64
(-
(+
0.91893853320467
(+
(/ 0.083333333333333 x)
(+
(* z (+ (* (/ z x) (+ 0.0007936500793651 y)) (/ -0.0027777777777778 x)))
(* (log x) (- x 0.5)))))
x))
double code(double x, double y, double z) {
return (0.91893853320467 + ((0.083333333333333 / x) + ((z * (((z / x) * (0.0007936500793651 + y)) + (-0.0027777777777778 / x))) + (log(x) * (x - 0.5))))) - 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.91893853320467d0 + ((0.083333333333333d0 / x) + ((z * (((z / x) * (0.0007936500793651d0 + y)) + ((-0.0027777777777778d0) / x))) + (log(x) * (x - 0.5d0))))) - x
end function
public static double code(double x, double y, double z) {
return (0.91893853320467 + ((0.083333333333333 / x) + ((z * (((z / x) * (0.0007936500793651 + y)) + (-0.0027777777777778 / x))) + (Math.log(x) * (x - 0.5))))) - x;
}
def code(x, y, z): return (0.91893853320467 + ((0.083333333333333 / x) + ((z * (((z / x) * (0.0007936500793651 + y)) + (-0.0027777777777778 / x))) + (math.log(x) * (x - 0.5))))) - x
function code(x, y, z) return Float64(Float64(0.91893853320467 + Float64(Float64(0.083333333333333 / x) + Float64(Float64(z * Float64(Float64(Float64(z / x) * Float64(0.0007936500793651 + y)) + Float64(-0.0027777777777778 / x))) + Float64(log(x) * Float64(x - 0.5))))) - x) end
function tmp = code(x, y, z) tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * (((z / x) * (0.0007936500793651 + y)) + (-0.0027777777777778 / x))) + (log(x) * (x - 0.5))))) - x; end
code[x_, y_, z_] := N[(N[(0.91893853320467 + N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(N[(z * N[(N[(N[(z / x), $MachinePrecision] * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] + N[(-0.0027777777777778 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]
\begin{array}{l}
\\
\left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \frac{-0.0027777777777778}{x}\right) + \log x \cdot \left(x - 0.5\right)\right)\right)\right) - x
\end{array}
Initial program 92.1%
sub-neg92.1%
associate-+l+92.1%
fma-define92.2%
sub-neg92.2%
metadata-eval92.2%
+-commutative92.2%
unsub-neg92.2%
*-commutative92.2%
fma-define92.2%
fma-neg92.2%
metadata-eval92.2%
Simplified92.2%
Taylor expanded in z around 0 94.7%
pow194.7%
fma-neg94.7%
*-commutative94.7%
div-inv94.7%
+-commutative94.7%
*-commutative94.7%
un-div-inv94.7%
Applied egg-rr94.7%
unpow194.7%
fma-undefine94.7%
+-commutative94.7%
distribute-rgt-out89.3%
associate-*l/89.3%
associate-*r/89.3%
associate-*l/91.3%
associate-/l*91.1%
distribute-rgt-out98.5%
distribute-neg-frac98.5%
metadata-eval98.5%
Simplified98.5%
Taylor expanded in x around 0 98.5%
(FPCore (x y z)
:precision binary64
(if (<= z -0.029)
(/ (* (+ 0.0007936500793651 y) (pow z 2.0)) x)
(if (<= z 70000000.0)
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(/ 1.0 (* x 12.000000000000048)))
(* (* z z) (* y (+ (/ 1.0 x) (/ 0.0007936500793651 (* x y))))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.029) {
tmp = ((0.0007936500793651 + y) * pow(z, 2.0)) / x;
} else if (z <= 70000000.0) {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (1.0 / (x * 12.000000000000048));
} else {
tmp = (z * z) * (y * ((1.0 / x) + (0.0007936500793651 / (x * y))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-0.029d0)) then
tmp = ((0.0007936500793651d0 + y) * (z ** 2.0d0)) / x
else if (z <= 70000000.0d0) then
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + (1.0d0 / (x * 12.000000000000048d0))
else
tmp = (z * z) * (y * ((1.0d0 / x) + (0.0007936500793651d0 / (x * y))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.029) {
tmp = ((0.0007936500793651 + y) * Math.pow(z, 2.0)) / x;
} else if (z <= 70000000.0) {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + (1.0 / (x * 12.000000000000048));
} else {
tmp = (z * z) * (y * ((1.0 / x) + (0.0007936500793651 / (x * y))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.029: tmp = ((0.0007936500793651 + y) * math.pow(z, 2.0)) / x elif z <= 70000000.0: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + (1.0 / (x * 12.000000000000048)) else: tmp = (z * z) * (y * ((1.0 / x) + (0.0007936500793651 / (x * y)))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.029) tmp = Float64(Float64(Float64(0.0007936500793651 + y) * (z ^ 2.0)) / x); elseif (z <= 70000000.0) tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(1.0 / Float64(x * 12.000000000000048))); else tmp = Float64(Float64(z * z) * Float64(y * Float64(Float64(1.0 / x) + Float64(0.0007936500793651 / Float64(x * y))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.029) tmp = ((0.0007936500793651 + y) * (z ^ 2.0)) / x; elseif (z <= 70000000.0) tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (1.0 / (x * 12.000000000000048)); else tmp = (z * z) * (y * ((1.0 / x) + (0.0007936500793651 / (x * y)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.029], N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[z, 70000000.0], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(x * 12.000000000000048), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * z), $MachinePrecision] * N[(y * N[(N[(1.0 / x), $MachinePrecision] + N[(0.0007936500793651 / N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.029:\\
\;\;\;\;\frac{\left(0.0007936500793651 + y\right) \cdot {z}^{2}}{x}\\
\mathbf{elif}\;z \leq 70000000:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{1}{x \cdot 12.000000000000048}\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot z\right) \cdot \left(y \cdot \left(\frac{1}{x} + \frac{0.0007936500793651}{x \cdot y}\right)\right)\\
\end{array}
\end{array}
if z < -0.0290000000000000015Initial program 86.3%
sub-neg86.3%
associate-+l+86.3%
fma-define86.3%
sub-neg86.3%
metadata-eval86.3%
+-commutative86.3%
unsub-neg86.3%
*-commutative86.3%
fma-define86.3%
fma-neg86.3%
metadata-eval86.3%
Simplified86.3%
Taylor expanded in z around inf 73.2%
associate-*r/73.2%
metadata-eval73.2%
Simplified73.2%
Taylor expanded in x around 0 73.4%
if -0.0290000000000000015 < z < 7e7Initial program 99.4%
clear-num99.4%
inv-pow99.4%
*-commutative99.4%
fma-undefine99.4%
fma-neg99.4%
metadata-eval99.4%
Applied egg-rr99.4%
unpow-199.4%
fma-define99.4%
+-commutative99.4%
*-commutative99.4%
fma-define99.4%
Simplified99.4%
Taylor expanded in z around 0 91.2%
*-commutative91.2%
Simplified91.2%
if 7e7 < z Initial program 84.9%
sub-neg84.9%
associate-+l+84.9%
fma-define85.0%
sub-neg85.0%
metadata-eval85.0%
+-commutative85.0%
unsub-neg85.0%
*-commutative85.0%
fma-define85.0%
fma-neg85.0%
metadata-eval85.0%
Simplified85.0%
Taylor expanded in z around inf 78.8%
associate-*r/78.8%
metadata-eval78.8%
Simplified78.8%
unpow278.8%
Applied egg-rr78.8%
Taylor expanded in y around inf 78.8%
associate-*r/78.8%
metadata-eval78.8%
*-commutative78.8%
Simplified78.8%
Final simplification83.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (<= x 4.4e+243)
(+
(/
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
x)
t_0)
t_0)))
double code(double x, double y, double z) {
double t_0 = x * (log(x) + -1.0);
double tmp;
if (x <= 4.4e+243) {
tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + t_0;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = x * (log(x) + (-1.0d0))
if (x <= 4.4d+243) then
tmp = ((0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x) + t_0
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (Math.log(x) + -1.0);
double tmp;
if (x <= 4.4e+243) {
tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + t_0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = x * (math.log(x) + -1.0) tmp = 0 if x <= 4.4e+243: tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + t_0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(x * Float64(log(x) + -1.0)) tmp = 0.0 if (x <= 4.4e+243) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x) + t_0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (log(x) + -1.0); tmp = 0.0; if (x <= 4.4e+243) tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + t_0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 4.4e+243], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + t$95$0), $MachinePrecision], t$95$0]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;x \leq 4.4 \cdot 10^{+243}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} + t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < 4.40000000000000018e243Initial program 95.5%
Taylor expanded in x around inf 94.0%
sub-neg94.0%
mul-1-neg94.0%
log-rec94.0%
remove-double-neg94.0%
metadata-eval94.0%
Simplified94.0%
if 4.40000000000000018e243 < x Initial program 66.4%
sub-neg66.4%
associate-+l+66.4%
fma-define66.4%
sub-neg66.4%
metadata-eval66.4%
+-commutative66.4%
unsub-neg66.4%
*-commutative66.4%
fma-define66.4%
fma-neg66.4%
metadata-eval66.4%
Simplified66.4%
Taylor expanded in y around inf 39.9%
Taylor expanded in x around inf 89.6%
*-commutative89.6%
associate-*l*54.3%
sub-neg54.3%
mul-1-neg54.3%
distribute-frac-neg54.3%
log-rec54.3%
remove-double-neg54.3%
distribute-neg-frac54.3%
metadata-eval54.3%
Simplified54.3%
Taylor expanded in y around 0 92.7%
Final simplification93.9%
(FPCore (x y z)
:precision binary64
(if (<= z -0.021)
(/ (* (+ 0.0007936500793651 y) (pow z 2.0)) x)
(if (<= z 29500000.0)
(+
(/ 0.083333333333333 x)
(- (* (log x) (+ x -0.5)) (+ x -0.91893853320467)))
(* (* z z) (* y (+ (/ 1.0 x) (/ 0.0007936500793651 (* x y))))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.021) {
tmp = ((0.0007936500793651 + y) * pow(z, 2.0)) / x;
} else if (z <= 29500000.0) {
tmp = (0.083333333333333 / x) + ((log(x) * (x + -0.5)) - (x + -0.91893853320467));
} else {
tmp = (z * z) * (y * ((1.0 / x) + (0.0007936500793651 / (x * y))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-0.021d0)) then
tmp = ((0.0007936500793651d0 + y) * (z ** 2.0d0)) / x
else if (z <= 29500000.0d0) then
tmp = (0.083333333333333d0 / x) + ((log(x) * (x + (-0.5d0))) - (x + (-0.91893853320467d0)))
else
tmp = (z * z) * (y * ((1.0d0 / x) + (0.0007936500793651d0 / (x * y))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.021) {
tmp = ((0.0007936500793651 + y) * Math.pow(z, 2.0)) / x;
} else if (z <= 29500000.0) {
tmp = (0.083333333333333 / x) + ((Math.log(x) * (x + -0.5)) - (x + -0.91893853320467));
} else {
tmp = (z * z) * (y * ((1.0 / x) + (0.0007936500793651 / (x * y))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.021: tmp = ((0.0007936500793651 + y) * math.pow(z, 2.0)) / x elif z <= 29500000.0: tmp = (0.083333333333333 / x) + ((math.log(x) * (x + -0.5)) - (x + -0.91893853320467)) else: tmp = (z * z) * (y * ((1.0 / x) + (0.0007936500793651 / (x * y)))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.021) tmp = Float64(Float64(Float64(0.0007936500793651 + y) * (z ^ 2.0)) / x); elseif (z <= 29500000.0) tmp = Float64(Float64(0.083333333333333 / x) + Float64(Float64(log(x) * Float64(x + -0.5)) - Float64(x + -0.91893853320467))); else tmp = Float64(Float64(z * z) * Float64(y * Float64(Float64(1.0 / x) + Float64(0.0007936500793651 / Float64(x * y))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.021) tmp = ((0.0007936500793651 + y) * (z ^ 2.0)) / x; elseif (z <= 29500000.0) tmp = (0.083333333333333 / x) + ((log(x) * (x + -0.5)) - (x + -0.91893853320467)); else tmp = (z * z) * (y * ((1.0 / x) + (0.0007936500793651 / (x * y)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.021], N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[z, 29500000.0], N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] - N[(x + -0.91893853320467), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * z), $MachinePrecision] * N[(y * N[(N[(1.0 / x), $MachinePrecision] + N[(0.0007936500793651 / N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.021:\\
\;\;\;\;\frac{\left(0.0007936500793651 + y\right) \cdot {z}^{2}}{x}\\
\mathbf{elif}\;z \leq 29500000:\\
\;\;\;\;\frac{0.083333333333333}{x} + \left(\log x \cdot \left(x + -0.5\right) - \left(x + -0.91893853320467\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot z\right) \cdot \left(y \cdot \left(\frac{1}{x} + \frac{0.0007936500793651}{x \cdot y}\right)\right)\\
\end{array}
\end{array}
if z < -0.0210000000000000013Initial program 86.3%
sub-neg86.3%
associate-+l+86.3%
fma-define86.3%
sub-neg86.3%
metadata-eval86.3%
+-commutative86.3%
unsub-neg86.3%
*-commutative86.3%
fma-define86.3%
fma-neg86.3%
metadata-eval86.3%
Simplified86.3%
Taylor expanded in z around inf 73.2%
associate-*r/73.2%
metadata-eval73.2%
Simplified73.2%
Taylor expanded in x around 0 73.4%
if -0.0210000000000000013 < z < 2.95e7Initial program 99.4%
associate-+l-99.4%
sub-neg99.4%
metadata-eval99.4%
sub-neg99.4%
metadata-eval99.4%
Applied egg-rr99.4%
Taylor expanded in z around 0 91.2%
if 2.95e7 < z Initial program 84.9%
sub-neg84.9%
associate-+l+84.9%
fma-define85.0%
sub-neg85.0%
metadata-eval85.0%
+-commutative85.0%
unsub-neg85.0%
*-commutative85.0%
fma-define85.0%
fma-neg85.0%
metadata-eval85.0%
Simplified85.0%
Taylor expanded in z around inf 78.8%
associate-*r/78.8%
metadata-eval78.8%
Simplified78.8%
unpow278.8%
Applied egg-rr78.8%
Taylor expanded in y around inf 78.8%
associate-*r/78.8%
metadata-eval78.8%
*-commutative78.8%
Simplified78.8%
Final simplification83.1%
(FPCore (x y z)
:precision binary64
(if (<= z -0.0152)
(/ (* (+ 0.0007936500793651 y) (pow z 2.0)) x)
(if (<= z 160000000.0)
(+
(/ 0.083333333333333 x)
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x)))
(* (* z z) (* y (+ (/ 1.0 x) (/ 0.0007936500793651 (* x y))))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.0152) {
tmp = ((0.0007936500793651 + y) * pow(z, 2.0)) / x;
} else if (z <= 160000000.0) {
tmp = (0.083333333333333 / x) + (0.91893853320467 + ((log(x) * (x - 0.5)) - x));
} else {
tmp = (z * z) * (y * ((1.0 / x) + (0.0007936500793651 / (x * y))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-0.0152d0)) then
tmp = ((0.0007936500793651d0 + y) * (z ** 2.0d0)) / x
else if (z <= 160000000.0d0) then
tmp = (0.083333333333333d0 / x) + (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x))
else
tmp = (z * z) * (y * ((1.0d0 / x) + (0.0007936500793651d0 / (x * y))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.0152) {
tmp = ((0.0007936500793651 + y) * Math.pow(z, 2.0)) / x;
} else if (z <= 160000000.0) {
tmp = (0.083333333333333 / x) + (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x));
} else {
tmp = (z * z) * (y * ((1.0 / x) + (0.0007936500793651 / (x * y))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.0152: tmp = ((0.0007936500793651 + y) * math.pow(z, 2.0)) / x elif z <= 160000000.0: tmp = (0.083333333333333 / x) + (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) else: tmp = (z * z) * (y * ((1.0 / x) + (0.0007936500793651 / (x * y)))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.0152) tmp = Float64(Float64(Float64(0.0007936500793651 + y) * (z ^ 2.0)) / x); elseif (z <= 160000000.0) tmp = Float64(Float64(0.083333333333333 / x) + Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x))); else tmp = Float64(Float64(z * z) * Float64(y * Float64(Float64(1.0 / x) + Float64(0.0007936500793651 / Float64(x * y))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.0152) tmp = ((0.0007936500793651 + y) * (z ^ 2.0)) / x; elseif (z <= 160000000.0) tmp = (0.083333333333333 / x) + (0.91893853320467 + ((log(x) * (x - 0.5)) - x)); else tmp = (z * z) * (y * ((1.0 / x) + (0.0007936500793651 / (x * y)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.0152], N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[z, 160000000.0], N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * z), $MachinePrecision] * N[(y * N[(N[(1.0 / x), $MachinePrecision] + N[(0.0007936500793651 / N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.0152:\\
\;\;\;\;\frac{\left(0.0007936500793651 + y\right) \cdot {z}^{2}}{x}\\
\mathbf{elif}\;z \leq 160000000:\\
\;\;\;\;\frac{0.083333333333333}{x} + \left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot z\right) \cdot \left(y \cdot \left(\frac{1}{x} + \frac{0.0007936500793651}{x \cdot y}\right)\right)\\
\end{array}
\end{array}
if z < -0.0152Initial program 86.3%
sub-neg86.3%
associate-+l+86.3%
fma-define86.3%
sub-neg86.3%
metadata-eval86.3%
+-commutative86.3%
unsub-neg86.3%
*-commutative86.3%
fma-define86.3%
fma-neg86.3%
metadata-eval86.3%
Simplified86.3%
Taylor expanded in z around inf 73.2%
associate-*r/73.2%
metadata-eval73.2%
Simplified73.2%
Taylor expanded in x around 0 73.4%
if -0.0152 < z < 1.6e8Initial program 99.4%
Taylor expanded in z around 0 91.1%
if 1.6e8 < z Initial program 84.9%
sub-neg84.9%
associate-+l+84.9%
fma-define85.0%
sub-neg85.0%
metadata-eval85.0%
+-commutative85.0%
unsub-neg85.0%
*-commutative85.0%
fma-define85.0%
fma-neg85.0%
metadata-eval85.0%
Simplified85.0%
Taylor expanded in z around inf 78.8%
associate-*r/78.8%
metadata-eval78.8%
Simplified78.8%
unpow278.8%
Applied egg-rr78.8%
Taylor expanded in y around inf 78.8%
associate-*r/78.8%
metadata-eval78.8%
*-commutative78.8%
Simplified78.8%
Final simplification83.1%
(FPCore (x y z)
:precision binary64
(if (<= z -0.0072)
(/ (* (+ 0.0007936500793651 y) (pow z 2.0)) x)
(if (<= z 62000000.0)
(+
(* x (+ (log x) -1.0))
(/ (+ 0.083333333333333 (* z -0.0027777777777778)) x))
(* (* z z) (* y (+ (/ 1.0 x) (/ 0.0007936500793651 (* x y))))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.0072) {
tmp = ((0.0007936500793651 + y) * pow(z, 2.0)) / x;
} else if (z <= 62000000.0) {
tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * -0.0027777777777778)) / x);
} else {
tmp = (z * z) * (y * ((1.0 / x) + (0.0007936500793651 / (x * y))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-0.0072d0)) then
tmp = ((0.0007936500793651d0 + y) * (z ** 2.0d0)) / x
else if (z <= 62000000.0d0) then
tmp = (x * (log(x) + (-1.0d0))) + ((0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x)
else
tmp = (z * z) * (y * ((1.0d0 / x) + (0.0007936500793651d0 / (x * y))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.0072) {
tmp = ((0.0007936500793651 + y) * Math.pow(z, 2.0)) / x;
} else if (z <= 62000000.0) {
tmp = (x * (Math.log(x) + -1.0)) + ((0.083333333333333 + (z * -0.0027777777777778)) / x);
} else {
tmp = (z * z) * (y * ((1.0 / x) + (0.0007936500793651 / (x * y))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.0072: tmp = ((0.0007936500793651 + y) * math.pow(z, 2.0)) / x elif z <= 62000000.0: tmp = (x * (math.log(x) + -1.0)) + ((0.083333333333333 + (z * -0.0027777777777778)) / x) else: tmp = (z * z) * (y * ((1.0 / x) + (0.0007936500793651 / (x * y)))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.0072) tmp = Float64(Float64(Float64(0.0007936500793651 + y) * (z ^ 2.0)) / x); elseif (z <= 62000000.0) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x)); else tmp = Float64(Float64(z * z) * Float64(y * Float64(Float64(1.0 / x) + Float64(0.0007936500793651 / Float64(x * y))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.0072) tmp = ((0.0007936500793651 + y) * (z ^ 2.0)) / x; elseif (z <= 62000000.0) tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * -0.0027777777777778)) / x); else tmp = (z * z) * (y * ((1.0 / x) + (0.0007936500793651 / (x * y)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.0072], N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[z, 62000000.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[(z * z), $MachinePrecision] * N[(y * N[(N[(1.0 / x), $MachinePrecision] + N[(0.0007936500793651 / N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.0072:\\
\;\;\;\;\frac{\left(0.0007936500793651 + y\right) \cdot {z}^{2}}{x}\\
\mathbf{elif}\;z \leq 62000000:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot z\right) \cdot \left(y \cdot \left(\frac{1}{x} + \frac{0.0007936500793651}{x \cdot y}\right)\right)\\
\end{array}
\end{array}
if z < -0.0071999999999999998Initial program 86.3%
sub-neg86.3%
associate-+l+86.3%
fma-define86.3%
sub-neg86.3%
metadata-eval86.3%
+-commutative86.3%
unsub-neg86.3%
*-commutative86.3%
fma-define86.3%
fma-neg86.3%
metadata-eval86.3%
Simplified86.3%
Taylor expanded in z around inf 73.2%
associate-*r/73.2%
metadata-eval73.2%
Simplified73.2%
Taylor expanded in x around 0 73.4%
if -0.0071999999999999998 < z < 6.2e7Initial program 99.4%
associate-+l-99.4%
sub-neg99.4%
metadata-eval99.4%
sub-neg99.4%
metadata-eval99.4%
Applied egg-rr99.4%
Taylor expanded in z around 0 92.3%
*-commutative92.3%
Simplified92.3%
Taylor expanded in x around inf 89.4%
sub-neg89.4%
mul-1-neg89.4%
log-rec89.4%
remove-double-neg89.4%
metadata-eval89.4%
Simplified89.4%
if 6.2e7 < z Initial program 84.9%
sub-neg84.9%
associate-+l+84.9%
fma-define85.0%
sub-neg85.0%
metadata-eval85.0%
+-commutative85.0%
unsub-neg85.0%
*-commutative85.0%
fma-define85.0%
fma-neg85.0%
metadata-eval85.0%
Simplified85.0%
Taylor expanded in z around inf 78.8%
associate-*r/78.8%
metadata-eval78.8%
Simplified78.8%
unpow278.8%
Applied egg-rr78.8%
Taylor expanded in y around inf 78.8%
associate-*r/78.8%
metadata-eval78.8%
*-commutative78.8%
Simplified78.8%
Final simplification82.3%
(FPCore (x y z)
:precision binary64
(if (<= x 0.00011)
(/
(+
0.083333333333333
(* y (* z (+ z (/ (fma z 0.0007936500793651 -0.0027777777777778) y)))))
x)
(+
(/ 0.083333333333333 x)
(- (* (log x) (+ x -0.5)) (+ x -0.91893853320467)))))
double code(double x, double y, double z) {
double tmp;
if (x <= 0.00011) {
tmp = (0.083333333333333 + (y * (z * (z + (fma(z, 0.0007936500793651, -0.0027777777777778) / y))))) / x;
} else {
tmp = (0.083333333333333 / x) + ((log(x) * (x + -0.5)) - (x + -0.91893853320467));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 0.00011) tmp = Float64(Float64(0.083333333333333 + Float64(y * Float64(z * Float64(z + Float64(fma(z, 0.0007936500793651, -0.0027777777777778) / y))))) / x); else tmp = Float64(Float64(0.083333333333333 / x) + Float64(Float64(log(x) * Float64(x + -0.5)) - Float64(x + -0.91893853320467))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 0.00011], N[(N[(0.083333333333333 + N[(y * N[(z * N[(z + N[(N[(z * 0.0007936500793651 + -0.0027777777777778), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] - N[(x + -0.91893853320467), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.00011:\\
\;\;\;\;\frac{0.083333333333333 + y \cdot \left(z \cdot \left(z + \frac{\mathsf{fma}\left(z, 0.0007936500793651, -0.0027777777777778\right)}{y}\right)\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{x} + \left(\log x \cdot \left(x + -0.5\right) - \left(x + -0.91893853320467\right)\right)\\
\end{array}
\end{array}
if x < 1.10000000000000004e-4Initial program 99.7%
sub-neg99.7%
associate-+l+99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
unsub-neg99.7%
*-commutative99.7%
fma-define99.7%
fma-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 67.9%
Taylor expanded in x around 0 81.7%
distribute-lft-in81.7%
*-commutative81.7%
associate-*r*81.7%
rgt-mult-inverse81.8%
metadata-eval81.8%
+-commutative81.8%
unpow281.8%
associate-/l*84.1%
*-commutative84.1%
fma-neg84.1%
metadata-eval84.1%
distribute-lft-out97.9%
Simplified97.9%
if 1.10000000000000004e-4 < x Initial program 84.3%
associate-+l-84.3%
sub-neg84.3%
metadata-eval84.3%
sub-neg84.3%
metadata-eval84.3%
Applied egg-rr84.3%
Taylor expanded in z around 0 71.3%
Final simplification84.8%
(FPCore (x y z) :precision binary64 (if (<= x 4.5e+35) (/ (* (+ 0.0007936500793651 y) (pow z 2.0)) x) (* x (+ (log x) -1.0))))
double code(double x, double y, double z) {
double tmp;
if (x <= 4.5e+35) {
tmp = ((0.0007936500793651 + y) * pow(z, 2.0)) / 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 <= 4.5d+35) then
tmp = ((0.0007936500793651d0 + y) * (z ** 2.0d0)) / 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 <= 4.5e+35) {
tmp = ((0.0007936500793651 + y) * Math.pow(z, 2.0)) / x;
} else {
tmp = x * (Math.log(x) + -1.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 4.5e+35: tmp = ((0.0007936500793651 + y) * math.pow(z, 2.0)) / x else: tmp = x * (math.log(x) + -1.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 4.5e+35) tmp = Float64(Float64(Float64(0.0007936500793651 + y) * (z ^ 2.0)) / 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 <= 4.5e+35) tmp = ((0.0007936500793651 + y) * (z ^ 2.0)) / x; else tmp = x * (log(x) + -1.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 4.5e+35], N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[Power[z, 2.0], $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 4.5 \cdot 10^{+35}:\\
\;\;\;\;\frac{\left(0.0007936500793651 + y\right) \cdot {z}^{2}}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right)\\
\end{array}
\end{array}
if x < 4.4999999999999997e35Initial program 99.1%
sub-neg99.1%
associate-+l+99.1%
fma-define99.1%
sub-neg99.1%
metadata-eval99.1%
+-commutative99.1%
unsub-neg99.1%
*-commutative99.1%
fma-define99.1%
fma-neg99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in z around inf 59.5%
associate-*r/59.5%
metadata-eval59.5%
Simplified59.5%
Taylor expanded in x around 0 60.2%
if 4.4999999999999997e35 < x Initial program 82.7%
sub-neg82.7%
associate-+l+82.7%
fma-define82.8%
sub-neg82.8%
metadata-eval82.8%
+-commutative82.8%
unsub-neg82.8%
*-commutative82.8%
fma-define82.8%
fma-neg82.8%
metadata-eval82.8%
Simplified82.8%
Taylor expanded in y around inf 58.6%
Taylor expanded in x around inf 73.9%
*-commutative73.9%
associate-*l*57.4%
sub-neg57.4%
mul-1-neg57.4%
distribute-frac-neg57.4%
log-rec57.4%
remove-double-neg57.4%
distribute-neg-frac57.4%
metadata-eval57.4%
Simplified57.4%
Taylor expanded in y around 0 74.9%
Final simplification66.4%
(FPCore (x y z) :precision binary64 (if (<= x 6e+35) (* (* z z) (/ (+ 0.0007936500793651 y) x)) (* x (+ (log x) -1.0))))
double code(double x, double y, double z) {
double tmp;
if (x <= 6e+35) {
tmp = (z * z) * ((0.0007936500793651 + y) / 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 <= 6d+35) then
tmp = (z * z) * ((0.0007936500793651d0 + y) / 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 <= 6e+35) {
tmp = (z * z) * ((0.0007936500793651 + y) / x);
} else {
tmp = x * (Math.log(x) + -1.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 6e+35: tmp = (z * z) * ((0.0007936500793651 + y) / x) else: tmp = x * (math.log(x) + -1.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 6e+35) tmp = Float64(Float64(z * z) * Float64(Float64(0.0007936500793651 + y) / 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 <= 6e+35) tmp = (z * z) * ((0.0007936500793651 + y) / x); else tmp = x * (log(x) + -1.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 6e+35], N[(N[(z * z), $MachinePrecision] * N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 6 \cdot 10^{+35}:\\
\;\;\;\;\left(z \cdot z\right) \cdot \frac{0.0007936500793651 + y}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right)\\
\end{array}
\end{array}
if x < 5.99999999999999981e35Initial program 99.1%
sub-neg99.1%
associate-+l+99.1%
fma-define99.1%
sub-neg99.1%
metadata-eval99.1%
+-commutative99.1%
unsub-neg99.1%
*-commutative99.1%
fma-define99.1%
fma-neg99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in z around inf 59.5%
associate-*r/59.5%
metadata-eval59.5%
Simplified59.5%
unpow259.5%
Applied egg-rr59.5%
Taylor expanded in x around 0 59.5%
if 5.99999999999999981e35 < x Initial program 82.7%
sub-neg82.7%
associate-+l+82.7%
fma-define82.8%
sub-neg82.8%
metadata-eval82.8%
+-commutative82.8%
unsub-neg82.8%
*-commutative82.8%
fma-define82.8%
fma-neg82.8%
metadata-eval82.8%
Simplified82.8%
Taylor expanded in y around inf 58.6%
Taylor expanded in x around inf 73.9%
*-commutative73.9%
associate-*l*57.4%
sub-neg57.4%
mul-1-neg57.4%
distribute-frac-neg57.4%
log-rec57.4%
remove-double-neg57.4%
distribute-neg-frac57.4%
metadata-eval57.4%
Simplified57.4%
Taylor expanded in y around 0 74.9%
Final simplification66.1%
(FPCore (x y z)
:precision binary64
(if (<= z -1.1e-93)
(* (* z z) (/ (+ 0.0007936500793651 y) x))
(if (<= z 14500000.0)
(/ 0.083333333333333 x)
(* (* z z) (* y (+ (/ 1.0 x) (/ 0.0007936500793651 (* x y))))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.1e-93) {
tmp = (z * z) * ((0.0007936500793651 + y) / x);
} else if (z <= 14500000.0) {
tmp = 0.083333333333333 / x;
} else {
tmp = (z * z) * (y * ((1.0 / x) + (0.0007936500793651 / (x * y))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-1.1d-93)) then
tmp = (z * z) * ((0.0007936500793651d0 + y) / x)
else if (z <= 14500000.0d0) then
tmp = 0.083333333333333d0 / x
else
tmp = (z * z) * (y * ((1.0d0 / x) + (0.0007936500793651d0 / (x * y))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -1.1e-93) {
tmp = (z * z) * ((0.0007936500793651 + y) / x);
} else if (z <= 14500000.0) {
tmp = 0.083333333333333 / x;
} else {
tmp = (z * z) * (y * ((1.0 / x) + (0.0007936500793651 / (x * y))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1.1e-93: tmp = (z * z) * ((0.0007936500793651 + y) / x) elif z <= 14500000.0: tmp = 0.083333333333333 / x else: tmp = (z * z) * (y * ((1.0 / x) + (0.0007936500793651 / (x * y)))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1.1e-93) tmp = Float64(Float64(z * z) * Float64(Float64(0.0007936500793651 + y) / x)); elseif (z <= 14500000.0) tmp = Float64(0.083333333333333 / x); else tmp = Float64(Float64(z * z) * Float64(y * Float64(Float64(1.0 / x) + Float64(0.0007936500793651 / Float64(x * y))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -1.1e-93) tmp = (z * z) * ((0.0007936500793651 + y) / x); elseif (z <= 14500000.0) tmp = 0.083333333333333 / x; else tmp = (z * z) * (y * ((1.0 / x) + (0.0007936500793651 / (x * y)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1.1e-93], N[(N[(z * z), $MachinePrecision] * N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 14500000.0], N[(0.083333333333333 / x), $MachinePrecision], N[(N[(z * z), $MachinePrecision] * N[(y * N[(N[(1.0 / x), $MachinePrecision] + N[(0.0007936500793651 / N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{-93}:\\
\;\;\;\;\left(z \cdot z\right) \cdot \frac{0.0007936500793651 + y}{x}\\
\mathbf{elif}\;z \leq 14500000:\\
\;\;\;\;\frac{0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot z\right) \cdot \left(y \cdot \left(\frac{1}{x} + \frac{0.0007936500793651}{x \cdot y}\right)\right)\\
\end{array}
\end{array}
if z < -1.09999999999999998e-93Initial program 88.2%
sub-neg88.2%
associate-+l+88.2%
fma-define88.2%
sub-neg88.2%
metadata-eval88.2%
+-commutative88.2%
unsub-neg88.2%
*-commutative88.2%
fma-define88.2%
fma-neg88.2%
metadata-eval88.2%
Simplified88.2%
Taylor expanded in z around inf 65.9%
associate-*r/65.8%
metadata-eval65.8%
Simplified65.8%
unpow265.8%
Applied egg-rr65.8%
Taylor expanded in x around 0 65.8%
if -1.09999999999999998e-93 < z < 1.45e7Initial program 99.4%
sub-neg99.4%
associate-+l+99.4%
fma-define99.4%
sub-neg99.4%
metadata-eval99.4%
+-commutative99.4%
unsub-neg99.4%
*-commutative99.4%
fma-define99.4%
fma-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in z around 0 93.9%
Taylor expanded in x around 0 45.0%
if 1.45e7 < z Initial program 84.9%
sub-neg84.9%
associate-+l+84.9%
fma-define85.0%
sub-neg85.0%
metadata-eval85.0%
+-commutative85.0%
unsub-neg85.0%
*-commutative85.0%
fma-define85.0%
fma-neg85.0%
metadata-eval85.0%
Simplified85.0%
Taylor expanded in z around inf 78.8%
associate-*r/78.8%
metadata-eval78.8%
Simplified78.8%
unpow278.8%
Applied egg-rr78.8%
Taylor expanded in y around inf 78.8%
associate-*r/78.8%
metadata-eval78.8%
*-commutative78.8%
Simplified78.8%
Final simplification60.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* (* z z) (/ y x))))
(if (<= z -1.1e-93)
t_0
(if (<= z 14500000.0)
(/ 0.083333333333333 x)
(if (<= z 5.9e+127) t_0 (* (/ 0.0007936500793651 x) (* z z)))))))
double code(double x, double y, double z) {
double t_0 = (z * z) * (y / x);
double tmp;
if (z <= -1.1e-93) {
tmp = t_0;
} else if (z <= 14500000.0) {
tmp = 0.083333333333333 / x;
} else if (z <= 5.9e+127) {
tmp = t_0;
} else {
tmp = (0.0007936500793651 / x) * (z * 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 = (z * z) * (y / x)
if (z <= (-1.1d-93)) then
tmp = t_0
else if (z <= 14500000.0d0) then
tmp = 0.083333333333333d0 / x
else if (z <= 5.9d+127) then
tmp = t_0
else
tmp = (0.0007936500793651d0 / x) * (z * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (z * z) * (y / x);
double tmp;
if (z <= -1.1e-93) {
tmp = t_0;
} else if (z <= 14500000.0) {
tmp = 0.083333333333333 / x;
} else if (z <= 5.9e+127) {
tmp = t_0;
} else {
tmp = (0.0007936500793651 / x) * (z * z);
}
return tmp;
}
def code(x, y, z): t_0 = (z * z) * (y / x) tmp = 0 if z <= -1.1e-93: tmp = t_0 elif z <= 14500000.0: tmp = 0.083333333333333 / x elif z <= 5.9e+127: tmp = t_0 else: tmp = (0.0007936500793651 / x) * (z * z) return tmp
function code(x, y, z) t_0 = Float64(Float64(z * z) * Float64(y / x)) tmp = 0.0 if (z <= -1.1e-93) tmp = t_0; elseif (z <= 14500000.0) tmp = Float64(0.083333333333333 / x); elseif (z <= 5.9e+127) tmp = t_0; else tmp = Float64(Float64(0.0007936500793651 / x) * Float64(z * z)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (z * z) * (y / x); tmp = 0.0; if (z <= -1.1e-93) tmp = t_0; elseif (z <= 14500000.0) tmp = 0.083333333333333 / x; elseif (z <= 5.9e+127) tmp = t_0; else tmp = (0.0007936500793651 / x) * (z * z); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(z * z), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.1e-93], t$95$0, If[LessEqual[z, 14500000.0], N[(0.083333333333333 / x), $MachinePrecision], If[LessEqual[z, 5.9e+127], t$95$0, N[(N[(0.0007936500793651 / x), $MachinePrecision] * N[(z * z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(z \cdot z\right) \cdot \frac{y}{x}\\
\mathbf{if}\;z \leq -1.1 \cdot 10^{-93}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 14500000:\\
\;\;\;\;\frac{0.083333333333333}{x}\\
\mathbf{elif}\;z \leq 5.9 \cdot 10^{+127}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{0.0007936500793651}{x} \cdot \left(z \cdot z\right)\\
\end{array}
\end{array}
if z < -1.09999999999999998e-93 or 1.45e7 < z < 5.90000000000000044e127Initial program 87.2%
sub-neg87.2%
associate-+l+87.2%
fma-define87.2%
sub-neg87.2%
metadata-eval87.2%
+-commutative87.2%
unsub-neg87.2%
*-commutative87.2%
fma-define87.2%
fma-neg87.2%
metadata-eval87.2%
Simplified87.2%
Taylor expanded in z around inf 66.8%
associate-*r/66.8%
metadata-eval66.8%
Simplified66.8%
unpow266.8%
Applied egg-rr66.8%
Taylor expanded in y around inf 50.5%
if -1.09999999999999998e-93 < z < 1.45e7Initial program 99.4%
sub-neg99.4%
associate-+l+99.4%
fma-define99.4%
sub-neg99.4%
metadata-eval99.4%
+-commutative99.4%
unsub-neg99.4%
*-commutative99.4%
fma-define99.4%
fma-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in z around 0 93.9%
Taylor expanded in x around 0 45.0%
if 5.90000000000000044e127 < z Initial program 85.9%
sub-neg85.9%
associate-+l+85.9%
fma-define86.0%
sub-neg86.0%
metadata-eval86.0%
+-commutative86.0%
unsub-neg86.0%
*-commutative86.0%
fma-define86.0%
fma-neg86.0%
metadata-eval86.0%
Simplified86.0%
Taylor expanded in z around inf 83.7%
associate-*r/83.7%
metadata-eval83.7%
Simplified83.7%
unpow283.7%
Applied egg-rr83.7%
Taylor expanded in y around 0 67.5%
Final simplification50.8%
(FPCore (x y z) :precision binary64 (if (or (<= z -1.1e-93) (not (<= z 14500000.0))) (* (* z z) (/ (+ 0.0007936500793651 y) x)) (/ 0.083333333333333 x)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.1e-93) || !(z <= 14500000.0)) {
tmp = (z * z) * ((0.0007936500793651 + y) / x);
} else {
tmp = 0.083333333333333 / x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-1.1d-93)) .or. (.not. (z <= 14500000.0d0))) then
tmp = (z * z) * ((0.0007936500793651d0 + y) / x)
else
tmp = 0.083333333333333d0 / x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -1.1e-93) || !(z <= 14500000.0)) {
tmp = (z * z) * ((0.0007936500793651 + y) / x);
} else {
tmp = 0.083333333333333 / x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.1e-93) or not (z <= 14500000.0): tmp = (z * z) * ((0.0007936500793651 + y) / x) else: tmp = 0.083333333333333 / x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.1e-93) || !(z <= 14500000.0)) tmp = Float64(Float64(z * z) * Float64(Float64(0.0007936500793651 + y) / x)); else tmp = Float64(0.083333333333333 / x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -1.1e-93) || ~((z <= 14500000.0))) tmp = (z * z) * ((0.0007936500793651 + y) / x); else tmp = 0.083333333333333 / x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1.1e-93], N[Not[LessEqual[z, 14500000.0]], $MachinePrecision]], N[(N[(z * z), $MachinePrecision] * N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(0.083333333333333 / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{-93} \lor \neg \left(z \leq 14500000\right):\\
\;\;\;\;\left(z \cdot z\right) \cdot \frac{0.0007936500793651 + y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -1.09999999999999998e-93 or 1.45e7 < z Initial program 86.8%
sub-neg86.8%
associate-+l+86.8%
fma-define86.9%
sub-neg86.9%
metadata-eval86.9%
+-commutative86.9%
unsub-neg86.9%
*-commutative86.9%
fma-define86.9%
fma-neg86.9%
metadata-eval86.9%
Simplified86.9%
Taylor expanded in z around inf 71.4%
associate-*r/71.4%
metadata-eval71.4%
Simplified71.4%
unpow271.4%
Applied egg-rr71.4%
Taylor expanded in x around 0 71.4%
if -1.09999999999999998e-93 < z < 1.45e7Initial program 99.4%
sub-neg99.4%
associate-+l+99.4%
fma-define99.4%
sub-neg99.4%
metadata-eval99.4%
+-commutative99.4%
unsub-neg99.4%
*-commutative99.4%
fma-define99.4%
fma-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in z around 0 93.9%
Taylor expanded in x around 0 45.0%
Final simplification60.2%
(FPCore (x y z) :precision binary64 (if (or (<= z -3600000000.0) (not (<= z 10.2))) (* (/ 0.0007936500793651 x) (* z z)) (/ 0.083333333333333 x)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -3600000000.0) || !(z <= 10.2)) {
tmp = (0.0007936500793651 / x) * (z * z);
} else {
tmp = 0.083333333333333 / x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-3600000000.0d0)) .or. (.not. (z <= 10.2d0))) then
tmp = (0.0007936500793651d0 / x) * (z * z)
else
tmp = 0.083333333333333d0 / x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -3600000000.0) || !(z <= 10.2)) {
tmp = (0.0007936500793651 / x) * (z * z);
} else {
tmp = 0.083333333333333 / x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -3600000000.0) or not (z <= 10.2): tmp = (0.0007936500793651 / x) * (z * z) else: tmp = 0.083333333333333 / x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -3600000000.0) || !(z <= 10.2)) tmp = Float64(Float64(0.0007936500793651 / x) * Float64(z * z)); else tmp = Float64(0.083333333333333 / x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -3600000000.0) || ~((z <= 10.2))) tmp = (0.0007936500793651 / x) * (z * z); else tmp = 0.083333333333333 / x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -3600000000.0], N[Not[LessEqual[z, 10.2]], $MachinePrecision]], N[(N[(0.0007936500793651 / x), $MachinePrecision] * N[(z * z), $MachinePrecision]), $MachinePrecision], N[(0.083333333333333 / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3600000000 \lor \neg \left(z \leq 10.2\right):\\
\;\;\;\;\frac{0.0007936500793651}{x} \cdot \left(z \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -3.6e9 or 10.199999999999999 < z Initial program 85.5%
sub-neg85.5%
associate-+l+85.5%
fma-define85.5%
sub-neg85.5%
metadata-eval85.5%
+-commutative85.5%
unsub-neg85.5%
*-commutative85.5%
fma-define85.5%
fma-neg85.5%
metadata-eval85.5%
Simplified85.5%
Taylor expanded in z around inf 74.7%
associate-*r/74.7%
metadata-eval74.7%
Simplified74.7%
unpow274.7%
Applied egg-rr74.7%
Taylor expanded in y around 0 48.0%
if -3.6e9 < z < 10.199999999999999Initial program 99.4%
sub-neg99.4%
associate-+l+99.4%
fma-define99.5%
sub-neg99.5%
metadata-eval99.5%
+-commutative99.5%
unsub-neg99.5%
*-commutative99.5%
fma-define99.5%
fma-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 88.8%
Taylor expanded in x around 0 41.5%
Final simplification44.9%
(FPCore (x y z) :precision binary64 (/ 0.083333333333333 x))
double code(double x, double y, double z) {
return 0.083333333333333 / x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 0.083333333333333d0 / x
end function
public static double code(double x, double y, double z) {
return 0.083333333333333 / x;
}
def code(x, y, z): return 0.083333333333333 / x
function code(x, y, z) return Float64(0.083333333333333 / x) end
function tmp = code(x, y, z) tmp = 0.083333333333333 / x; end
code[x_, y_, z_] := N[(0.083333333333333 / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.083333333333333}{x}
\end{array}
Initial program 92.1%
sub-neg92.1%
associate-+l+92.1%
fma-define92.2%
sub-neg92.2%
metadata-eval92.2%
+-commutative92.2%
unsub-neg92.2%
*-commutative92.2%
fma-define92.2%
fma-neg92.2%
metadata-eval92.2%
Simplified92.2%
Taylor expanded in z around 0 55.2%
Taylor expanded in x around 0 21.5%
(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 2024137
(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)))