
(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 21 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 4e-144)
(fma
(fma
(fma z (+ y 0.0007936500793651) -0.0027777777777778)
z
0.083333333333333)
(pow x -1.0)
(fma (log x) (- x 0.5) (fma -1.0 x 0.91893853320467)))
(fma
(fma (/ z x) (+ y 0.0007936500793651) (/ -0.0027777777777778 x))
z
(fma
(log x)
(- x 0.5)
(- 0.91893853320467 (- x (/ 0.083333333333333 x)))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 4e-144) {
tmp = fma(fma(fma(z, (y + 0.0007936500793651), -0.0027777777777778), z, 0.083333333333333), pow(x, -1.0), fma(log(x), (x - 0.5), fma(-1.0, x, 0.91893853320467)));
} else {
tmp = fma(fma((z / x), (y + 0.0007936500793651), (-0.0027777777777778 / x)), z, fma(log(x), (x - 0.5), (0.91893853320467 - (x - (0.083333333333333 / x)))));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 4e-144) tmp = fma(fma(fma(z, Float64(y + 0.0007936500793651), -0.0027777777777778), z, 0.083333333333333), (x ^ -1.0), fma(log(x), Float64(x - 0.5), fma(-1.0, x, 0.91893853320467))); else tmp = fma(fma(Float64(z / x), Float64(y + 0.0007936500793651), Float64(-0.0027777777777778 / x)), z, fma(log(x), Float64(x - 0.5), Float64(0.91893853320467 - Float64(x - Float64(0.083333333333333 / x))))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 4e-144], N[(N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision] + -0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] * N[Power[x, -1.0], $MachinePrecision] + N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision] + N[(-1.0 * x + 0.91893853320467), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z / x), $MachinePrecision] * N[(y + 0.0007936500793651), $MachinePrecision] + N[(-0.0027777777777778 / x), $MachinePrecision]), $MachinePrecision] * z + N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision] + N[(0.91893853320467 - N[(x - N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4 \cdot 10^{-144}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z, y + 0.0007936500793651, -0.0027777777777778\right), z, 0.083333333333333\right), {x}^{-1}, \mathsf{fma}\left(\log x, x - 0.5, \mathsf{fma}\left(-1, x, 0.91893853320467\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\frac{z}{x}, y + 0.0007936500793651, \frac{-0.0027777777777778}{x}\right), z, \mathsf{fma}\left(\log x, x - 0.5, 0.91893853320467 - \left(x - \frac{0.083333333333333}{x}\right)\right)\right)\\
\end{array}
\end{array}
if x < 3.9999999999999998e-144Initial program 99.7%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
div-invN/A
lower-fma.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift--.f64N/A
sub-negN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
metadata-evalN/A
inv-powN/A
lower-pow.f6499.7
Applied rewrites99.7%
if 3.9999999999999998e-144 < x Initial program 91.1%
Taylor expanded in x around 0
Applied rewrites69.9%
Taylor expanded in z around inf
Applied rewrites49.7%
Taylor expanded in z around 0
Applied rewrites99.6%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
(+
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
0.083333333333333)
x))))
(if (<= t_0 -5e+134)
(* (* (/ z x) y) z)
(if (<= t_0 5e+307)
(fma
(-
(fma
(fma z 0.0007936500793651 -0.0027777777777778)
z
0.083333333333333))
(/ -1.0 x)
(fma (- x 0.5) (log x) (- 0.91893853320467 x)))
(*
(/
(* (fma y y -6.298804484762296e-7) (/ z x))
(- y 0.0007936500793651))
z)))))
double code(double x, double y, double z) {
double t_0 = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
double tmp;
if (t_0 <= -5e+134) {
tmp = ((z / x) * y) * z;
} else if (t_0 <= 5e+307) {
tmp = fma(-fma(fma(z, 0.0007936500793651, -0.0027777777777778), z, 0.083333333333333), (-1.0 / x), fma((x - 0.5), log(x), (0.91893853320467 - x)));
} else {
tmp = ((fma(y, y, -6.298804484762296e-7) * (z / x)) / (y - 0.0007936500793651)) * z;
}
return tmp;
}
function code(x, y, z) t_0 = 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)) tmp = 0.0 if (t_0 <= -5e+134) tmp = Float64(Float64(Float64(z / x) * y) * z); elseif (t_0 <= 5e+307) tmp = fma(Float64(-fma(fma(z, 0.0007936500793651, -0.0027777777777778), z, 0.083333333333333)), Float64(-1.0 / x), fma(Float64(x - 0.5), log(x), Float64(0.91893853320467 - x))); else tmp = Float64(Float64(Float64(fma(y, y, -6.298804484762296e-7) * Float64(z / x)) / Float64(y - 0.0007936500793651)) * z); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = 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]}, If[LessEqual[t$95$0, -5e+134], N[(N[(N[(z / x), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t$95$0, 5e+307], N[((-N[(N[(z * 0.0007936500793651 + -0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision]) * N[(-1.0 / x), $MachinePrecision] + N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(y * y + -6.298804484762296e-7), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision] / N[(y - 0.0007936500793651), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \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}\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{+134}:\\
\;\;\;\;\left(\frac{z}{x} \cdot y\right) \cdot z\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+307}:\\
\;\;\;\;\mathsf{fma}\left(-\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0007936500793651, -0.0027777777777778\right), z, 0.083333333333333\right), \frac{-1}{x}, \mathsf{fma}\left(x - 0.5, \log x, 0.91893853320467 - x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, y, -6.298804484762296 \cdot 10^{-7}\right) \cdot \frac{z}{x}}{y - 0.0007936500793651} \cdot z\\
\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)) < -4.99999999999999981e134Initial program 84.5%
Taylor expanded in y around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6484.5
Applied rewrites84.5%
Applied rewrites87.5%
Applied rewrites87.5%
if -4.99999999999999981e134 < (+.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)) < 5e307Initial program 99.4%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
lower-fma.f6494.8
Applied rewrites94.8%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
frac-2negN/A
div-invN/A
lower-fma.f64N/A
Applied rewrites94.9%
if 5e307 < (+.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 86.3%
Taylor expanded in z around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6492.2
Applied rewrites92.2%
Applied rewrites92.3%
Final simplification93.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
(+
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
0.083333333333333)
x))))
(if (<= t_0 -5e+134)
(* (* (/ z x) y) z)
(if (<= t_0 5e+307)
(fma
(- x 0.5)
(log x)
(+
(/
(fma
(fma z 0.0007936500793651 -0.0027777777777778)
z
0.083333333333333)
x)
(- 0.91893853320467 x)))
(*
(/
(* (fma y y -6.298804484762296e-7) (/ z x))
(- y 0.0007936500793651))
z)))))
double code(double x, double y, double z) {
double t_0 = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
double tmp;
if (t_0 <= -5e+134) {
tmp = ((z / x) * y) * z;
} else if (t_0 <= 5e+307) {
tmp = fma((x - 0.5), log(x), ((fma(fma(z, 0.0007936500793651, -0.0027777777777778), z, 0.083333333333333) / x) + (0.91893853320467 - x)));
} else {
tmp = ((fma(y, y, -6.298804484762296e-7) * (z / x)) / (y - 0.0007936500793651)) * z;
}
return tmp;
}
function code(x, y, z) t_0 = 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)) tmp = 0.0 if (t_0 <= -5e+134) tmp = Float64(Float64(Float64(z / x) * y) * z); elseif (t_0 <= 5e+307) tmp = fma(Float64(x - 0.5), log(x), Float64(Float64(fma(fma(z, 0.0007936500793651, -0.0027777777777778), z, 0.083333333333333) / x) + Float64(0.91893853320467 - x))); else tmp = Float64(Float64(Float64(fma(y, y, -6.298804484762296e-7) * Float64(z / x)) / Float64(y - 0.0007936500793651)) * z); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = 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]}, If[LessEqual[t$95$0, -5e+134], N[(N[(N[(z / x), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t$95$0, 5e+307], N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + N[(N[(N[(N[(z * 0.0007936500793651 + -0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(y * y + -6.298804484762296e-7), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision] / N[(y - 0.0007936500793651), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \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}\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{+134}:\\
\;\;\;\;\left(\frac{z}{x} \cdot y\right) \cdot z\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+307}:\\
\;\;\;\;\mathsf{fma}\left(x - 0.5, \log x, \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0007936500793651, -0.0027777777777778\right), z, 0.083333333333333\right)}{x} + \left(0.91893853320467 - x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, y, -6.298804484762296 \cdot 10^{-7}\right) \cdot \frac{z}{x}}{y - 0.0007936500793651} \cdot z\\
\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)) < -4.99999999999999981e134Initial program 84.5%
Taylor expanded in y around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6484.5
Applied rewrites84.5%
Applied rewrites87.5%
Applied rewrites87.5%
if -4.99999999999999981e134 < (+.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)) < 5e307Initial program 99.4%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
lower-fma.f6494.8
Applied rewrites94.8%
lift-+.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-log.f64N/A
sub-negN/A
associate-+l+N/A
associate-+l+N/A
lift--.f64N/A
lift-log.f64N/A
lower-fma.f64N/A
Applied rewrites94.9%
if 5e307 < (+.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 86.3%
Taylor expanded in z around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6492.2
Applied rewrites92.2%
Applied rewrites92.3%
Final simplification93.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)))
(if (<= t_0 -1e+84)
(* (/ (* y z) x) z)
(if (<= t_0 1e-9)
(fma
(- x 0.5)
(log x)
(- (+ (/ 0.083333333333333 x) 0.91893853320467) x))
(if (<= t_0 5e+125)
(/
(fma
(fma (+ y 0.0007936500793651) z -0.0027777777777778)
z
0.083333333333333)
x)
(* (* (/ (/ (fma y x (* 0.0007936500793651 x)) x) x) z) z))))))
double code(double x, double y, double z) {
double t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
double tmp;
if (t_0 <= -1e+84) {
tmp = ((y * z) / x) * z;
} else if (t_0 <= 1e-9) {
tmp = fma((x - 0.5), log(x), (((0.083333333333333 / x) + 0.91893853320467) - x));
} else if (t_0 <= 5e+125) {
tmp = fma(fma((y + 0.0007936500793651), z, -0.0027777777777778), z, 0.083333333333333) / x;
} else {
tmp = (((fma(y, x, (0.0007936500793651 * x)) / x) / x) * z) * z;
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) tmp = 0.0 if (t_0 <= -1e+84) tmp = Float64(Float64(Float64(y * z) / x) * z); elseif (t_0 <= 1e-9) tmp = fma(Float64(x - 0.5), log(x), Float64(Float64(Float64(0.083333333333333 / x) + 0.91893853320467) - x)); elseif (t_0 <= 5e+125) tmp = Float64(fma(fma(Float64(y + 0.0007936500793651), z, -0.0027777777777778), z, 0.083333333333333) / x); else tmp = Float64(Float64(Float64(Float64(fma(y, x, Float64(0.0007936500793651 * x)) / x) / x) * z) * z); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[t$95$0, -1e+84], N[(N[(N[(y * z), $MachinePrecision] / x), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t$95$0, 1e-9], N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + N[(N[(N[(0.083333333333333 / x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+125], N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision], N[(N[(N[(N[(N[(y * x + N[(0.0007936500793651 * x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] / x), $MachinePrecision] * z), $MachinePrecision] * z), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{+84}:\\
\;\;\;\;\frac{y \cdot z}{x} \cdot z\\
\mathbf{elif}\;t\_0 \leq 10^{-9}:\\
\;\;\;\;\mathsf{fma}\left(x - 0.5, \log x, \left(\frac{0.083333333333333}{x} + 0.91893853320467\right) - x\right)\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+125}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), z, 0.083333333333333\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{\frac{\mathsf{fma}\left(y, x, 0.0007936500793651 \cdot x\right)}{x}}{x} \cdot z\right) \cdot z\\
\end{array}
\end{array}
if (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < -1.00000000000000006e84Initial program 85.0%
Taylor expanded in y around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6479.0
Applied rewrites79.0%
Applied rewrites81.9%
if -1.00000000000000006e84 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 1.00000000000000006e-9Initial program 99.3%
Taylor expanded in z around 0
associate-+r+N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6497.6
Applied rewrites97.6%
if 1.00000000000000006e-9 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 4.99999999999999962e125Initial program 99.6%
Taylor expanded in x around 0
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
lower-+.f6475.5
Applied rewrites75.5%
if 4.99999999999999962e125 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) Initial program 88.4%
Taylor expanded in z around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6484.9
Applied rewrites84.9%
Applied rewrites85.0%
Final simplification89.3%
(FPCore (x y z)
:precision binary64
(if (<= x 3.4e+37)
(-
(* (- (/ (fma (log x) (- x 0.5) 0.91893853320467) x) 1.0) x)
(/
(-
(* (- 0.0027777777777778 (* (+ y 0.0007936500793651) z)) z)
0.083333333333333)
x))
(fma
(fma (/ z x) (+ y 0.0007936500793651) (/ -0.0027777777777778 x))
z
(fma
(log x)
(- x 0.5)
(- 0.91893853320467 (- x (/ 0.083333333333333 x)))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 3.4e+37) {
tmp = (((fma(log(x), (x - 0.5), 0.91893853320467) / x) - 1.0) * x) - ((((0.0027777777777778 - ((y + 0.0007936500793651) * z)) * z) - 0.083333333333333) / x);
} else {
tmp = fma(fma((z / x), (y + 0.0007936500793651), (-0.0027777777777778 / x)), z, fma(log(x), (x - 0.5), (0.91893853320467 - (x - (0.083333333333333 / x)))));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 3.4e+37) tmp = Float64(Float64(Float64(Float64(fma(log(x), Float64(x - 0.5), 0.91893853320467) / x) - 1.0) * x) - Float64(Float64(Float64(Float64(0.0027777777777778 - Float64(Float64(y + 0.0007936500793651) * z)) * z) - 0.083333333333333) / x)); else tmp = fma(fma(Float64(z / x), Float64(y + 0.0007936500793651), Float64(-0.0027777777777778 / x)), z, fma(log(x), Float64(x - 0.5), Float64(0.91893853320467 - Float64(x - Float64(0.083333333333333 / x))))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 3.4e+37], N[(N[(N[(N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision] + 0.91893853320467), $MachinePrecision] / x), $MachinePrecision] - 1.0), $MachinePrecision] * x), $MachinePrecision] - N[(N[(N[(N[(0.0027777777777778 - N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision] - 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z / x), $MachinePrecision] * N[(y + 0.0007936500793651), $MachinePrecision] + N[(-0.0027777777777778 / x), $MachinePrecision]), $MachinePrecision] * z + N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision] + N[(0.91893853320467 - N[(x - N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 3.4 \cdot 10^{+37}:\\
\;\;\;\;\left(\frac{\mathsf{fma}\left(\log x, x - 0.5, 0.91893853320467\right)}{x} - 1\right) \cdot x - \frac{\left(0.0027777777777778 - \left(y + 0.0007936500793651\right) \cdot z\right) \cdot z - 0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\frac{z}{x}, y + 0.0007936500793651, \frac{-0.0027777777777778}{x}\right), z, \mathsf{fma}\left(\log x, x - 0.5, 0.91893853320467 - \left(x - \frac{0.083333333333333}{x}\right)\right)\right)\\
\end{array}
\end{array}
if x < 3.40000000000000006e37Initial program 99.6%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites99.7%
Taylor expanded in x around 0
Applied rewrites99.7%
if 3.40000000000000006e37 < x Initial program 85.3%
Taylor expanded in x around 0
Applied rewrites49.4%
Taylor expanded in z around inf
Applied rewrites33.1%
Taylor expanded in z around 0
Applied rewrites99.6%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)))
(if (<= t_0 5e+307)
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/ (+ t_0 0.083333333333333) x))
(*
(/ (* (fma y y -6.298804484762296e-7) (/ z x)) (- y 0.0007936500793651))
z))))
double code(double x, double y, double z) {
double t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
double tmp;
if (t_0 <= 5e+307) {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((t_0 + 0.083333333333333) / x);
} else {
tmp = ((fma(y, y, -6.298804484762296e-7) * (z / x)) / (y - 0.0007936500793651)) * z;
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) tmp = 0.0 if (t_0 <= 5e+307) tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(t_0 + 0.083333333333333) / x)); else tmp = Float64(Float64(Float64(fma(y, y, -6.298804484762296e-7) * Float64(z / x)) / Float64(y - 0.0007936500793651)) * z); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[t$95$0, 5e+307], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(t$95$0 + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(y * y + -6.298804484762296e-7), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision] / N[(y - 0.0007936500793651), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z\\
\mathbf{if}\;t\_0 \leq 5 \cdot 10^{+307}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{t\_0 + 0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, y, -6.298804484762296 \cdot 10^{-7}\right) \cdot \frac{z}{x}}{y - 0.0007936500793651} \cdot z\\
\end{array}
\end{array}
if (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 5e307Initial program 97.0%
if 5e307 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) Initial program 82.9%
Taylor expanded in z around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6491.9
Applied rewrites91.9%
Applied rewrites92.0%
(FPCore (x y z)
:precision binary64
(if (<= x 1.15e+96)
(-
(* (- (/ (fma (log x) (- x 0.5) 0.91893853320467) x) 1.0) x)
(/
(-
(* (- 0.0027777777777778 (* (+ y 0.0007936500793651) z)) z)
0.083333333333333)
x))
(fma
(/ (fma 0.0007936500793651 z -0.0027777777777778) x)
z
(-
(+ (fma (- x 0.5) (log x) 0.91893853320467) (/ 0.083333333333333 x))
x))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.15e+96) {
tmp = (((fma(log(x), (x - 0.5), 0.91893853320467) / x) - 1.0) * x) - ((((0.0027777777777778 - ((y + 0.0007936500793651) * z)) * z) - 0.083333333333333) / x);
} else {
tmp = fma((fma(0.0007936500793651, z, -0.0027777777777778) / x), z, ((fma((x - 0.5), log(x), 0.91893853320467) + (0.083333333333333 / x)) - x));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 1.15e+96) tmp = Float64(Float64(Float64(Float64(fma(log(x), Float64(x - 0.5), 0.91893853320467) / x) - 1.0) * x) - Float64(Float64(Float64(Float64(0.0027777777777778 - Float64(Float64(y + 0.0007936500793651) * z)) * z) - 0.083333333333333) / x)); else tmp = fma(Float64(fma(0.0007936500793651, z, -0.0027777777777778) / x), z, Float64(Float64(fma(Float64(x - 0.5), log(x), 0.91893853320467) + Float64(0.083333333333333 / x)) - x)); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 1.15e+96], N[(N[(N[(N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision] + 0.91893853320467), $MachinePrecision] / x), $MachinePrecision] - 1.0), $MachinePrecision] * x), $MachinePrecision] - N[(N[(N[(N[(0.0027777777777778 - N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision] - 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.0007936500793651 * z + -0.0027777777777778), $MachinePrecision] / x), $MachinePrecision] * z + N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.15 \cdot 10^{+96}:\\
\;\;\;\;\left(\frac{\mathsf{fma}\left(\log x, x - 0.5, 0.91893853320467\right)}{x} - 1\right) \cdot x - \frac{\left(0.0027777777777778 - \left(y + 0.0007936500793651\right) \cdot z\right) \cdot z - 0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x}, z, \left(\mathsf{fma}\left(x - 0.5, \log x, 0.91893853320467\right) + \frac{0.083333333333333}{x}\right) - x\right)\\
\end{array}
\end{array}
if x < 1.15000000000000008e96Initial program 99.6%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites99.7%
Taylor expanded in x around 0
Applied rewrites99.7%
if 1.15000000000000008e96 < x Initial program 81.8%
Taylor expanded in y around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6416.1
Applied rewrites16.1%
Taylor expanded in z around 0
Applied rewrites99.5%
Taylor expanded in y around 0
Applied rewrites90.4%
Applied rewrites90.4%
Final simplification96.6%
(FPCore (x y z)
:precision binary64
(if (<= x 8e+104)
(/
(fma
(+ (fma (- x 0.5) (log x) (- x)) 0.91893853320467)
x
(fma
(fma (+ y 0.0007936500793651) z -0.0027777777777778)
z
0.083333333333333))
x)
(fma
(/ (fma 0.0007936500793651 z -0.0027777777777778) x)
z
(-
(+ (fma (- x 0.5) (log x) 0.91893853320467) (/ 0.083333333333333 x))
x))))
double code(double x, double y, double z) {
double tmp;
if (x <= 8e+104) {
tmp = fma((fma((x - 0.5), log(x), -x) + 0.91893853320467), x, fma(fma((y + 0.0007936500793651), z, -0.0027777777777778), z, 0.083333333333333)) / x;
} else {
tmp = fma((fma(0.0007936500793651, z, -0.0027777777777778) / x), z, ((fma((x - 0.5), log(x), 0.91893853320467) + (0.083333333333333 / x)) - x));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 8e+104) tmp = Float64(fma(Float64(fma(Float64(x - 0.5), log(x), Float64(-x)) + 0.91893853320467), x, fma(fma(Float64(y + 0.0007936500793651), z, -0.0027777777777778), z, 0.083333333333333)) / x); else tmp = fma(Float64(fma(0.0007936500793651, z, -0.0027777777777778) / x), z, Float64(Float64(fma(Float64(x - 0.5), log(x), 0.91893853320467) + Float64(0.083333333333333 / x)) - x)); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 8e+104], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + (-x)), $MachinePrecision] + 0.91893853320467), $MachinePrecision] * x + N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(N[(0.0007936500793651 * z + -0.0027777777777778), $MachinePrecision] / x), $MachinePrecision] * z + N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 8 \cdot 10^{+104}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(x - 0.5, \log x, -x\right) + 0.91893853320467, x, \mathsf{fma}\left(\mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), z, 0.083333333333333\right)\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x}, z, \left(\mathsf{fma}\left(x - 0.5, \log x, 0.91893853320467\right) + \frac{0.083333333333333}{x}\right) - x\right)\\
\end{array}
\end{array}
if x < 8e104Initial program 99.6%
Taylor expanded in x around 0
Applied rewrites99.6%
if 8e104 < x Initial program 81.3%
Taylor expanded in y around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6415.2
Applied rewrites15.2%
Taylor expanded in z around 0
Applied rewrites99.5%
Taylor expanded in y around 0
Applied rewrites90.2%
Applied rewrites90.2%
Final simplification96.6%
(FPCore (x y z)
:precision binary64
(if (<= x 8e+104)
(/
(fma
(+ (fma (- x 0.5) (log x) (- x)) 0.91893853320467)
x
(fma
(fma (+ y 0.0007936500793651) z -0.0027777777777778)
z
0.083333333333333))
x)
(-
(+
(fma
(/ (fma 0.0007936500793651 z -0.0027777777777778) x)
z
0.91893853320467)
(fma (- x 0.5) (log x) (/ 0.083333333333333 x)))
x)))
double code(double x, double y, double z) {
double tmp;
if (x <= 8e+104) {
tmp = fma((fma((x - 0.5), log(x), -x) + 0.91893853320467), x, fma(fma((y + 0.0007936500793651), z, -0.0027777777777778), z, 0.083333333333333)) / x;
} else {
tmp = (fma((fma(0.0007936500793651, z, -0.0027777777777778) / x), z, 0.91893853320467) + fma((x - 0.5), log(x), (0.083333333333333 / x))) - x;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 8e+104) tmp = Float64(fma(Float64(fma(Float64(x - 0.5), log(x), Float64(-x)) + 0.91893853320467), x, fma(fma(Float64(y + 0.0007936500793651), z, -0.0027777777777778), z, 0.083333333333333)) / x); else tmp = Float64(Float64(fma(Float64(fma(0.0007936500793651, z, -0.0027777777777778) / x), z, 0.91893853320467) + fma(Float64(x - 0.5), log(x), Float64(0.083333333333333 / x))) - x); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 8e+104], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + (-x)), $MachinePrecision] + 0.91893853320467), $MachinePrecision] * x + N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(N[(N[(N[(0.0007936500793651 * z + -0.0027777777777778), $MachinePrecision] / x), $MachinePrecision] * z + 0.91893853320467), $MachinePrecision] + N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 8 \cdot 10^{+104}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(x - 0.5, \log x, -x\right) + 0.91893853320467, x, \mathsf{fma}\left(\mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), z, 0.083333333333333\right)\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(\mathsf{fma}\left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x}, z, 0.91893853320467\right) + \mathsf{fma}\left(x - 0.5, \log x, \frac{0.083333333333333}{x}\right)\right) - x\\
\end{array}
\end{array}
if x < 8e104Initial program 99.6%
Taylor expanded in x around 0
Applied rewrites99.6%
if 8e104 < x Initial program 81.3%
Taylor expanded in y around 0
lower--.f64N/A
Applied rewrites90.2%
Final simplification96.6%
(FPCore (x y z)
:precision binary64
(if (<= x 1.7e+159)
(/
(fma
(+ (fma (- x 0.5) (log x) (- x)) 0.91893853320467)
x
(fma
(fma (+ y 0.0007936500793651) z -0.0027777777777778)
z
0.083333333333333))
x)
(* (- (log x) 1.0) x)))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.7e+159) {
tmp = fma((fma((x - 0.5), log(x), -x) + 0.91893853320467), x, fma(fma((y + 0.0007936500793651), z, -0.0027777777777778), z, 0.083333333333333)) / x;
} else {
tmp = (log(x) - 1.0) * x;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 1.7e+159) tmp = Float64(fma(Float64(fma(Float64(x - 0.5), log(x), Float64(-x)) + 0.91893853320467), x, fma(fma(Float64(y + 0.0007936500793651), z, -0.0027777777777778), z, 0.083333333333333)) / x); else tmp = Float64(Float64(log(x) - 1.0) * x); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 1.7e+159], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + (-x)), $MachinePrecision] + 0.91893853320467), $MachinePrecision] * x + N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(N[Log[x], $MachinePrecision] - 1.0), $MachinePrecision] * x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.7 \cdot 10^{+159}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(x - 0.5, \log x, -x\right) + 0.91893853320467, x, \mathsf{fma}\left(\mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), z, 0.083333333333333\right)\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(\log x - 1\right) \cdot x\\
\end{array}
\end{array}
if x < 1.69999999999999996e159Initial program 97.2%
Taylor expanded in x around 0
Applied rewrites97.2%
if 1.69999999999999996e159 < x Initial program 82.7%
Taylor expanded in y around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6414.8
Applied rewrites14.8%
Taylor expanded in z around 0
Applied rewrites99.6%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
lower-log.f6482.8
Applied rewrites82.8%
Final simplification93.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- (log x) 1.0)))
(if (<= x 1.08e+17)
(/
(fma
(fma (+ y 0.0007936500793651) z -0.0027777777777778)
z
0.083333333333333)
x)
(if (<= x 8.8e+86)
(* (* (/ t_0 y) x) y)
(if (<= x 5.5e+113)
(* (* (+ (/ 0.0007936500793651 x) (/ y x)) z) z)
(* t_0 x))))))
double code(double x, double y, double z) {
double t_0 = log(x) - 1.0;
double tmp;
if (x <= 1.08e+17) {
tmp = fma(fma((y + 0.0007936500793651), z, -0.0027777777777778), z, 0.083333333333333) / x;
} else if (x <= 8.8e+86) {
tmp = ((t_0 / y) * x) * y;
} else if (x <= 5.5e+113) {
tmp = (((0.0007936500793651 / x) + (y / x)) * z) * z;
} else {
tmp = t_0 * x;
}
return tmp;
}
function code(x, y, z) t_0 = Float64(log(x) - 1.0) tmp = 0.0 if (x <= 1.08e+17) tmp = Float64(fma(fma(Float64(y + 0.0007936500793651), z, -0.0027777777777778), z, 0.083333333333333) / x); elseif (x <= 8.8e+86) tmp = Float64(Float64(Float64(t_0 / y) * x) * y); elseif (x <= 5.5e+113) tmp = Float64(Float64(Float64(Float64(0.0007936500793651 / x) + Float64(y / x)) * z) * z); else tmp = Float64(t_0 * x); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[Log[x], $MachinePrecision] - 1.0), $MachinePrecision]}, If[LessEqual[x, 1.08e+17], N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, 8.8e+86], N[(N[(N[(t$95$0 / y), $MachinePrecision] * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[x, 5.5e+113], N[(N[(N[(N[(0.0007936500793651 / x), $MachinePrecision] + N[(y / x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision] * z), $MachinePrecision], N[(t$95$0 * x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log x - 1\\
\mathbf{if}\;x \leq 1.08 \cdot 10^{+17}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), z, 0.083333333333333\right)}{x}\\
\mathbf{elif}\;x \leq 8.8 \cdot 10^{+86}:\\
\;\;\;\;\left(\frac{t\_0}{y} \cdot x\right) \cdot y\\
\mathbf{elif}\;x \leq 5.5 \cdot 10^{+113}:\\
\;\;\;\;\left(\left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) \cdot z\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot x\\
\end{array}
\end{array}
if x < 1.08e17Initial program 99.6%
Taylor expanded in x around 0
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
lower-+.f6494.2
Applied rewrites94.2%
if 1.08e17 < x < 8.80000000000000013e86Initial program 99.4%
Taylor expanded in y around -inf
Applied rewrites92.8%
Taylor expanded in x around inf
Applied rewrites72.3%
if 8.80000000000000013e86 < x < 5.5000000000000001e113Initial program 76.5%
Taylor expanded in z around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6483.5
Applied rewrites83.5%
if 5.5000000000000001e113 < x Initial program 83.5%
Taylor expanded in y around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6415.0
Applied rewrites15.0%
Taylor expanded in z around 0
Applied rewrites99.5%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
lower-log.f6481.0
Applied rewrites81.0%
Final simplification87.3%
(FPCore (x y z)
:precision binary64
(if (<= x 1.08e+17)
(/
(fma
(fma (+ y 0.0007936500793651) z -0.0027777777777778)
z
0.083333333333333)
x)
(* (- (log x) 1.0) x)))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.08e+17) {
tmp = fma(fma((y + 0.0007936500793651), z, -0.0027777777777778), z, 0.083333333333333) / x;
} else {
tmp = (log(x) - 1.0) * x;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 1.08e+17) tmp = Float64(fma(fma(Float64(y + 0.0007936500793651), z, -0.0027777777777778), z, 0.083333333333333) / x); else tmp = Float64(Float64(log(x) - 1.0) * x); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 1.08e+17], N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision], N[(N[(N[Log[x], $MachinePrecision] - 1.0), $MachinePrecision] * x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.08 \cdot 10^{+17}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), z, 0.083333333333333\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(\log x - 1\right) \cdot x\\
\end{array}
\end{array}
if x < 1.08e17Initial program 99.6%
Taylor expanded in x around 0
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
lower-+.f6494.2
Applied rewrites94.2%
if 1.08e17 < x Initial program 86.6%
Taylor expanded in y around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6419.1
Applied rewrites19.1%
Taylor expanded in z around 0
Applied rewrites99.5%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
lower-log.f6471.0
Applied rewrites71.0%
Final simplification83.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z))
(t_1 (* (/ z x) z)))
(if (<= t_0 -2e+58)
(* (* (/ z x) y) z)
(if (<= t_0 5e+77)
(/
(fma
(fma 0.0007936500793651 z -0.0027777777777778)
z
0.083333333333333)
x)
(if (<= t_0 5e+140) (* t_1 y) (* t_1 0.0007936500793651))))))
double code(double x, double y, double z) {
double t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
double t_1 = (z / x) * z;
double tmp;
if (t_0 <= -2e+58) {
tmp = ((z / x) * y) * z;
} else if (t_0 <= 5e+77) {
tmp = fma(fma(0.0007936500793651, z, -0.0027777777777778), z, 0.083333333333333) / x;
} else if (t_0 <= 5e+140) {
tmp = t_1 * y;
} else {
tmp = t_1 * 0.0007936500793651;
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) t_1 = Float64(Float64(z / x) * z) tmp = 0.0 if (t_0 <= -2e+58) tmp = Float64(Float64(Float64(z / x) * y) * z); elseif (t_0 <= 5e+77) tmp = Float64(fma(fma(0.0007936500793651, z, -0.0027777777777778), z, 0.083333333333333) / x); elseif (t_0 <= 5e+140) tmp = Float64(t_1 * y); else tmp = Float64(t_1 * 0.0007936500793651); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision]}, Block[{t$95$1 = N[(N[(z / x), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[t$95$0, -2e+58], N[(N[(N[(z / x), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t$95$0, 5e+77], N[(N[(N[(0.0007936500793651 * z + -0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[t$95$0, 5e+140], N[(t$95$1 * y), $MachinePrecision], N[(t$95$1 * 0.0007936500793651), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z\\
t_1 := \frac{z}{x} \cdot z\\
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{+58}:\\
\;\;\;\;\left(\frac{z}{x} \cdot y\right) \cdot z\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+77}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right), z, 0.083333333333333\right)}{x}\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+140}:\\
\;\;\;\;t\_1 \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot 0.0007936500793651\\
\end{array}
\end{array}
if (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < -1.99999999999999989e58Initial program 85.8%
Taylor expanded in y around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6477.3
Applied rewrites77.3%
Applied rewrites80.1%
Applied rewrites80.1%
if -1.99999999999999989e58 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 5.00000000000000004e77Initial program 99.3%
Taylor expanded in y around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f644.8
Applied rewrites4.8%
Taylor expanded in z around 0
Applied rewrites90.6%
Taylor expanded in y around 0
Applied rewrites98.5%
Taylor expanded in x around 0
Applied rewrites47.2%
if 5.00000000000000004e77 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 5.00000000000000008e140Initial program 99.6%
Taylor expanded in y around -inf
Applied rewrites68.5%
Taylor expanded in y around inf
Applied rewrites60.5%
if 5.00000000000000008e140 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) Initial program 87.6%
Taylor expanded in z around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6486.1
Applied rewrites86.1%
Taylor expanded in y around 0
Applied rewrites74.6%
Final simplification61.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)))
(if (<= t_0 -2e+58)
(* (* (/ z x) y) z)
(if (<= t_0 2e+64)
(/
(fma
(fma 0.0007936500793651 z -0.0027777777777778)
z
0.083333333333333)
x)
(* (* (/ z x) (+ y 0.0007936500793651)) z)))))
double code(double x, double y, double z) {
double t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
double tmp;
if (t_0 <= -2e+58) {
tmp = ((z / x) * y) * z;
} else if (t_0 <= 2e+64) {
tmp = fma(fma(0.0007936500793651, z, -0.0027777777777778), z, 0.083333333333333) / x;
} else {
tmp = ((z / x) * (y + 0.0007936500793651)) * z;
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) tmp = 0.0 if (t_0 <= -2e+58) tmp = Float64(Float64(Float64(z / x) * y) * z); elseif (t_0 <= 2e+64) tmp = Float64(fma(fma(0.0007936500793651, z, -0.0027777777777778), z, 0.083333333333333) / x); else tmp = Float64(Float64(Float64(z / x) * Float64(y + 0.0007936500793651)) * z); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[t$95$0, -2e+58], N[(N[(N[(z / x), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t$95$0, 2e+64], N[(N[(N[(0.0007936500793651 * z + -0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision], N[(N[(N[(z / x), $MachinePrecision] * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z\\
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{+58}:\\
\;\;\;\;\left(\frac{z}{x} \cdot y\right) \cdot z\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+64}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right), z, 0.083333333333333\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{z}{x} \cdot \left(y + 0.0007936500793651\right)\right) \cdot z\\
\end{array}
\end{array}
if (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < -1.99999999999999989e58Initial program 85.8%
Taylor expanded in y around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6477.3
Applied rewrites77.3%
Applied rewrites80.1%
Applied rewrites80.1%
if -1.99999999999999989e58 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 2.00000000000000004e64Initial program 99.3%
Taylor expanded in y around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f643.3
Applied rewrites3.3%
Taylor expanded in z around 0
Applied rewrites90.3%
Taylor expanded in y around 0
Applied rewrites99.2%
Taylor expanded in x around 0
Applied rewrites46.5%
if 2.00000000000000004e64 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) Initial program 89.9%
Taylor expanded in y around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6452.8
Applied rewrites52.8%
Taylor expanded in z around 0
Applied rewrites96.2%
Taylor expanded in z around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
distribute-rgt-inN/A
associate-*r/N/A
metadata-evalN/A
associate-*l/N/A
associate-*r/N/A
associate-*l/N/A
associate-/l*N/A
distribute-rgt-outN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f6479.6
Applied rewrites79.6%
Final simplification64.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* (+ y 0.0007936500793651) z))
(t_1 (* (- t_0 0.0027777777777778) z)))
(if (<= t_1 -2e+58)
(* (* (/ z x) y) z)
(if (<= t_1 2e+25)
(/
(fma
(fma 0.0007936500793651 z -0.0027777777777778)
z
0.083333333333333)
x)
(/ (* t_0 z) x)))))
double code(double x, double y, double z) {
double t_0 = (y + 0.0007936500793651) * z;
double t_1 = (t_0 - 0.0027777777777778) * z;
double tmp;
if (t_1 <= -2e+58) {
tmp = ((z / x) * y) * z;
} else if (t_1 <= 2e+25) {
tmp = fma(fma(0.0007936500793651, z, -0.0027777777777778), z, 0.083333333333333) / x;
} else {
tmp = (t_0 * z) / x;
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(y + 0.0007936500793651) * z) t_1 = Float64(Float64(t_0 - 0.0027777777777778) * z) tmp = 0.0 if (t_1 <= -2e+58) tmp = Float64(Float64(Float64(z / x) * y) * z); elseif (t_1 <= 2e+25) tmp = Float64(fma(fma(0.0007936500793651, z, -0.0027777777777778), z, 0.083333333333333) / x); else tmp = Float64(Float64(t_0 * z) / x); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision]}, Block[{t$95$1 = N[(N[(t$95$0 - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+58], N[(N[(N[(z / x), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t$95$1, 2e+25], N[(N[(N[(0.0007936500793651 * z + -0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision], N[(N[(t$95$0 * z), $MachinePrecision] / x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(y + 0.0007936500793651\right) \cdot z\\
t_1 := \left(t\_0 - 0.0027777777777778\right) \cdot z\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+58}:\\
\;\;\;\;\left(\frac{z}{x} \cdot y\right) \cdot z\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+25}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right), z, 0.083333333333333\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_0 \cdot z}{x}\\
\end{array}
\end{array}
if (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < -1.99999999999999989e58Initial program 85.8%
Taylor expanded in y around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6477.3
Applied rewrites77.3%
Applied rewrites80.1%
Applied rewrites80.1%
if -1.99999999999999989e58 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 2.00000000000000018e25Initial program 99.3%
Taylor expanded in y around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f642.4
Applied rewrites2.4%
Taylor expanded in z around 0
Applied rewrites90.0%
Taylor expanded in y around 0
Applied rewrites99.2%
Taylor expanded in x around 0
Applied rewrites45.6%
if 2.00000000000000018e25 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) Initial program 90.2%
Taylor expanded in x around 0
Applied rewrites81.4%
Taylor expanded in z around inf
Applied rewrites78.0%
Final simplification63.7%
(FPCore (x y z)
:precision binary64
(if (<= (+ y 0.0007936500793651) -0.01)
(* (* (/ z x) y) z)
(if (<= (+ y 0.0007936500793651) 0.00079365008)
(* (* (/ z x) 0.0007936500793651) z)
(* (* (/ y x) z) z))))
double code(double x, double y, double z) {
double tmp;
if ((y + 0.0007936500793651) <= -0.01) {
tmp = ((z / x) * y) * z;
} else if ((y + 0.0007936500793651) <= 0.00079365008) {
tmp = ((z / x) * 0.0007936500793651) * z;
} else {
tmp = ((y / 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) :: tmp
if ((y + 0.0007936500793651d0) <= (-0.01d0)) then
tmp = ((z / x) * y) * z
else if ((y + 0.0007936500793651d0) <= 0.00079365008d0) then
tmp = ((z / x) * 0.0007936500793651d0) * z
else
tmp = ((y / x) * z) * z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y + 0.0007936500793651) <= -0.01) {
tmp = ((z / x) * y) * z;
} else if ((y + 0.0007936500793651) <= 0.00079365008) {
tmp = ((z / x) * 0.0007936500793651) * z;
} else {
tmp = ((y / x) * z) * z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y + 0.0007936500793651) <= -0.01: tmp = ((z / x) * y) * z elif (y + 0.0007936500793651) <= 0.00079365008: tmp = ((z / x) * 0.0007936500793651) * z else: tmp = ((y / x) * z) * z return tmp
function code(x, y, z) tmp = 0.0 if (Float64(y + 0.0007936500793651) <= -0.01) tmp = Float64(Float64(Float64(z / x) * y) * z); elseif (Float64(y + 0.0007936500793651) <= 0.00079365008) tmp = Float64(Float64(Float64(z / x) * 0.0007936500793651) * z); else tmp = Float64(Float64(Float64(y / x) * z) * z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y + 0.0007936500793651) <= -0.01) tmp = ((z / x) * y) * z; elseif ((y + 0.0007936500793651) <= 0.00079365008) tmp = ((z / x) * 0.0007936500793651) * z; else tmp = ((y / x) * z) * z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[N[(y + 0.0007936500793651), $MachinePrecision], -0.01], N[(N[(N[(z / x), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[N[(y + 0.0007936500793651), $MachinePrecision], 0.00079365008], N[(N[(N[(z / x), $MachinePrecision] * 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision], N[(N[(N[(y / x), $MachinePrecision] * z), $MachinePrecision] * z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y + 0.0007936500793651 \leq -0.01:\\
\;\;\;\;\left(\frac{z}{x} \cdot y\right) \cdot z\\
\mathbf{elif}\;y + 0.0007936500793651 \leq 0.00079365008:\\
\;\;\;\;\left(\frac{z}{x} \cdot 0.0007936500793651\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{y}{x} \cdot z\right) \cdot z\\
\end{array}
\end{array}
if (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) < -0.0100000000000000002Initial program 91.3%
Taylor expanded in y around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6446.6
Applied rewrites46.6%
Applied rewrites48.0%
Applied rewrites48.1%
if -0.0100000000000000002 < (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) < 7.9365008000000003e-4Initial program 93.1%
Taylor expanded in z around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6440.5
Applied rewrites40.5%
Taylor expanded in y around 0
Applied rewrites40.5%
if 7.9365008000000003e-4 < (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) Initial program 96.9%
Taylor expanded in y around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6458.5
Applied rewrites58.5%
Applied rewrites54.7%
Final simplification46.0%
(FPCore (x y z)
:precision binary64
(if (<= (+ y 0.0007936500793651) -0.01)
(* (* (/ z x) y) z)
(if (<= (+ y 0.0007936500793651) 0.00079365008)
(* (* (/ z x) z) 0.0007936500793651)
(* (* (/ y x) z) z))))
double code(double x, double y, double z) {
double tmp;
if ((y + 0.0007936500793651) <= -0.01) {
tmp = ((z / x) * y) * z;
} else if ((y + 0.0007936500793651) <= 0.00079365008) {
tmp = ((z / x) * z) * 0.0007936500793651;
} else {
tmp = ((y / 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) :: tmp
if ((y + 0.0007936500793651d0) <= (-0.01d0)) then
tmp = ((z / x) * y) * z
else if ((y + 0.0007936500793651d0) <= 0.00079365008d0) then
tmp = ((z / x) * z) * 0.0007936500793651d0
else
tmp = ((y / x) * z) * z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y + 0.0007936500793651) <= -0.01) {
tmp = ((z / x) * y) * z;
} else if ((y + 0.0007936500793651) <= 0.00079365008) {
tmp = ((z / x) * z) * 0.0007936500793651;
} else {
tmp = ((y / x) * z) * z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y + 0.0007936500793651) <= -0.01: tmp = ((z / x) * y) * z elif (y + 0.0007936500793651) <= 0.00079365008: tmp = ((z / x) * z) * 0.0007936500793651 else: tmp = ((y / x) * z) * z return tmp
function code(x, y, z) tmp = 0.0 if (Float64(y + 0.0007936500793651) <= -0.01) tmp = Float64(Float64(Float64(z / x) * y) * z); elseif (Float64(y + 0.0007936500793651) <= 0.00079365008) tmp = Float64(Float64(Float64(z / x) * z) * 0.0007936500793651); else tmp = Float64(Float64(Float64(y / x) * z) * z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y + 0.0007936500793651) <= -0.01) tmp = ((z / x) * y) * z; elseif ((y + 0.0007936500793651) <= 0.00079365008) tmp = ((z / x) * z) * 0.0007936500793651; else tmp = ((y / x) * z) * z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[N[(y + 0.0007936500793651), $MachinePrecision], -0.01], N[(N[(N[(z / x), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[N[(y + 0.0007936500793651), $MachinePrecision], 0.00079365008], N[(N[(N[(z / x), $MachinePrecision] * z), $MachinePrecision] * 0.0007936500793651), $MachinePrecision], N[(N[(N[(y / x), $MachinePrecision] * z), $MachinePrecision] * z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y + 0.0007936500793651 \leq -0.01:\\
\;\;\;\;\left(\frac{z}{x} \cdot y\right) \cdot z\\
\mathbf{elif}\;y + 0.0007936500793651 \leq 0.00079365008:\\
\;\;\;\;\left(\frac{z}{x} \cdot z\right) \cdot 0.0007936500793651\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{y}{x} \cdot z\right) \cdot z\\
\end{array}
\end{array}
if (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) < -0.0100000000000000002Initial program 91.3%
Taylor expanded in y around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6446.6
Applied rewrites46.6%
Applied rewrites48.0%
Applied rewrites48.1%
if -0.0100000000000000002 < (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) < 7.9365008000000003e-4Initial program 93.1%
Taylor expanded in z around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6440.5
Applied rewrites40.5%
Taylor expanded in y around 0
Applied rewrites40.3%
if 7.9365008000000003e-4 < (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) Initial program 96.9%
Taylor expanded in y around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6458.5
Applied rewrites58.5%
Applied rewrites54.7%
Final simplification45.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* (* (/ z x) y) z)))
(if (<= (+ y 0.0007936500793651) -0.01)
t_0
(if (<= (+ y 0.0007936500793651) 0.00079365008)
(* (* (/ z x) z) 0.0007936500793651)
t_0))))
double code(double x, double y, double z) {
double t_0 = ((z / x) * y) * z;
double tmp;
if ((y + 0.0007936500793651) <= -0.01) {
tmp = t_0;
} else if ((y + 0.0007936500793651) <= 0.00079365008) {
tmp = ((z / x) * z) * 0.0007936500793651;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = ((z / x) * y) * z
if ((y + 0.0007936500793651d0) <= (-0.01d0)) then
tmp = t_0
else if ((y + 0.0007936500793651d0) <= 0.00079365008d0) then
tmp = ((z / x) * z) * 0.0007936500793651d0
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((z / x) * y) * z;
double tmp;
if ((y + 0.0007936500793651) <= -0.01) {
tmp = t_0;
} else if ((y + 0.0007936500793651) <= 0.00079365008) {
tmp = ((z / x) * z) * 0.0007936500793651;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = ((z / x) * y) * z tmp = 0 if (y + 0.0007936500793651) <= -0.01: tmp = t_0 elif (y + 0.0007936500793651) <= 0.00079365008: tmp = ((z / x) * z) * 0.0007936500793651 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(z / x) * y) * z) tmp = 0.0 if (Float64(y + 0.0007936500793651) <= -0.01) tmp = t_0; elseif (Float64(y + 0.0007936500793651) <= 0.00079365008) tmp = Float64(Float64(Float64(z / x) * z) * 0.0007936500793651); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((z / x) * y) * z; tmp = 0.0; if ((y + 0.0007936500793651) <= -0.01) tmp = t_0; elseif ((y + 0.0007936500793651) <= 0.00079365008) tmp = ((z / x) * z) * 0.0007936500793651; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(z / x), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[N[(y + 0.0007936500793651), $MachinePrecision], -0.01], t$95$0, If[LessEqual[N[(y + 0.0007936500793651), $MachinePrecision], 0.00079365008], N[(N[(N[(z / x), $MachinePrecision] * z), $MachinePrecision] * 0.0007936500793651), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\frac{z}{x} \cdot y\right) \cdot z\\
\mathbf{if}\;y + 0.0007936500793651 \leq -0.01:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y + 0.0007936500793651 \leq 0.00079365008:\\
\;\;\;\;\left(\frac{z}{x} \cdot z\right) \cdot 0.0007936500793651\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) < -0.0100000000000000002 or 7.9365008000000003e-4 < (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) Initial program 94.3%
Taylor expanded in y around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6453.0
Applied rewrites53.0%
Applied rewrites51.6%
Applied rewrites51.6%
if -0.0100000000000000002 < (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) < 7.9365008000000003e-4Initial program 93.1%
Taylor expanded in z around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6440.5
Applied rewrites40.5%
Taylor expanded in y around 0
Applied rewrites40.3%
Final simplification45.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* (* (/ z x) z) y)))
(if (<= y -0.0008)
t_0
(if (<= y 3.4e-12) (* (* (/ z x) 0.0007936500793651) z) t_0))))
double code(double x, double y, double z) {
double t_0 = ((z / x) * z) * y;
double tmp;
if (y <= -0.0008) {
tmp = t_0;
} else if (y <= 3.4e-12) {
tmp = ((z / x) * 0.0007936500793651) * z;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = ((z / x) * z) * y
if (y <= (-0.0008d0)) then
tmp = t_0
else if (y <= 3.4d-12) then
tmp = ((z / x) * 0.0007936500793651d0) * z
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((z / x) * z) * y;
double tmp;
if (y <= -0.0008) {
tmp = t_0;
} else if (y <= 3.4e-12) {
tmp = ((z / x) * 0.0007936500793651) * z;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = ((z / x) * z) * y tmp = 0 if y <= -0.0008: tmp = t_0 elif y <= 3.4e-12: tmp = ((z / x) * 0.0007936500793651) * z else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(z / x) * z) * y) tmp = 0.0 if (y <= -0.0008) tmp = t_0; elseif (y <= 3.4e-12) tmp = Float64(Float64(Float64(z / x) * 0.0007936500793651) * z); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((z / x) * z) * y; tmp = 0.0; if (y <= -0.0008) tmp = t_0; elseif (y <= 3.4e-12) tmp = ((z / x) * 0.0007936500793651) * z; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(z / x), $MachinePrecision] * z), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -0.0008], t$95$0, If[LessEqual[y, 3.4e-12], N[(N[(N[(z / x), $MachinePrecision] * 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\frac{z}{x} \cdot z\right) \cdot y\\
\mathbf{if}\;y \leq -0.0008:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{-12}:\\
\;\;\;\;\left(\frac{z}{x} \cdot 0.0007936500793651\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -8.00000000000000038e-4 or 3.4000000000000001e-12 < y Initial program 94.3%
Taylor expanded in y around -inf
Applied rewrites85.6%
Taylor expanded in y around inf
Applied rewrites54.4%
if -8.00000000000000038e-4 < y < 3.4000000000000001e-12Initial program 93.1%
Taylor expanded in z around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6440.5
Applied rewrites40.5%
Taylor expanded in y around 0
Applied rewrites40.5%
Final simplification47.4%
(FPCore (x y z)
:precision binary64
(if (<= x 1.26e+104)
(/
(fma
(fma (+ y 0.0007936500793651) z -0.0027777777777778)
z
0.083333333333333)
x)
(* (/ (* (+ y 0.0007936500793651) z) x) z)))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.26e+104) {
tmp = fma(fma((y + 0.0007936500793651), z, -0.0027777777777778), z, 0.083333333333333) / x;
} else {
tmp = (((y + 0.0007936500793651) * z) / x) * z;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 1.26e+104) tmp = Float64(fma(fma(Float64(y + 0.0007936500793651), z, -0.0027777777777778), z, 0.083333333333333) / x); else tmp = Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) / x) * z); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 1.26e+104], N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision], N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] / x), $MachinePrecision] * z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.26 \cdot 10^{+104}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), z, 0.083333333333333\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(y + 0.0007936500793651\right) \cdot z}{x} \cdot z\\
\end{array}
\end{array}
if x < 1.25999999999999994e104Initial program 99.6%
Taylor expanded in x around 0
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
lower-+.f6485.0
Applied rewrites85.0%
if 1.25999999999999994e104 < x Initial program 81.3%
Taylor expanded in z around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6425.9
Applied rewrites25.9%
Applied rewrites25.9%
Final simplification65.8%
(FPCore (x y z) :precision binary64 (* (* (/ z x) z) 0.0007936500793651))
double code(double x, double y, double z) {
return ((z / x) * z) * 0.0007936500793651;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((z / x) * z) * 0.0007936500793651d0
end function
public static double code(double x, double y, double z) {
return ((z / x) * z) * 0.0007936500793651;
}
def code(x, y, z): return ((z / x) * z) * 0.0007936500793651
function code(x, y, z) return Float64(Float64(Float64(z / x) * z) * 0.0007936500793651) end
function tmp = code(x, y, z) tmp = ((z / x) * z) * 0.0007936500793651; end
code[x_, y_, z_] := N[(N[(N[(z / x), $MachinePrecision] * z), $MachinePrecision] * 0.0007936500793651), $MachinePrecision]
\begin{array}{l}
\\
\left(\frac{z}{x} \cdot z\right) \cdot 0.0007936500793651
\end{array}
Initial program 93.7%
Taylor expanded in z around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6446.0
Applied rewrites46.0%
Taylor expanded in y around 0
Applied rewrites29.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 2024285
(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)))