
(FPCore (x y z t a b) :precision binary64 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (((x + y) + z) - (z * log(t))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return (((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 23 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (((x + y) + z) - (z * log(t))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return (((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\end{array}
(FPCore (x y z t a b) :precision binary64 (+ (+ z (- (+ x y) (* z (log t)))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return (z + ((x + y) - (z * log(t)))) + ((a - 0.5) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (z + ((x + y) - (z * log(t)))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (z + ((x + y) - (z * Math.log(t)))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return (z + ((x + y) - (z * math.log(t)))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(z + Float64(Float64(x + y) - Float64(z * log(t)))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = (z + ((x + y) - (z * log(t)))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(z + N[(N[(x + y), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(z + \left(\left(x + y\right) - z \cdot \log t\right)\right) + \left(a - 0.5\right) \cdot b
\end{array}
Initial program 99.9%
+-commutativeN/A
associate--l+N/A
+-lowering-+.f64N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f6499.9
Applied egg-rr99.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* (- a 0.5) b) (- (+ z (+ x y)) (* z (log t))))))
(if (<= t_1 -2e+305)
(* a b)
(if (<= t_1 -2e-151)
(fma b -0.5 x)
(if (<= t_1 1e+306) (fma b -0.5 y) (fma b a x))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((a - 0.5) * b) + ((z + (x + y)) - (z * log(t)));
double tmp;
if (t_1 <= -2e+305) {
tmp = a * b;
} else if (t_1 <= -2e-151) {
tmp = fma(b, -0.5, x);
} else if (t_1 <= 1e+306) {
tmp = fma(b, -0.5, y);
} else {
tmp = fma(b, a, x);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(a - 0.5) * b) + Float64(Float64(z + Float64(x + y)) - Float64(z * log(t)))) tmp = 0.0 if (t_1 <= -2e+305) tmp = Float64(a * b); elseif (t_1 <= -2e-151) tmp = fma(b, -0.5, x); elseif (t_1 <= 1e+306) tmp = fma(b, -0.5, y); else tmp = fma(b, a, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision] + N[(N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+305], N[(a * b), $MachinePrecision], If[LessEqual[t$95$1, -2e-151], N[(b * -0.5 + x), $MachinePrecision], If[LessEqual[t$95$1, 1e+306], N[(b * -0.5 + y), $MachinePrecision], N[(b * a + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a - 0.5\right) \cdot b + \left(\left(z + \left(x + y\right)\right) - z \cdot \log t\right)\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+305}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-151}:\\
\;\;\;\;\mathsf{fma}\left(b, -0.5, x\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+306}:\\
\;\;\;\;\mathsf{fma}\left(b, -0.5, y\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b, a, x\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)) < -1.9999999999999999e305Initial program 100.0%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f64100.0
Simplified100.0%
if -1.9999999999999999e305 < (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)) < -1.9999999999999999e-151Initial program 99.8%
Taylor expanded in x around inf
Simplified55.4%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6442.8
Simplified42.8%
if -1.9999999999999999e-151 < (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)) < 1.00000000000000002e306Initial program 99.9%
Taylor expanded in y around inf
Simplified49.8%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6437.4
Simplified37.4%
if 1.00000000000000002e306 < (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)) Initial program 100.0%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f64100.0
Simplified100.0%
Taylor expanded in z around 0
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
+-lowering-+.f6494.2
Simplified94.2%
Taylor expanded in x around inf
Simplified94.2%
Final simplification47.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* (- a 0.5) b) (- (+ z (+ x y)) (* z (log t))))))
(if (<= t_1 -2e+305)
(* a b)
(if (<= t_1 -2e-151)
(fma b -0.5 x)
(if (<= t_1 1e+306) (fma b -0.5 y) (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((a - 0.5) * b) + ((z + (x + y)) - (z * log(t)));
double tmp;
if (t_1 <= -2e+305) {
tmp = a * b;
} else if (t_1 <= -2e-151) {
tmp = fma(b, -0.5, x);
} else if (t_1 <= 1e+306) {
tmp = fma(b, -0.5, y);
} else {
tmp = a * b;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(a - 0.5) * b) + Float64(Float64(z + Float64(x + y)) - Float64(z * log(t)))) tmp = 0.0 if (t_1 <= -2e+305) tmp = Float64(a * b); elseif (t_1 <= -2e-151) tmp = fma(b, -0.5, x); elseif (t_1 <= 1e+306) tmp = fma(b, -0.5, y); else tmp = Float64(a * b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision] + N[(N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+305], N[(a * b), $MachinePrecision], If[LessEqual[t$95$1, -2e-151], N[(b * -0.5 + x), $MachinePrecision], If[LessEqual[t$95$1, 1e+306], N[(b * -0.5 + y), $MachinePrecision], N[(a * b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a - 0.5\right) \cdot b + \left(\left(z + \left(x + y\right)\right) - z \cdot \log t\right)\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+305}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-151}:\\
\;\;\;\;\mathsf{fma}\left(b, -0.5, x\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+306}:\\
\;\;\;\;\mathsf{fma}\left(b, -0.5, y\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)) < -1.9999999999999999e305 or 1.00000000000000002e306 < (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)) Initial program 100.0%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f6496.9
Simplified96.9%
if -1.9999999999999999e305 < (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)) < -1.9999999999999999e-151Initial program 99.8%
Taylor expanded in x around inf
Simplified55.4%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6442.8
Simplified42.8%
if -1.9999999999999999e-151 < (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)) < 1.00000000000000002e306Initial program 99.9%
Taylor expanded in y around inf
Simplified49.8%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6437.4
Simplified37.4%
Final simplification47.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* (- a 0.5) b) (- (+ z (+ x y)) (* z (log t))))))
(if (<= t_1 -2e+305)
(* a b)
(if (<= t_1 1e-21) (fma b -0.5 x) (if (<= t_1 2e+303) (+ z y) (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((a - 0.5) * b) + ((z + (x + y)) - (z * log(t)));
double tmp;
if (t_1 <= -2e+305) {
tmp = a * b;
} else if (t_1 <= 1e-21) {
tmp = fma(b, -0.5, x);
} else if (t_1 <= 2e+303) {
tmp = z + y;
} else {
tmp = a * b;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(a - 0.5) * b) + Float64(Float64(z + Float64(x + y)) - Float64(z * log(t)))) tmp = 0.0 if (t_1 <= -2e+305) tmp = Float64(a * b); elseif (t_1 <= 1e-21) tmp = fma(b, -0.5, x); elseif (t_1 <= 2e+303) tmp = Float64(z + y); else tmp = Float64(a * b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision] + N[(N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+305], N[(a * b), $MachinePrecision], If[LessEqual[t$95$1, 1e-21], N[(b * -0.5 + x), $MachinePrecision], If[LessEqual[t$95$1, 2e+303], N[(z + y), $MachinePrecision], N[(a * b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a - 0.5\right) \cdot b + \left(\left(z + \left(x + y\right)\right) - z \cdot \log t\right)\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+305}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;t\_1 \leq 10^{-21}:\\
\;\;\;\;\mathsf{fma}\left(b, -0.5, x\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+303}:\\
\;\;\;\;z + y\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)) < -1.9999999999999999e305 or 2e303 < (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)) Initial program 100.0%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f6494.2
Simplified94.2%
if -1.9999999999999999e305 < (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)) < 9.99999999999999908e-22Initial program 99.8%
Taylor expanded in x around inf
Simplified56.5%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6443.1
Simplified43.1%
if 9.99999999999999908e-22 < (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)) < 2e303Initial program 99.9%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f6490.2
Simplified90.2%
+-commutativeN/A
+-commutativeN/A
associate-+r-N/A
+-commutativeN/A
associate-+r+N/A
+-lowering-+.f64N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f6490.2
Applied egg-rr90.2%
Taylor expanded in y around inf
Simplified28.1%
Final simplification43.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* (- a 0.5) b) (- (+ z (+ x y)) (* z (log t))))))
(if (<= t_1 -2e+305)
(* a b)
(if (<= t_1 20.0) (fma b -0.5 x) (fma b a y)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((a - 0.5) * b) + ((z + (x + y)) - (z * log(t)));
double tmp;
if (t_1 <= -2e+305) {
tmp = a * b;
} else if (t_1 <= 20.0) {
tmp = fma(b, -0.5, x);
} else {
tmp = fma(b, a, y);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(a - 0.5) * b) + Float64(Float64(z + Float64(x + y)) - Float64(z * log(t)))) tmp = 0.0 if (t_1 <= -2e+305) tmp = Float64(a * b); elseif (t_1 <= 20.0) tmp = fma(b, -0.5, x); else tmp = fma(b, a, y); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision] + N[(N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+305], N[(a * b), $MachinePrecision], If[LessEqual[t$95$1, 20.0], N[(b * -0.5 + x), $MachinePrecision], N[(b * a + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a - 0.5\right) \cdot b + \left(\left(z + \left(x + y\right)\right) - z \cdot \log t\right)\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+305}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;t\_1 \leq 20:\\
\;\;\;\;\mathsf{fma}\left(b, -0.5, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b, a, y\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)) < -1.9999999999999999e305Initial program 100.0%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f64100.0
Simplified100.0%
if -1.9999999999999999e305 < (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)) < 20Initial program 99.8%
Taylor expanded in x around inf
Simplified55.1%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6442.1
Simplified42.1%
if 20 < (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)) Initial program 99.9%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f6490.7
Simplified90.7%
Taylor expanded in z around 0
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
+-lowering-+.f6470.7
Simplified70.7%
Taylor expanded in x around 0
Simplified46.8%
Final simplification47.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- a 0.5) b)) (t_2 (+ y (fma b (+ a -0.5) x))))
(if (<= t_1 -6e+111)
t_2
(if (<= t_1 2e+141) (+ z (+ x (fma z (- 0.0 (log t)) y))) t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - 0.5) * b;
double t_2 = y + fma(b, (a + -0.5), x);
double tmp;
if (t_1 <= -6e+111) {
tmp = t_2;
} else if (t_1 <= 2e+141) {
tmp = z + (x + fma(z, (0.0 - log(t)), y));
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a - 0.5) * b) t_2 = Float64(y + fma(b, Float64(a + -0.5), x)) tmp = 0.0 if (t_1 <= -6e+111) tmp = t_2; elseif (t_1 <= 2e+141) tmp = Float64(z + Float64(x + fma(z, Float64(0.0 - log(t)), y))); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(b * N[(a + -0.5), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -6e+111], t$95$2, If[LessEqual[t$95$1, 2e+141], N[(z + N[(x + N[(z * N[(0.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a - 0.5\right) \cdot b\\
t_2 := y + \mathsf{fma}\left(b, a + -0.5, x\right)\\
\mathbf{if}\;t\_1 \leq -6 \cdot 10^{+111}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+141}:\\
\;\;\;\;z + \left(x + \mathsf{fma}\left(z, 0 - \log t, y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -6e111 or 2.00000000000000003e141 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) Initial program 99.9%
Taylor expanded in z around 0
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6492.2
Simplified92.2%
if -6e111 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 2.00000000000000003e141Initial program 99.9%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f6495.4
Simplified95.4%
+-commutativeN/A
+-commutativeN/A
associate-+r-N/A
+-commutativeN/A
associate-+r+N/A
+-lowering-+.f64N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f6495.4
Applied egg-rr95.4%
Taylor expanded in a around 0
associate--l+N/A
+-lowering-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
log-recN/A
accelerator-lowering-fma.f64N/A
log-recN/A
neg-sub0N/A
--lowering--.f64N/A
log-lowering-log.f6490.4
Simplified90.4%
Final simplification91.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- a 0.5) b)) (t_2 (+ y (fma b (+ a -0.5) x))))
(if (<= t_1 -6e+111)
t_2
(if (<= t_1 2e+141) (fma z (- 1.0 (log t)) (+ x y)) t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - 0.5) * b;
double t_2 = y + fma(b, (a + -0.5), x);
double tmp;
if (t_1 <= -6e+111) {
tmp = t_2;
} else if (t_1 <= 2e+141) {
tmp = fma(z, (1.0 - log(t)), (x + y));
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a - 0.5) * b) t_2 = Float64(y + fma(b, Float64(a + -0.5), x)) tmp = 0.0 if (t_1 <= -6e+111) tmp = t_2; elseif (t_1 <= 2e+141) tmp = fma(z, Float64(1.0 - log(t)), Float64(x + y)); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(b * N[(a + -0.5), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -6e+111], t$95$2, If[LessEqual[t$95$1, 2e+141], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a - 0.5\right) \cdot b\\
t_2 := y + \mathsf{fma}\left(b, a + -0.5, x\right)\\
\mathbf{if}\;t\_1 \leq -6 \cdot 10^{+111}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+141}:\\
\;\;\;\;\mathsf{fma}\left(z, 1 - \log t, x + y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -6e111 or 2.00000000000000003e141 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) Initial program 99.9%
Taylor expanded in z around 0
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6492.2
Simplified92.2%
if -6e111 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 2.00000000000000003e141Initial program 99.9%
Taylor expanded in b around 0
cancel-sign-sub-invN/A
associate-+r+N/A
associate-+l+N/A
cancel-sign-sub-invN/A
*-rgt-identityN/A
distribute-lft-out--N/A
+-commutativeN/A
sub-negN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f6490.4
Simplified90.4%
Final simplification91.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma z (- 1.0 (log t)) y)))
(if (<= (- a 0.5) -5000000000000.0)
(+ y (fma b (+ a -0.5) x))
(if (<= (- a 0.5) 1e+38) (+ x (fma b -0.5 t_1)) (fma b a t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(z, (1.0 - log(t)), y);
double tmp;
if ((a - 0.5) <= -5000000000000.0) {
tmp = y + fma(b, (a + -0.5), x);
} else if ((a - 0.5) <= 1e+38) {
tmp = x + fma(b, -0.5, t_1);
} else {
tmp = fma(b, a, t_1);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(z, Float64(1.0 - log(t)), y) tmp = 0.0 if (Float64(a - 0.5) <= -5000000000000.0) tmp = Float64(y + fma(b, Float64(a + -0.5), x)); elseif (Float64(a - 0.5) <= 1e+38) tmp = Float64(x + fma(b, -0.5, t_1)); else tmp = fma(b, a, t_1); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[N[(a - 0.5), $MachinePrecision], -5000000000000.0], N[(y + N[(b * N[(a + -0.5), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a - 0.5), $MachinePrecision], 1e+38], N[(x + N[(b * -0.5 + t$95$1), $MachinePrecision]), $MachinePrecision], N[(b * a + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, 1 - \log t, y\right)\\
\mathbf{if}\;a - 0.5 \leq -5000000000000:\\
\;\;\;\;y + \mathsf{fma}\left(b, a + -0.5, x\right)\\
\mathbf{elif}\;a - 0.5 \leq 10^{+38}:\\
\;\;\;\;x + \mathsf{fma}\left(b, -0.5, t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b, a, t\_1\right)\\
\end{array}
\end{array}
if (-.f64 a #s(literal 1/2 binary64)) < -5e12Initial program 99.9%
Taylor expanded in z around 0
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6486.4
Simplified86.4%
if -5e12 < (-.f64 a #s(literal 1/2 binary64)) < 9.99999999999999977e37Initial program 99.8%
Taylor expanded in a around 0
associate--l+N/A
+-lowering-+.f64N/A
associate-+r+N/A
+-commutativeN/A
remove-double-negN/A
log-recN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
associate--l+N/A
*-commutativeN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
log-recN/A
remove-double-negN/A
accelerator-lowering-fma.f64N/A
cancel-sign-sub-invN/A
associate-+l+N/A
cancel-sign-sub-invN/A
Simplified98.3%
if 9.99999999999999977e37 < (-.f64 a #s(literal 1/2 binary64)) Initial program 100.0%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f64100.0
Simplified100.0%
Taylor expanded in x around 0
sub-negN/A
+-commutativeN/A
associate-+r+N/A
associate-+r+N/A
sub-negN/A
*-rgt-identityN/A
distribute-lft-out--N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
log-lowering-log.f6484.6
Simplified84.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- 1.0 (log t))))
(if (<= (+ x y) -1e+107)
(+ (* (- a 0.5) b) (+ z x))
(if (<= (+ x y) 1e+16)
(fma z t_1 (* b (+ a -0.5)))
(fma b a (fma z t_1 y))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 - log(t);
double tmp;
if ((x + y) <= -1e+107) {
tmp = ((a - 0.5) * b) + (z + x);
} else if ((x + y) <= 1e+16) {
tmp = fma(z, t_1, (b * (a + -0.5)));
} else {
tmp = fma(b, a, fma(z, t_1, y));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(1.0 - log(t)) tmp = 0.0 if (Float64(x + y) <= -1e+107) tmp = Float64(Float64(Float64(a - 0.5) * b) + Float64(z + x)); elseif (Float64(x + y) <= 1e+16) tmp = fma(z, t_1, Float64(b * Float64(a + -0.5))); else tmp = fma(b, a, fma(z, t_1, y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x + y), $MachinePrecision], -1e+107], N[(N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision] + N[(z + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x + y), $MachinePrecision], 1e+16], N[(z * t$95$1 + N[(b * N[(a + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * a + N[(z * t$95$1 + y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 - \log t\\
\mathbf{if}\;x + y \leq -1 \cdot 10^{+107}:\\
\;\;\;\;\left(a - 0.5\right) \cdot b + \left(z + x\right)\\
\mathbf{elif}\;x + y \leq 10^{+16}:\\
\;\;\;\;\mathsf{fma}\left(z, t\_1, b \cdot \left(a + -0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b, a, \mathsf{fma}\left(z, t\_1, y\right)\right)\\
\end{array}
\end{array}
if (+.f64 x y) < -9.9999999999999997e106Initial program 99.9%
+-commutativeN/A
associate--l+N/A
+-lowering-+.f64N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f6499.9
Applied egg-rr99.9%
Taylor expanded in x around inf
Simplified68.2%
if -9.9999999999999997e106 < (+.f64 x y) < 1e16Initial program 99.8%
+-commutativeN/A
associate--l+N/A
+-lowering-+.f64N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f6499.8
Applied egg-rr99.8%
Taylor expanded in y around 0
associate-+r+N/A
+-commutativeN/A
associate--l+N/A
associate--l+N/A
*-rgt-identityN/A
distribute-lft-out--N/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
log-lowering-log.f6494.8
Simplified94.8%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
log-lowering-log.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6487.2
Simplified87.2%
if 1e16 < (+.f64 x y) Initial program 99.9%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f6494.8
Simplified94.8%
Taylor expanded in x around 0
sub-negN/A
+-commutativeN/A
associate-+r+N/A
associate-+r+N/A
sub-negN/A
*-rgt-identityN/A
distribute-lft-out--N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
log-lowering-log.f6462.8
Simplified62.8%
Final simplification73.5%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (- a 0.5) b))) (if (<= (- (+ z (+ x y)) (* z (log t))) -2e-151) (+ x t_1) (+ y t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - 0.5) * b;
double tmp;
if (((z + (x + y)) - (z * log(t))) <= -2e-151) {
tmp = x + t_1;
} else {
tmp = y + t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (a - 0.5d0) * b
if (((z + (x + y)) - (z * log(t))) <= (-2d-151)) then
tmp = x + t_1
else
tmp = y + t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - 0.5) * b;
double tmp;
if (((z + (x + y)) - (z * Math.log(t))) <= -2e-151) {
tmp = x + t_1;
} else {
tmp = y + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a - 0.5) * b tmp = 0 if ((z + (x + y)) - (z * math.log(t))) <= -2e-151: tmp = x + t_1 else: tmp = y + t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a - 0.5) * b) tmp = 0.0 if (Float64(Float64(z + Float64(x + y)) - Float64(z * log(t))) <= -2e-151) tmp = Float64(x + t_1); else tmp = Float64(y + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a - 0.5) * b; tmp = 0.0; if (((z + (x + y)) - (z * log(t))) <= -2e-151) tmp = x + t_1; else tmp = y + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[N[(N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2e-151], N[(x + t$95$1), $MachinePrecision], N[(y + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a - 0.5\right) \cdot b\\
\mathbf{if}\;\left(z + \left(x + y\right)\right) - z \cdot \log t \leq -2 \cdot 10^{-151}:\\
\;\;\;\;x + t\_1\\
\mathbf{else}:\\
\;\;\;\;y + t\_1\\
\end{array}
\end{array}
if (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) < -1.9999999999999999e-151Initial program 99.9%
Taylor expanded in x around inf
Simplified62.9%
if -1.9999999999999999e-151 < (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) Initial program 99.9%
Taylor expanded in y around inf
Simplified52.6%
Final simplification57.8%
(FPCore (x y z t a b) :precision binary64 (if (<= (+ (* (- a 0.5) b) (- (+ z (+ x y)) (* z (log t)))) -2e-151) x y))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((((a - 0.5) * b) + ((z + (x + y)) - (z * log(t)))) <= -2e-151) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((((a - 0.5d0) * b) + ((z + (x + y)) - (z * log(t)))) <= (-2d-151)) then
tmp = x
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((((a - 0.5) * b) + ((z + (x + y)) - (z * Math.log(t)))) <= -2e-151) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (((a - 0.5) * b) + ((z + (x + y)) - (z * math.log(t)))) <= -2e-151: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(Float64(Float64(a - 0.5) * b) + Float64(Float64(z + Float64(x + y)) - Float64(z * log(t)))) <= -2e-151) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((((a - 0.5) * b) + ((z + (x + y)) - (z * log(t)))) <= -2e-151) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision] + N[(N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2e-151], x, y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(a - 0.5\right) \cdot b + \left(\left(z + \left(x + y\right)\right) - z \cdot \log t\right) \leq -2 \cdot 10^{-151}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)) < -1.9999999999999999e-151Initial program 99.9%
Taylor expanded in x around inf
Simplified24.3%
if -1.9999999999999999e-151 < (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)) Initial program 99.9%
Taylor expanded in y around inf
Simplified22.6%
Final simplification23.4%
(FPCore (x y z t a b) :precision binary64 (if (<= (+ x y) 2e+17) (fma b (+ a -0.5) (fma z (- 1.0 (log t)) x)) (+ z (fma a b (- (+ x y) (* z (log t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x + y) <= 2e+17) {
tmp = fma(b, (a + -0.5), fma(z, (1.0 - log(t)), x));
} else {
tmp = z + fma(a, b, ((x + y) - (z * log(t))));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(x + y) <= 2e+17) tmp = fma(b, Float64(a + -0.5), fma(z, Float64(1.0 - log(t)), x)); else tmp = Float64(z + fma(a, b, Float64(Float64(x + y) - Float64(z * log(t))))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(x + y), $MachinePrecision], 2e+17], N[(b * N[(a + -0.5), $MachinePrecision] + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], N[(z + N[(a * b + N[(N[(x + y), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x + y \leq 2 \cdot 10^{+17}:\\
\;\;\;\;\mathsf{fma}\left(b, a + -0.5, \mathsf{fma}\left(z, 1 - \log t, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z + \mathsf{fma}\left(a, b, \left(x + y\right) - z \cdot \log t\right)\\
\end{array}
\end{array}
if (+.f64 x y) < 2e17Initial program 99.9%
+-commutativeN/A
associate--l+N/A
+-lowering-+.f64N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f6499.9
Applied egg-rr99.9%
Taylor expanded in y around 0
associate-+r+N/A
+-commutativeN/A
associate--l+N/A
associate--l+N/A
*-rgt-identityN/A
distribute-lft-out--N/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
log-lowering-log.f6487.1
Simplified87.1%
if 2e17 < (+.f64 x y) Initial program 99.9%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f6494.7
Simplified94.7%
+-commutativeN/A
+-commutativeN/A
associate-+r-N/A
+-commutativeN/A
associate-+r+N/A
+-lowering-+.f64N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f6494.7
Applied egg-rr94.7%
Final simplification90.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- 1.0 (log t))))
(if (<= (+ x y) 1e+16)
(fma b (+ a -0.5) (fma z t_1 x))
(fma b a (fma z t_1 y)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 - log(t);
double tmp;
if ((x + y) <= 1e+16) {
tmp = fma(b, (a + -0.5), fma(z, t_1, x));
} else {
tmp = fma(b, a, fma(z, t_1, y));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(1.0 - log(t)) tmp = 0.0 if (Float64(x + y) <= 1e+16) tmp = fma(b, Float64(a + -0.5), fma(z, t_1, x)); else tmp = fma(b, a, fma(z, t_1, y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x + y), $MachinePrecision], 1e+16], N[(b * N[(a + -0.5), $MachinePrecision] + N[(z * t$95$1 + x), $MachinePrecision]), $MachinePrecision], N[(b * a + N[(z * t$95$1 + y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 - \log t\\
\mathbf{if}\;x + y \leq 10^{+16}:\\
\;\;\;\;\mathsf{fma}\left(b, a + -0.5, \mathsf{fma}\left(z, t\_1, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b, a, \mathsf{fma}\left(z, t\_1, y\right)\right)\\
\end{array}
\end{array}
if (+.f64 x y) < 1e16Initial program 99.9%
+-commutativeN/A
associate--l+N/A
+-lowering-+.f64N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f6499.9
Applied egg-rr99.9%
Taylor expanded in y around 0
associate-+r+N/A
+-commutativeN/A
associate--l+N/A
associate--l+N/A
*-rgt-identityN/A
distribute-lft-out--N/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
log-lowering-log.f6487.0
Simplified87.0%
if 1e16 < (+.f64 x y) Initial program 99.9%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f6494.8
Simplified94.8%
Taylor expanded in x around 0
sub-negN/A
+-commutativeN/A
associate-+r+N/A
associate-+r+N/A
sub-negN/A
*-rgt-identityN/A
distribute-lft-out--N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
log-lowering-log.f6462.8
Simplified62.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- 1.0 (log t))))
(if (<= z -3.2e+158)
(fma z t_1 y)
(if (<= z 8.8e+159) (+ y (fma b (+ a -0.5) x)) (fma z t_1 x)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 - log(t);
double tmp;
if (z <= -3.2e+158) {
tmp = fma(z, t_1, y);
} else if (z <= 8.8e+159) {
tmp = y + fma(b, (a + -0.5), x);
} else {
tmp = fma(z, t_1, x);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(1.0 - log(t)) tmp = 0.0 if (z <= -3.2e+158) tmp = fma(z, t_1, y); elseif (z <= 8.8e+159) tmp = Float64(y + fma(b, Float64(a + -0.5), x)); else tmp = fma(z, t_1, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.2e+158], N[(z * t$95$1 + y), $MachinePrecision], If[LessEqual[z, 8.8e+159], N[(y + N[(b * N[(a + -0.5), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], N[(z * t$95$1 + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 - \log t\\
\mathbf{if}\;z \leq -3.2 \cdot 10^{+158}:\\
\;\;\;\;\mathsf{fma}\left(z, t\_1, y\right)\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{+159}:\\
\;\;\;\;y + \mathsf{fma}\left(b, a + -0.5, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z, t\_1, x\right)\\
\end{array}
\end{array}
if z < -3.19999999999999995e158Initial program 99.7%
Taylor expanded in b around 0
cancel-sign-sub-invN/A
associate-+r+N/A
associate-+l+N/A
cancel-sign-sub-invN/A
*-rgt-identityN/A
distribute-lft-out--N/A
+-commutativeN/A
sub-negN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f6479.2
Simplified79.2%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
log-lowering-log.f6468.9
Simplified68.9%
if -3.19999999999999995e158 < z < 8.7999999999999997e159Initial program 99.9%
Taylor expanded in z around 0
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6490.2
Simplified90.2%
if 8.7999999999999997e159 < z Initial program 99.8%
Taylor expanded in b around 0
cancel-sign-sub-invN/A
associate-+r+N/A
associate-+l+N/A
cancel-sign-sub-invN/A
*-rgt-identityN/A
distribute-lft-out--N/A
+-commutativeN/A
sub-negN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f6480.4
Simplified80.4%
Taylor expanded in y around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
log-lowering-log.f6480.4
Simplified80.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma z (- 1.0 (log t)) x)))
(if (<= z -3.7e+169)
t_1
(if (<= z 7e+159) (+ y (fma b (+ a -0.5) x)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(z, (1.0 - log(t)), x);
double tmp;
if (z <= -3.7e+169) {
tmp = t_1;
} else if (z <= 7e+159) {
tmp = y + fma(b, (a + -0.5), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(z, Float64(1.0 - log(t)), x) tmp = 0.0 if (z <= -3.7e+169) tmp = t_1; elseif (z <= 7e+159) tmp = Float64(y + fma(b, Float64(a + -0.5), x)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[z, -3.7e+169], t$95$1, If[LessEqual[z, 7e+159], N[(y + N[(b * N[(a + -0.5), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, 1 - \log t, x\right)\\
\mathbf{if}\;z \leq -3.7 \cdot 10^{+169}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+159}:\\
\;\;\;\;y + \mathsf{fma}\left(b, a + -0.5, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.70000000000000001e169 or 6.9999999999999999e159 < z Initial program 99.8%
Taylor expanded in b around 0
cancel-sign-sub-invN/A
associate-+r+N/A
associate-+l+N/A
cancel-sign-sub-invN/A
*-rgt-identityN/A
distribute-lft-out--N/A
+-commutativeN/A
sub-negN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f6478.1
Simplified78.1%
Taylor expanded in y around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
log-lowering-log.f6471.8
Simplified71.8%
if -3.70000000000000001e169 < z < 6.9999999999999999e159Initial program 99.9%
Taylor expanded in z around 0
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6489.9
Simplified89.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- 1.0 (log t)))))
(if (<= z -1.65e+247)
t_1
(if (<= z 1.8e+181) (+ y (fma b (+ a -0.5) x)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (1.0 - log(t));
double tmp;
if (z <= -1.65e+247) {
tmp = t_1;
} else if (z <= 1.8e+181) {
tmp = y + fma(b, (a + -0.5), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(1.0 - log(t))) tmp = 0.0 if (z <= -1.65e+247) tmp = t_1; elseif (z <= 1.8e+181) tmp = Float64(y + fma(b, Float64(a + -0.5), x)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.65e+247], t$95$1, If[LessEqual[z, 1.8e+181], N[(y + N[(b * N[(a + -0.5), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(1 - \log t\right)\\
\mathbf{if}\;z \leq -1.65 \cdot 10^{+247}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+181}:\\
\;\;\;\;y + \mathsf{fma}\left(b, a + -0.5, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.65000000000000001e247 or 1.79999999999999992e181 < z Initial program 99.7%
Taylor expanded in z around inf
sub-negN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
log-lowering-log.f6475.5
Simplified75.5%
if -1.65000000000000001e247 < z < 1.79999999999999992e181Initial program 99.9%
Taylor expanded in z around 0
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6486.6
Simplified86.6%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (- a 0.5) b))) (if (<= t_1 -4e+234) (* a b) (if (<= t_1 2e+209) (+ x y) (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - 0.5) * b;
double tmp;
if (t_1 <= -4e+234) {
tmp = a * b;
} else if (t_1 <= 2e+209) {
tmp = x + y;
} else {
tmp = a * b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (a - 0.5d0) * b
if (t_1 <= (-4d+234)) then
tmp = a * b
else if (t_1 <= 2d+209) then
tmp = x + y
else
tmp = a * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - 0.5) * b;
double tmp;
if (t_1 <= -4e+234) {
tmp = a * b;
} else if (t_1 <= 2e+209) {
tmp = x + y;
} else {
tmp = a * b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a - 0.5) * b tmp = 0 if t_1 <= -4e+234: tmp = a * b elif t_1 <= 2e+209: tmp = x + y else: tmp = a * b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a - 0.5) * b) tmp = 0.0 if (t_1 <= -4e+234) tmp = Float64(a * b); elseif (t_1 <= 2e+209) tmp = Float64(x + y); else tmp = Float64(a * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a - 0.5) * b; tmp = 0.0; if (t_1 <= -4e+234) tmp = a * b; elseif (t_1 <= 2e+209) tmp = x + y; else tmp = a * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+234], N[(a * b), $MachinePrecision], If[LessEqual[t$95$1, 2e+209], N[(x + y), $MachinePrecision], N[(a * b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a - 0.5\right) \cdot b\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+234}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+209}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -4.00000000000000007e234 or 2.0000000000000001e209 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) Initial program 100.0%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f6472.5
Simplified72.5%
if -4.00000000000000007e234 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 2.0000000000000001e209Initial program 99.9%
Taylor expanded in b around 0
cancel-sign-sub-invN/A
associate-+r+N/A
associate-+l+N/A
cancel-sign-sub-invN/A
*-rgt-identityN/A
distribute-lft-out--N/A
+-commutativeN/A
sub-negN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f6481.8
Simplified81.8%
Taylor expanded in z around 0
+-lowering-+.f6454.0
Simplified54.0%
Final simplification58.4%
(FPCore (x y z t a b) :precision binary64 (if (<= (+ x y) -6e-33) (fma b a x) (if (<= (+ x y) 1e+16) (* b (+ a -0.5)) (fma b a y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x + y) <= -6e-33) {
tmp = fma(b, a, x);
} else if ((x + y) <= 1e+16) {
tmp = b * (a + -0.5);
} else {
tmp = fma(b, a, y);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(x + y) <= -6e-33) tmp = fma(b, a, x); elseif (Float64(x + y) <= 1e+16) tmp = Float64(b * Float64(a + -0.5)); else tmp = fma(b, a, y); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(x + y), $MachinePrecision], -6e-33], N[(b * a + x), $MachinePrecision], If[LessEqual[N[(x + y), $MachinePrecision], 1e+16], N[(b * N[(a + -0.5), $MachinePrecision]), $MachinePrecision], N[(b * a + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x + y \leq -6 \cdot 10^{-33}:\\
\;\;\;\;\mathsf{fma}\left(b, a, x\right)\\
\mathbf{elif}\;x + y \leq 10^{+16}:\\
\;\;\;\;b \cdot \left(a + -0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b, a, y\right)\\
\end{array}
\end{array}
if (+.f64 x y) < -6.0000000000000003e-33Initial program 99.9%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f6488.3
Simplified88.3%
Taylor expanded in z around 0
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
+-lowering-+.f6471.1
Simplified71.1%
Taylor expanded in x around inf
Simplified50.8%
if -6.0000000000000003e-33 < (+.f64 x y) < 1e16Initial program 99.8%
Taylor expanded in b around inf
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6458.7
Simplified58.7%
if 1e16 < (+.f64 x y) Initial program 99.9%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f6494.8
Simplified94.8%
Taylor expanded in z around 0
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
+-lowering-+.f6478.6
Simplified78.6%
Taylor expanded in x around 0
Simplified47.3%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (+ a -0.5)))) (if (<= b -3.95e+149) t_1 (if (<= b 4.2e+164) (fma b a (+ x y)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a + -0.5);
double tmp;
if (b <= -3.95e+149) {
tmp = t_1;
} else if (b <= 4.2e+164) {
tmp = fma(b, a, (x + y));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a + -0.5)) tmp = 0.0 if (b <= -3.95e+149) tmp = t_1; elseif (b <= 4.2e+164) tmp = fma(b, a, Float64(x + y)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a + -0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.95e+149], t$95$1, If[LessEqual[b, 4.2e+164], N[(b * a + N[(x + y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a + -0.5\right)\\
\mathbf{if}\;b \leq -3.95 \cdot 10^{+149}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 4.2 \cdot 10^{+164}:\\
\;\;\;\;\mathsf{fma}\left(b, a, x + y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -3.94999999999999982e149 or 4.1999999999999998e164 < b Initial program 99.9%
Taylor expanded in b around inf
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6483.7
Simplified83.7%
if -3.94999999999999982e149 < b < 4.1999999999999998e164Initial program 99.9%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f6495.2
Simplified95.2%
Taylor expanded in z around 0
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
+-lowering-+.f6468.8
Simplified68.8%
(FPCore (x y z t a b) :precision binary64 (if (<= (+ x y) 1e+16) (+ x (* (- a 0.5) b)) (fma b a (+ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x + y) <= 1e+16) {
tmp = x + ((a - 0.5) * b);
} else {
tmp = fma(b, a, (x + y));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(x + y) <= 1e+16) tmp = Float64(x + Float64(Float64(a - 0.5) * b)); else tmp = fma(b, a, Float64(x + y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(x + y), $MachinePrecision], 1e+16], N[(x + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], N[(b * a + N[(x + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x + y \leq 10^{+16}:\\
\;\;\;\;x + \left(a - 0.5\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b, a, x + y\right)\\
\end{array}
\end{array}
if (+.f64 x y) < 1e16Initial program 99.9%
Taylor expanded in x around inf
Simplified61.3%
if 1e16 < (+.f64 x y) Initial program 99.9%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f6494.8
Simplified94.8%
Taylor expanded in z around 0
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
+-lowering-+.f6478.6
Simplified78.6%
(FPCore (x y z t a b) :precision binary64 (+ y (fma b (+ a -0.5) x)))
double code(double x, double y, double z, double t, double a, double b) {
return y + fma(b, (a + -0.5), x);
}
function code(x, y, z, t, a, b) return Float64(y + fma(b, Float64(a + -0.5), x)) end
code[x_, y_, z_, t_, a_, b_] := N[(y + N[(b * N[(a + -0.5), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y + \mathsf{fma}\left(b, a + -0.5, x\right)
\end{array}
Initial program 99.9%
Taylor expanded in z around 0
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6477.7
Simplified77.7%
(FPCore (x y z t a b) :precision binary64 (+ x y))
double code(double x, double y, double z, double t, double a, double b) {
return x + y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x + y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x + y;
}
def code(x, y, z, t, a, b): return x + y
function code(x, y, z, t, a, b) return Float64(x + y) end
function tmp = code(x, y, z, t, a, b) tmp = x + y; end
code[x_, y_, z_, t_, a_, b_] := N[(x + y), $MachinePrecision]
\begin{array}{l}
\\
x + y
\end{array}
Initial program 99.9%
Taylor expanded in b around 0
cancel-sign-sub-invN/A
associate-+r+N/A
associate-+l+N/A
cancel-sign-sub-invN/A
*-rgt-identityN/A
distribute-lft-out--N/A
+-commutativeN/A
sub-negN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f6464.7
Simplified64.7%
Taylor expanded in z around 0
+-lowering-+.f6443.0
Simplified43.0%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 99.9%
Taylor expanded in x around inf
Simplified24.2%
(FPCore (x y z t a b) :precision binary64 (+ (+ (+ x y) (/ (* (- 1.0 (pow (log t) 2.0)) z) (+ 1.0 (log t)))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + y) + (((1.0 - pow(log(t), 2.0)) * z) / (1.0 + log(t)))) + ((a - 0.5) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x + y) + (((1.0d0 - (log(t) ** 2.0d0)) * z) / (1.0d0 + log(t)))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x + y) + (((1.0 - Math.pow(Math.log(t), 2.0)) * z) / (1.0 + Math.log(t)))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return ((x + y) + (((1.0 - math.pow(math.log(t), 2.0)) * z) / (1.0 + math.log(t)))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + y) + Float64(Float64(Float64(1.0 - (log(t) ^ 2.0)) * z) / Float64(1.0 + log(t)))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + y) + (((1.0 - (log(t) ^ 2.0)) * z) / (1.0 + log(t)))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + y), $MachinePrecision] + N[(N[(N[(1.0 - N[Power[N[Log[t], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision] / N[(1.0 + N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + y\right) + \frac{\left(1 - {\log t}^{2}\right) \cdot z}{1 + \log t}\right) + \left(a - 0.5\right) \cdot b
\end{array}
herbie shell --seed 2024198
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, A"
:precision binary64
:alt
(! :herbie-platform default (+ (+ (+ x y) (/ (* (- 1 (pow (log t) 2)) z) (+ 1 (log t)))) (* (- a 1/2) b)))
(+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))