
(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 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z)
:precision binary64
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
(+
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
0.083333333333333)
x)))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) + 0.083333333333333d0) / x)
end function
public static double code(double x, double y, double z) {
return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
def code(x, y, z): return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)) end
function tmp = code(x, y, z) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x); end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}
\end{array}
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
(if (<= x 3000000000000.0)
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(/ (+ 0.083333333333333 (* z t_0)) x))
(-
(+
0.91893853320467
(+ (/ 0.083333333333333 x) (+ (* z (/ t_0 x)) (* x (log x)))))
x))))
double code(double x, double y, double z) {
double t_0 = (z * (0.0007936500793651 + y)) - 0.0027777777777778;
double tmp;
if (x <= 3000000000000.0) {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * t_0)) / x);
} else {
tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * (t_0 / 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) :: t_0
real(8) :: tmp
t_0 = (z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0
if (x <= 3000000000000.0d0) then
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + ((0.083333333333333d0 + (z * t_0)) / x)
else
tmp = (0.91893853320467d0 + ((0.083333333333333d0 / x) + ((z * (t_0 / x)) + (x * log(x))))) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (z * (0.0007936500793651 + y)) - 0.0027777777777778;
double tmp;
if (x <= 3000000000000.0) {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * t_0)) / x);
} else {
tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * (t_0 / x)) + (x * Math.log(x))))) - x;
}
return tmp;
}
def code(x, y, z): t_0 = (z * (0.0007936500793651 + y)) - 0.0027777777777778 tmp = 0 if x <= 3000000000000.0: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * t_0)) / x) else: tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * (t_0 / x)) + (x * math.log(x))))) - x return tmp
function code(x, y, z) t_0 = Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778) tmp = 0.0 if (x <= 3000000000000.0) tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(Float64(0.083333333333333 + Float64(z * t_0)) / x)); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(0.083333333333333 / x) + Float64(Float64(z * Float64(t_0 / x)) + Float64(x * log(x))))) - x); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (z * (0.0007936500793651 + y)) - 0.0027777777777778; tmp = 0.0; if (x <= 3000000000000.0) tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * t_0)) / x); else tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * (t_0 / x)) + (x * log(x))))) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]}, If[LessEqual[x, 3000000000000.0], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * t$95$0), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(N[(z * N[(t$95$0 / x), $MachinePrecision]), $MachinePrecision] + N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\\
\mathbf{if}\;x \leq 3000000000000:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{0.083333333333333 + z \cdot t\_0}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(z \cdot \frac{t\_0}{x} + x \cdot \log x\right)\right)\right) - x\\
\end{array}
\end{array}
if x < 3e12Initial program 99.7%
if 3e12 < x Initial program 89.1%
associate-+l+89.1%
fmm-def89.2%
sub-neg89.2%
metadata-eval89.2%
fma-define89.2%
fmm-def89.2%
metadata-eval89.2%
Simplified89.2%
Taylor expanded in z around 0 99.6%
Taylor expanded in x around 0 98.0%
Taylor expanded in x around 0 98.0%
Taylor expanded in x around inf 98.0%
mul-1-neg98.0%
distribute-rgt-neg-in98.0%
log-rec98.0%
remove-double-neg98.0%
Simplified98.0%
Final simplification98.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(/
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
x))))
(if (<= t_0 5e+305)
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 = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
double tmp;
if (t_0 <= 5e+305) {
tmp = t_0;
} else {
tmp = (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 = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + ((0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x)
if (t_0 <= 5d+305) then
tmp = t_0
else
tmp = (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 = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
double tmp;
if (t_0 <= 5e+305) {
tmp = t_0;
} else {
tmp = (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 = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) tmp = 0 if t_0 <= 5e+305: tmp = t_0 else: tmp = (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(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x)) tmp = 0.0 if (t_0 <= 5e+305) tmp = t_0; else tmp = 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 = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x); tmp = 0.0; if (t_0 <= 5e+305) tmp = t_0; else tmp = (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[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $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]}, If[LessEqual[t$95$0, 5e+305], 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]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\\
\mathbf{if}\;t\_0 \leq 5 \cdot 10^{+305}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;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)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 x #s(literal 1/2 binary64)) (log.f64 x)) x) #s(literal 91893853320467/100000000000000 binary64)) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) x)) < 5.00000000000000009e305Initial program 97.3%
if 5.00000000000000009e305 < (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 x #s(literal 1/2 binary64)) (log.f64 x)) x) #s(literal 91893853320467/100000000000000 binary64)) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) x)) Initial program 89.1%
associate-+l+89.1%
fmm-def89.1%
sub-neg89.1%
metadata-eval89.1%
fma-define89.1%
fmm-def89.1%
metadata-eval89.1%
Simplified89.1%
Taylor expanded in x around 0 89.1%
Taylor expanded in z around 0 95.1%
Final simplification96.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 0.083333333333333 (/ 1.0 x)))
(t_1 (* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
(t_2 (* (log x) (- x 0.5))))
(if (<= t_1 -1e+91)
(- (+ 0.91893853320467 (+ t_0 (+ t_2 (* z (/ (* z y) x))))) x)
(if (<= t_1 1e+270)
(+ (+ 0.91893853320467 (- t_2 x)) (/ (+ 0.083333333333333 t_1) x))
(+
t_0
(*
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 = 0.083333333333333 * (1.0 / x);
double t_1 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778);
double t_2 = log(x) * (x - 0.5);
double tmp;
if (t_1 <= -1e+91) {
tmp = (0.91893853320467 + (t_0 + (t_2 + (z * ((z * y) / x))))) - x;
} else if (t_1 <= 1e+270) {
tmp = (0.91893853320467 + (t_2 - x)) + ((0.083333333333333 + t_1) / x);
} else {
tmp = t_0 + (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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = 0.083333333333333d0 * (1.0d0 / x)
t_1 = z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0)
t_2 = log(x) * (x - 0.5d0)
if (t_1 <= (-1d+91)) then
tmp = (0.91893853320467d0 + (t_0 + (t_2 + (z * ((z * y) / x))))) - x
else if (t_1 <= 1d+270) then
tmp = (0.91893853320467d0 + (t_2 - x)) + ((0.083333333333333d0 + t_1) / x)
else
tmp = t_0 + (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 = 0.083333333333333 * (1.0 / x);
double t_1 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778);
double t_2 = Math.log(x) * (x - 0.5);
double tmp;
if (t_1 <= -1e+91) {
tmp = (0.91893853320467 + (t_0 + (t_2 + (z * ((z * y) / x))))) - x;
} else if (t_1 <= 1e+270) {
tmp = (0.91893853320467 + (t_2 - x)) + ((0.083333333333333 + t_1) / x);
} else {
tmp = t_0 + (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x))));
}
return tmp;
}
def code(x, y, z): t_0 = 0.083333333333333 * (1.0 / x) t_1 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778) t_2 = math.log(x) * (x - 0.5) tmp = 0 if t_1 <= -1e+91: tmp = (0.91893853320467 + (t_0 + (t_2 + (z * ((z * y) / x))))) - x elif t_1 <= 1e+270: tmp = (0.91893853320467 + (t_2 - x)) + ((0.083333333333333 + t_1) / x) else: tmp = t_0 + (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) return tmp
function code(x, y, z) t_0 = Float64(0.083333333333333 * Float64(1.0 / x)) t_1 = Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778)) t_2 = Float64(log(x) * Float64(x - 0.5)) tmp = 0.0 if (t_1 <= -1e+91) tmp = Float64(Float64(0.91893853320467 + Float64(t_0 + Float64(t_2 + Float64(z * Float64(Float64(z * y) / x))))) - x); elseif (t_1 <= 1e+270) tmp = Float64(Float64(0.91893853320467 + Float64(t_2 - x)) + Float64(Float64(0.083333333333333 + t_1) / x)); else tmp = Float64(t_0 + 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 = 0.083333333333333 * (1.0 / x); t_1 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778); t_2 = log(x) * (x - 0.5); tmp = 0.0; if (t_1 <= -1e+91) tmp = (0.91893853320467 + (t_0 + (t_2 + (z * ((z * y) / x))))) - x; elseif (t_1 <= 1e+270) tmp = (0.91893853320467 + (t_2 - x)) + ((0.083333333333333 + t_1) / x); else tmp = t_0 + (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[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+91], N[(N[(0.91893853320467 + N[(t$95$0 + N[(t$95$2 + N[(z * N[(N[(z * y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision], If[LessEqual[t$95$1, 1e+270], N[(N[(0.91893853320467 + N[(t$95$2 - x), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + t$95$1), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + 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]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.083333333333333 \cdot \frac{1}{x}\\
t_1 := z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)\\
t_2 := \log x \cdot \left(x - 0.5\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+91}:\\
\;\;\;\;\left(0.91893853320467 + \left(t\_0 + \left(t\_2 + z \cdot \frac{z \cdot y}{x}\right)\right)\right) - x\\
\mathbf{elif}\;t\_1 \leq 10^{+270}:\\
\;\;\;\;\left(0.91893853320467 + \left(t\_2 - x\right)\right) + \frac{0.083333333333333 + t\_1}{x}\\
\mathbf{else}:\\
\;\;\;\;t\_0 + z \cdot \left(z \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) + 0.0027777777777778 \cdot \frac{-1}{x}\right)\\
\end{array}
\end{array}
if (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < -1.00000000000000008e91Initial program 88.9%
associate-+l+88.9%
fmm-def88.9%
sub-neg88.9%
metadata-eval88.9%
fma-define88.9%
fmm-def88.9%
metadata-eval88.9%
Simplified88.9%
Taylor expanded in z around 0 97.8%
Taylor expanded in y around inf 97.8%
if -1.00000000000000008e91 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 1e270Initial program 99.5%
if 1e270 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) Initial program 88.4%
associate-+l+88.4%
fmm-def88.4%
sub-neg88.4%
metadata-eval88.4%
fma-define88.4%
fmm-def88.4%
metadata-eval88.4%
Simplified88.4%
Taylor expanded in x around 0 88.4%
Taylor expanded in z around 0 95.6%
Final simplification98.2%
(FPCore (x y z)
:precision binary64
(if (or (<= z -1.7e+20) (not (<= z 3.5e+21)))
(+
(* 0.083333333333333 (/ 1.0 x))
(*
z
(+
(* z (+ (* 0.0007936500793651 (/ 1.0 x)) (/ y x)))
(* 0.0027777777777778 (/ -1.0 x)))))
(+
(/ 0.083333333333333 x)
(+ 0.91893853320467 (- (* (log (/ 1.0 x)) (- 0.5 x)) x)))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.7e+20) || !(z <= 3.5e+21)) {
tmp = (0.083333333333333 * (1.0 / x)) + (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x))));
} else {
tmp = (0.083333333333333 / x) + (0.91893853320467 + ((log((1.0 / x)) * (0.5 - 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 ((z <= (-1.7d+20)) .or. (.not. (z <= 3.5d+21))) then
tmp = (0.083333333333333d0 * (1.0d0 / x)) + (z * ((z * ((0.0007936500793651d0 * (1.0d0 / x)) + (y / x))) + (0.0027777777777778d0 * ((-1.0d0) / x))))
else
tmp = (0.083333333333333d0 / x) + (0.91893853320467d0 + ((log((1.0d0 / x)) * (0.5d0 - x)) - x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -1.7e+20) || !(z <= 3.5e+21)) {
tmp = (0.083333333333333 * (1.0 / x)) + (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x))));
} else {
tmp = (0.083333333333333 / x) + (0.91893853320467 + ((Math.log((1.0 / x)) * (0.5 - x)) - x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.7e+20) or not (z <= 3.5e+21): tmp = (0.083333333333333 * (1.0 / x)) + (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) else: tmp = (0.083333333333333 / x) + (0.91893853320467 + ((math.log((1.0 / x)) * (0.5 - x)) - x)) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.7e+20) || !(z <= 3.5e+21)) tmp = 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))))); else tmp = Float64(Float64(0.083333333333333 / x) + Float64(0.91893853320467 + Float64(Float64(log(Float64(1.0 / x)) * Float64(0.5 - x)) - x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -1.7e+20) || ~((z <= 3.5e+21))) tmp = (0.083333333333333 * (1.0 / x)) + (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))); else tmp = (0.083333333333333 / x) + (0.91893853320467 + ((log((1.0 / x)) * (0.5 - x)) - x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1.7e+20], N[Not[LessEqual[z, 3.5e+21]], $MachinePrecision]], 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], N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(0.91893853320467 + N[(N[(N[Log[N[(1.0 / x), $MachinePrecision]], $MachinePrecision] * N[(0.5 - x), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+20} \lor \neg \left(z \leq 3.5 \cdot 10^{+21}\right):\\
\;\;\;\;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)\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{x} + \left(0.91893853320467 + \left(\log \left(\frac{1}{x}\right) \cdot \left(0.5 - x\right) - x\right)\right)\\
\end{array}
\end{array}
if z < -1.7e20 or 3.5e21 < z Initial program 90.4%
associate-+l+90.4%
fmm-def90.4%
sub-neg90.4%
metadata-eval90.4%
fma-define90.4%
fmm-def90.4%
metadata-eval90.4%
Simplified90.4%
Taylor expanded in x around 0 83.6%
Taylor expanded in z around 0 87.9%
if -1.7e20 < z < 3.5e21Initial program 99.4%
Taylor expanded in x around inf 99.4%
Taylor expanded in z around 0 90.0%
Final simplification88.9%
(FPCore (x y z)
:precision binary64
(-
(+
0.91893853320467
(+
(/ 0.083333333333333 x)
(+
(* z (/ (- (* z (+ 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 * (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 * (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 * (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 * (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 * Float64(0.0007936500793651 + y)) - 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 * (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 * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] / x), $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 \frac{z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778}{x} + \log x \cdot \left(x - 0.5\right)\right)\right)\right) - x
\end{array}
Initial program 94.9%
associate-+l+94.9%
fmm-def94.9%
sub-neg94.9%
metadata-eval94.9%
fma-define94.9%
fmm-def94.9%
metadata-eval94.9%
Simplified94.9%
Taylor expanded in z around 0 94.5%
Taylor expanded in x around 0 98.2%
Taylor expanded in x around 0 98.2%
(FPCore (x y z)
:precision binary64
(if (or (<= z -1.05e+21) (not (<= z 3.4e+22)))
(+
(* 0.083333333333333 (/ 1.0 x))
(*
z
(+
(* z (+ (* 0.0007936500793651 (/ 1.0 x)) (/ y x)))
(* 0.0027777777777778 (/ -1.0 x)))))
(-
(+ 0.91893853320467 (+ (/ 0.083333333333333 x) (* (log x) (+ x -0.5))))
x)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.05e+21) || !(z <= 3.4e+22)) {
tmp = (0.083333333333333 * (1.0 / x)) + (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x))));
} else {
tmp = (0.91893853320467 + ((0.083333333333333 / x) + (log(x) * (x + -0.5)))) - 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.05d+21)) .or. (.not. (z <= 3.4d+22))) then
tmp = (0.083333333333333d0 * (1.0d0 / x)) + (z * ((z * ((0.0007936500793651d0 * (1.0d0 / x)) + (y / x))) + (0.0027777777777778d0 * ((-1.0d0) / x))))
else
tmp = (0.91893853320467d0 + ((0.083333333333333d0 / x) + (log(x) * (x + (-0.5d0))))) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -1.05e+21) || !(z <= 3.4e+22)) {
tmp = (0.083333333333333 * (1.0 / x)) + (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x))));
} else {
tmp = (0.91893853320467 + ((0.083333333333333 / x) + (Math.log(x) * (x + -0.5)))) - x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.05e+21) or not (z <= 3.4e+22): tmp = (0.083333333333333 * (1.0 / x)) + (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) else: tmp = (0.91893853320467 + ((0.083333333333333 / x) + (math.log(x) * (x + -0.5)))) - x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.05e+21) || !(z <= 3.4e+22)) tmp = 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))))); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(0.083333333333333 / x) + Float64(log(x) * Float64(x + -0.5)))) - x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -1.05e+21) || ~((z <= 3.4e+22))) tmp = (0.083333333333333 * (1.0 / x)) + (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))); else tmp = (0.91893853320467 + ((0.083333333333333 / x) + (log(x) * (x + -0.5)))) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1.05e+21], N[Not[LessEqual[z, 3.4e+22]], $MachinePrecision]], 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], N[(N[(0.91893853320467 + N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+21} \lor \neg \left(z \leq 3.4 \cdot 10^{+22}\right):\\
\;\;\;\;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)\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \log x \cdot \left(x + -0.5\right)\right)\right) - x\\
\end{array}
\end{array}
if z < -1.05e21 or 3.4e22 < z Initial program 90.4%
associate-+l+90.4%
fmm-def90.4%
sub-neg90.4%
metadata-eval90.4%
fma-define90.4%
fmm-def90.4%
metadata-eval90.4%
Simplified90.4%
Taylor expanded in x around 0 83.6%
Taylor expanded in z around 0 87.9%
if -1.05e21 < z < 3.4e22Initial program 99.4%
associate-+l+99.4%
fmm-def99.4%
sub-neg99.4%
metadata-eval99.4%
fma-define99.4%
fmm-def99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in z around 0 90.0%
associate-*r/90.0%
metadata-eval90.0%
sub-neg90.0%
metadata-eval90.0%
+-commutative90.0%
Simplified90.0%
Final simplification88.9%
(FPCore (x y z)
:precision binary64
(if (<= x 2.6e+82)
(/
(+
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 <= 2.6e+82) {
tmp = (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 <= 2.6d+82) then
tmp = (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 <= 2.6e+82) {
tmp = (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 <= 2.6e+82: tmp = (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 <= 2.6e+82) tmp = 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 <= 2.6e+82) tmp = (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, 2.6e+82], N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.6 \cdot 10^{+82}:\\
\;\;\;\;\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 < 2.5999999999999998e82Initial program 98.6%
associate-+l+98.6%
fmm-def98.6%
sub-neg98.6%
metadata-eval98.6%
fma-define98.6%
fmm-def98.6%
metadata-eval98.6%
Simplified98.6%
Taylor expanded in x around 0 88.5%
if 2.5999999999999998e82 < x Initial program 87.7%
associate-+l+87.7%
fmm-def87.7%
sub-neg87.7%
metadata-eval87.7%
fma-define87.7%
fmm-def87.7%
metadata-eval87.7%
Simplified87.7%
Taylor expanded in x around inf 76.9%
sub-neg76.9%
mul-1-neg76.9%
log-rec76.9%
remove-double-neg76.9%
metadata-eval76.9%
Simplified76.9%
(FPCore (x y z)
:precision binary64
(if (<= x 20000000000000.0)
(/
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
x)
(+
(* 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 tmp;
if (x <= 20000000000000.0) {
tmp = (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x;
} else {
tmp = (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) :: tmp
if (x <= 20000000000000.0d0) then
tmp = (0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x
else
tmp = (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 tmp;
if (x <= 20000000000000.0) {
tmp = (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x;
} else {
tmp = (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): tmp = 0 if x <= 20000000000000.0: tmp = (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x else: tmp = (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) tmp = 0.0 if (x <= 20000000000000.0) tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x); else tmp = 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) tmp = 0.0; if (x <= 20000000000000.0) tmp = (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x; else tmp = (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_] := If[LessEqual[x, 20000000000000.0], N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], 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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 20000000000000:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;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)\\
\end{array}
\end{array}
if x < 2e13Initial program 99.7%
associate-+l+99.8%
fmm-def99.7%
sub-neg99.7%
metadata-eval99.7%
fma-define99.7%
fmm-def99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 96.3%
if 2e13 < x Initial program 89.1%
associate-+l+89.1%
fmm-def89.1%
sub-neg89.1%
metadata-eval89.1%
fma-define89.1%
fmm-def89.1%
metadata-eval89.1%
Simplified89.1%
Taylor expanded in x around 0 29.1%
Taylor expanded in z around 0 33.9%
Final simplification67.8%
(FPCore (x y z)
:precision binary64
(if (or (<= y -21500.0) (not (<= y 2e-15)))
(/ (+ 0.083333333333333 (* z (- (* z y) 0.0027777777777778))) x)
(/
(+ 0.083333333333333 (* z (- (* z 0.0007936500793651) 0.0027777777777778)))
x)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -21500.0) || !(y <= 2e-15)) {
tmp = (0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x;
} else {
tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y <= (-21500.0d0)) .or. (.not. (y <= 2d-15))) then
tmp = (0.083333333333333d0 + (z * ((z * y) - 0.0027777777777778d0))) / x
else
tmp = (0.083333333333333d0 + (z * ((z * 0.0007936500793651d0) - 0.0027777777777778d0))) / x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -21500.0) || !(y <= 2e-15)) {
tmp = (0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x;
} else {
tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -21500.0) or not (y <= 2e-15): tmp = (0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x else: tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -21500.0) || !(y <= 2e-15)) tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * y) - 0.0027777777777778))) / x); else tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * 0.0007936500793651) - 0.0027777777777778))) / x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -21500.0) || ~((y <= 2e-15))) tmp = (0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x; else tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -21500.0], N[Not[LessEqual[y, 2e-15]], $MachinePrecision]], N[(N[(0.083333333333333 + N[(z * N[(N[(z * y), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(0.083333333333333 + N[(z * N[(N[(z * 0.0007936500793651), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -21500 \lor \neg \left(y \leq 2 \cdot 10^{-15}\right):\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot y - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot 0.0007936500793651 - 0.0027777777777778\right)}{x}\\
\end{array}
\end{array}
if y < -21500 or 2.0000000000000002e-15 < y Initial program 93.7%
associate-+l+93.7%
fmm-def93.7%
sub-neg93.7%
metadata-eval93.7%
fma-define93.7%
fmm-def93.7%
metadata-eval93.7%
Simplified93.7%
Taylor expanded in x around 0 68.3%
Taylor expanded in y around inf 68.3%
*-commutative68.3%
Simplified68.3%
if -21500 < y < 2.0000000000000002e-15Initial program 96.4%
associate-+l+96.4%
fmm-def96.4%
sub-neg96.4%
metadata-eval96.4%
fma-define96.4%
fmm-def96.4%
metadata-eval96.4%
Simplified96.4%
Taylor expanded in x around 0 62.1%
Taylor expanded in y around 0 62.1%
Final simplification65.6%
(FPCore (x y z)
:precision binary64
(if (or (<= y -21500.0) (not (<= y 1.95e+177)))
(/ (* y (* z z)) x)
(/
(+ 0.083333333333333 (* z (- (* z 0.0007936500793651) 0.0027777777777778)))
x)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -21500.0) || !(y <= 1.95e+177)) {
tmp = (y * (z * z)) / x;
} else {
tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y <= (-21500.0d0)) .or. (.not. (y <= 1.95d+177))) then
tmp = (y * (z * z)) / x
else
tmp = (0.083333333333333d0 + (z * ((z * 0.0007936500793651d0) - 0.0027777777777778d0))) / x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -21500.0) || !(y <= 1.95e+177)) {
tmp = (y * (z * z)) / x;
} else {
tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -21500.0) or not (y <= 1.95e+177): tmp = (y * (z * z)) / x else: tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -21500.0) || !(y <= 1.95e+177)) tmp = Float64(Float64(y * Float64(z * z)) / x); else tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * 0.0007936500793651) - 0.0027777777777778))) / x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -21500.0) || ~((y <= 1.95e+177))) tmp = (y * (z * z)) / x; else tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -21500.0], N[Not[LessEqual[y, 1.95e+177]], $MachinePrecision]], N[(N[(y * N[(z * z), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(0.083333333333333 + N[(z * N[(N[(z * 0.0007936500793651), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -21500 \lor \neg \left(y \leq 1.95 \cdot 10^{+177}\right):\\
\;\;\;\;\frac{y \cdot \left(z \cdot z\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot 0.0007936500793651 - 0.0027777777777778\right)}{x}\\
\end{array}
\end{array}
if y < -21500 or 1.95e177 < y Initial program 92.5%
associate-+l+92.5%
fmm-def92.5%
sub-neg92.5%
metadata-eval92.5%
fma-define92.5%
fmm-def92.5%
metadata-eval92.5%
Simplified92.5%
Taylor expanded in y around inf 58.4%
unpow258.4%
Applied egg-rr58.4%
if -21500 < y < 1.95e177Initial program 96.2%
associate-+l+96.2%
fmm-def96.3%
sub-neg96.3%
metadata-eval96.3%
fma-define96.3%
fmm-def96.3%
metadata-eval96.3%
Simplified96.3%
Taylor expanded in x around 0 62.6%
Taylor expanded in y around 0 60.3%
Final simplification59.6%
(FPCore (x y z) :precision binary64 (if (or (<= z -2.6e-57) (not (<= z 8.5e-14))) (/ (* y (* z z)) x) (/ (* z (+ (/ 0.083333333333333 z) -0.0027777777777778)) x)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -2.6e-57) || !(z <= 8.5e-14)) {
tmp = (y * (z * z)) / x;
} else {
tmp = (z * ((0.083333333333333 / z) + -0.0027777777777778)) / x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-2.6d-57)) .or. (.not. (z <= 8.5d-14))) then
tmp = (y * (z * z)) / x
else
tmp = (z * ((0.083333333333333d0 / z) + (-0.0027777777777778d0))) / x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -2.6e-57) || !(z <= 8.5e-14)) {
tmp = (y * (z * z)) / x;
} else {
tmp = (z * ((0.083333333333333 / z) + -0.0027777777777778)) / x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -2.6e-57) or not (z <= 8.5e-14): tmp = (y * (z * z)) / x else: tmp = (z * ((0.083333333333333 / z) + -0.0027777777777778)) / x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -2.6e-57) || !(z <= 8.5e-14)) tmp = Float64(Float64(y * Float64(z * z)) / x); else tmp = Float64(Float64(z * Float64(Float64(0.083333333333333 / z) + -0.0027777777777778)) / x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -2.6e-57) || ~((z <= 8.5e-14))) tmp = (y * (z * z)) / x; else tmp = (z * ((0.083333333333333 / z) + -0.0027777777777778)) / x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -2.6e-57], N[Not[LessEqual[z, 8.5e-14]], $MachinePrecision]], N[(N[(y * N[(z * z), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(z * N[(N[(0.083333333333333 / z), $MachinePrecision] + -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{-57} \lor \neg \left(z \leq 8.5 \cdot 10^{-14}\right):\\
\;\;\;\;\frac{y \cdot \left(z \cdot z\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(\frac{0.083333333333333}{z} + -0.0027777777777778\right)}{x}\\
\end{array}
\end{array}
if z < -2.59999999999999985e-57 or 8.50000000000000038e-14 < z Initial program 91.6%
associate-+l+91.6%
fmm-def91.6%
sub-neg91.6%
metadata-eval91.6%
fma-define91.6%
fmm-def91.6%
metadata-eval91.6%
Simplified91.6%
Taylor expanded in y around inf 58.7%
unpow258.7%
Applied egg-rr58.7%
if -2.59999999999999985e-57 < z < 8.50000000000000038e-14Initial program 99.4%
associate-+l+99.4%
fmm-def99.4%
sub-neg99.4%
metadata-eval99.4%
fma-define99.4%
fmm-def99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around 0 47.3%
Taylor expanded in z around 0 43.0%
*-commutative43.0%
Simplified43.0%
Taylor expanded in z around inf 43.0%
sub-neg43.0%
associate-*r/43.0%
metadata-eval43.0%
metadata-eval43.0%
Simplified43.0%
Final simplification52.1%
(FPCore (x y z) :precision binary64 (if (or (<= z -4.4e-58) (not (<= z 8.5e-14))) (/ (* y (* z z)) x) (/ 0.083333333333333 x)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -4.4e-58) || !(z <= 8.5e-14)) {
tmp = (y * (z * z)) / 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 <= (-4.4d-58)) .or. (.not. (z <= 8.5d-14))) then
tmp = (y * (z * z)) / 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 <= -4.4e-58) || !(z <= 8.5e-14)) {
tmp = (y * (z * z)) / x;
} else {
tmp = 0.083333333333333 / x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -4.4e-58) or not (z <= 8.5e-14): tmp = (y * (z * z)) / x else: tmp = 0.083333333333333 / x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -4.4e-58) || !(z <= 8.5e-14)) tmp = Float64(Float64(y * Float64(z * z)) / x); else tmp = Float64(0.083333333333333 / x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -4.4e-58) || ~((z <= 8.5e-14))) tmp = (y * (z * z)) / x; else tmp = 0.083333333333333 / x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -4.4e-58], N[Not[LessEqual[z, 8.5e-14]], $MachinePrecision]], N[(N[(y * N[(z * z), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(0.083333333333333 / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{-58} \lor \neg \left(z \leq 8.5 \cdot 10^{-14}\right):\\
\;\;\;\;\frac{y \cdot \left(z \cdot z\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -4.40000000000000011e-58 or 8.50000000000000038e-14 < z Initial program 91.6%
associate-+l+91.6%
fmm-def91.6%
sub-neg91.6%
metadata-eval91.6%
fma-define91.6%
fmm-def91.6%
metadata-eval91.6%
Simplified91.6%
Taylor expanded in y around inf 58.7%
unpow258.7%
Applied egg-rr58.7%
if -4.40000000000000011e-58 < z < 8.50000000000000038e-14Initial program 99.4%
associate-+l+99.4%
fmm-def99.4%
sub-neg99.4%
metadata-eval99.4%
fma-define99.4%
fmm-def99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around 0 47.3%
Taylor expanded in z around 0 43.0%
*-commutative43.0%
Simplified43.0%
Taylor expanded in z around 0 43.0%
Final simplification52.1%
(FPCore (x y z) :precision binary64 (if (or (<= z -1.85) (not (<= z 1.22e+63))) (* -0.0027777777777778 (/ z x)) (/ 0.083333333333333 x)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.85) || !(z <= 1.22e+63)) {
tmp = -0.0027777777777778 * (z / 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.85d0)) .or. (.not. (z <= 1.22d+63))) then
tmp = (-0.0027777777777778d0) * (z / 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.85) || !(z <= 1.22e+63)) {
tmp = -0.0027777777777778 * (z / x);
} else {
tmp = 0.083333333333333 / x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.85) or not (z <= 1.22e+63): tmp = -0.0027777777777778 * (z / x) else: tmp = 0.083333333333333 / x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.85) || !(z <= 1.22e+63)) tmp = Float64(-0.0027777777777778 * Float64(z / x)); else tmp = Float64(0.083333333333333 / x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -1.85) || ~((z <= 1.22e+63))) tmp = -0.0027777777777778 * (z / x); else tmp = 0.083333333333333 / x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1.85], N[Not[LessEqual[z, 1.22e+63]], $MachinePrecision]], N[(-0.0027777777777778 * N[(z / x), $MachinePrecision]), $MachinePrecision], N[(0.083333333333333 / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.85 \lor \neg \left(z \leq 1.22 \cdot 10^{+63}\right):\\
\;\;\;\;-0.0027777777777778 \cdot \frac{z}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -1.8500000000000001 or 1.2199999999999999e63 < z Initial program 91.5%
associate-+l+91.5%
fmm-def91.5%
sub-neg91.5%
metadata-eval91.5%
fma-define91.5%
fmm-def91.5%
metadata-eval91.5%
Simplified91.5%
Taylor expanded in x around 0 83.7%
Taylor expanded in z around 0 23.2%
*-commutative23.2%
Simplified23.2%
Taylor expanded in z around inf 23.2%
if -1.8500000000000001 < z < 1.2199999999999999e63Initial program 98.0%
associate-+l+98.0%
fmm-def98.0%
sub-neg98.0%
metadata-eval98.0%
fma-define98.0%
fmm-def98.0%
metadata-eval98.0%
Simplified98.0%
Taylor expanded in x around 0 48.9%
Taylor expanded in z around 0 36.4%
*-commutative36.4%
Simplified36.4%
Taylor expanded in z around 0 36.3%
Final simplification30.0%
(FPCore (x y z) :precision binary64 (/ (+ 0.083333333333333 (* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778))) x))
double code(double x, double y, double z) {
return (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 = (0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x
end function
public static double code(double x, double y, double z) {
return (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x;
}
def code(x, y, z): return (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x
function code(x, y, z) return Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x) end
function tmp = code(x, y, z) tmp = (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x; end
code[x_, y_, z_] := N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}
\end{array}
Initial program 94.9%
associate-+l+94.9%
fmm-def94.9%
sub-neg94.9%
metadata-eval94.9%
fma-define94.9%
fmm-def94.9%
metadata-eval94.9%
Simplified94.9%
Taylor expanded in x around 0 65.6%
(FPCore (x y z) :precision binary64 (/ 0.083333333333333 x))
double code(double x, double y, double z) {
return 0.083333333333333 / x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 0.083333333333333d0 / x
end function
public static double code(double x, double y, double z) {
return 0.083333333333333 / x;
}
def code(x, y, z): return 0.083333333333333 / x
function code(x, y, z) return Float64(0.083333333333333 / x) end
function tmp = code(x, y, z) tmp = 0.083333333333333 / x; end
code[x_, y_, z_] := N[(0.083333333333333 / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.083333333333333}{x}
\end{array}
Initial program 94.9%
associate-+l+94.9%
fmm-def94.9%
sub-neg94.9%
metadata-eval94.9%
fma-define94.9%
fmm-def94.9%
metadata-eval94.9%
Simplified94.9%
Taylor expanded in x around 0 65.6%
Taylor expanded in z around 0 30.0%
*-commutative30.0%
Simplified30.0%
Taylor expanded in z around 0 20.4%
(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 2024181
(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)))