
(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 21 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 (fma (+ a -0.5) b (+ x (+ y (- z (* z (log t)))))))
double code(double x, double y, double z, double t, double a, double b) {
return fma((a + -0.5), b, (x + (y + (z - (z * log(t))))));
}
function code(x, y, z, t, a, b) return fma(Float64(a + -0.5), b, Float64(x + Float64(y + Float64(z - Float64(z * log(t)))))) end
code[x_, y_, z_, t_, a_, b_] := N[(N[(a + -0.5), $MachinePrecision] * b + N[(x + N[(y + N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a + -0.5, b, x + \left(y + \left(z - z \cdot \log t\right)\right)\right)
\end{array}
Initial program 99.8%
+-commutative99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
associate--l+99.8%
associate-+l+99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))) (t_2 (+ t_1 (+ x y))) (t_3 (* z (log t))))
(if (<= t_1 -5e+155)
t_2
(if (<= t_1 -2e+88)
(- (+ z t_1) t_3)
(if (<= t_1 5e+50) (- (+ y (+ x z)) t_3) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double t_2 = t_1 + (x + y);
double t_3 = z * log(t);
double tmp;
if (t_1 <= -5e+155) {
tmp = t_2;
} else if (t_1 <= -2e+88) {
tmp = (z + t_1) - t_3;
} else if (t_1 <= 5e+50) {
tmp = (y + (x + z)) - t_3;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = b * (a - 0.5d0)
t_2 = t_1 + (x + y)
t_3 = z * log(t)
if (t_1 <= (-5d+155)) then
tmp = t_2
else if (t_1 <= (-2d+88)) then
tmp = (z + t_1) - t_3
else if (t_1 <= 5d+50) then
tmp = (y + (x + z)) - t_3
else
tmp = t_2
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 = b * (a - 0.5);
double t_2 = t_1 + (x + y);
double t_3 = z * Math.log(t);
double tmp;
if (t_1 <= -5e+155) {
tmp = t_2;
} else if (t_1 <= -2e+88) {
tmp = (z + t_1) - t_3;
} else if (t_1 <= 5e+50) {
tmp = (y + (x + z)) - t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) t_2 = t_1 + (x + y) t_3 = z * math.log(t) tmp = 0 if t_1 <= -5e+155: tmp = t_2 elif t_1 <= -2e+88: tmp = (z + t_1) - t_3 elif t_1 <= 5e+50: tmp = (y + (x + z)) - t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) t_2 = Float64(t_1 + Float64(x + y)) t_3 = Float64(z * log(t)) tmp = 0.0 if (t_1 <= -5e+155) tmp = t_2; elseif (t_1 <= -2e+88) tmp = Float64(Float64(z + t_1) - t_3); elseif (t_1 <= 5e+50) tmp = Float64(Float64(y + Float64(x + z)) - t_3); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); t_2 = t_1 + (x + y); t_3 = z * log(t); tmp = 0.0; if (t_1 <= -5e+155) tmp = t_2; elseif (t_1 <= -2e+88) tmp = (z + t_1) - t_3; elseif (t_1 <= 5e+50) tmp = (y + (x + z)) - t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(x + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+155], t$95$2, If[LessEqual[t$95$1, -2e+88], N[(N[(z + t$95$1), $MachinePrecision] - t$95$3), $MachinePrecision], If[LessEqual[t$95$1, 5e+50], N[(N[(y + N[(x + z), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
t_2 := t_1 + \left(x + y\right)\\
t_3 := z \cdot \log t\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+155}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_1 \leq -2 \cdot 10^{+88}:\\
\;\;\;\;\left(z + t_1\right) - t_3\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+50}:\\
\;\;\;\;\left(y + \left(x + z\right)\right) - t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 a 1/2) b) < -4.9999999999999999e155 or 5e50 < (*.f64 (-.f64 a 1/2) b) Initial program 100.0%
associate-+l-100.0%
+-commutative100.0%
associate-+l+100.0%
associate--l+100.0%
fma-neg100.0%
distribute-lft-neg-in100.0%
*-commutative100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-in100.0%
metadata-eval100.0%
metadata-eval100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in z around 0 96.9%
if -4.9999999999999999e155 < (*.f64 (-.f64 a 1/2) b) < -1.99999999999999992e88Initial program 99.6%
+-commutative99.6%
fma-def99.6%
sub-neg99.6%
metadata-eval99.6%
associate--l+99.6%
associate-+l+99.6%
Simplified99.6%
Taylor expanded in y around 0 99.6%
Taylor expanded in x around 0 93.2%
if -1.99999999999999992e88 < (*.f64 (-.f64 a 1/2) b) < 5e50Initial program 99.8%
associate-+l-99.8%
+-commutative99.8%
associate-+l+99.8%
associate--l+99.8%
fma-neg99.8%
distribute-lft-neg-in99.8%
*-commutative99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
metadata-eval99.8%
metadata-eval99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in b around 0 96.3%
Final simplification96.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (<= t_1 -5e+102)
(+ x (+ (* (+ a -0.5) b) (* z (- 1.0 (log t)))))
(if (<= t_1 5e+50)
(- (+ (* -0.5 b) (+ y (+ x z))) (* z (log t)))
(+ t_1 (+ x y))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if (t_1 <= -5e+102) {
tmp = x + (((a + -0.5) * b) + (z * (1.0 - log(t))));
} else if (t_1 <= 5e+50) {
tmp = ((-0.5 * b) + (y + (x + z))) - (z * log(t));
} else {
tmp = t_1 + (x + 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) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if (t_1 <= (-5d+102)) then
tmp = x + (((a + (-0.5d0)) * b) + (z * (1.0d0 - log(t))))
else if (t_1 <= 5d+50) then
tmp = (((-0.5d0) * b) + (y + (x + z))) - (z * log(t))
else
tmp = t_1 + (x + y)
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 = b * (a - 0.5);
double tmp;
if (t_1 <= -5e+102) {
tmp = x + (((a + -0.5) * b) + (z * (1.0 - Math.log(t))));
} else if (t_1 <= 5e+50) {
tmp = ((-0.5 * b) + (y + (x + z))) - (z * Math.log(t));
} else {
tmp = t_1 + (x + y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if t_1 <= -5e+102: tmp = x + (((a + -0.5) * b) + (z * (1.0 - math.log(t)))) elif t_1 <= 5e+50: tmp = ((-0.5 * b) + (y + (x + z))) - (z * math.log(t)) else: tmp = t_1 + (x + y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if (t_1 <= -5e+102) tmp = Float64(x + Float64(Float64(Float64(a + -0.5) * b) + Float64(z * Float64(1.0 - log(t))))); elseif (t_1 <= 5e+50) tmp = Float64(Float64(Float64(-0.5 * b) + Float64(y + Float64(x + z))) - Float64(z * log(t))); else tmp = Float64(t_1 + Float64(x + y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if (t_1 <= -5e+102) tmp = x + (((a + -0.5) * b) + (z * (1.0 - log(t)))); elseif (t_1 <= 5e+50) tmp = ((-0.5 * b) + (y + (x + z))) - (z * log(t)); else tmp = t_1 + (x + y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+102], N[(x + N[(N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision] + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+50], N[(N[(N[(-0.5 * b), $MachinePrecision] + N[(y + N[(x + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(x + y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+102}:\\
\;\;\;\;x + \left(\left(a + -0.5\right) \cdot b + z \cdot \left(1 - \log t\right)\right)\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+50}:\\
\;\;\;\;\left(-0.5 \cdot b + \left(y + \left(x + z\right)\right)\right) - z \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;t_1 + \left(x + y\right)\\
\end{array}
\end{array}
if (*.f64 (-.f64 a 1/2) b) < -5e102Initial program 99.9%
+-commutative99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
associate--l+99.9%
associate-+l+99.9%
Simplified99.9%
Taylor expanded in y around 0 93.0%
fma-udef93.0%
+-commutative93.0%
associate-+r+93.0%
+-commutative93.0%
*-commutative93.0%
*-un-lft-identity93.0%
distribute-rgt-out--93.0%
Applied egg-rr93.0%
if -5e102 < (*.f64 (-.f64 a 1/2) b) < 5e50Initial program 99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
associate--l+99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
metadata-eval99.8%
remove-double-neg99.8%
Simplified99.8%
Taylor expanded in a around 0 97.5%
if 5e50 < (*.f64 (-.f64 a 1/2) b) Initial program 100.0%
associate-+l-100.0%
+-commutative100.0%
associate-+l+100.0%
associate--l+100.0%
fma-neg100.0%
distribute-lft-neg-in100.0%
*-commutative100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-in100.0%
metadata-eval100.0%
metadata-eval100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in z around 0 96.7%
Final simplification96.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (<= t_1 -5e+117)
(+ y (+ t_1 (+ x z)))
(if (<= t_1 5e+50) (- (+ y (+ x z)) (* z (log t))) (+ t_1 (+ x y))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if (t_1 <= -5e+117) {
tmp = y + (t_1 + (x + z));
} else if (t_1 <= 5e+50) {
tmp = (y + (x + z)) - (z * log(t));
} else {
tmp = t_1 + (x + 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) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if (t_1 <= (-5d+117)) then
tmp = y + (t_1 + (x + z))
else if (t_1 <= 5d+50) then
tmp = (y + (x + z)) - (z * log(t))
else
tmp = t_1 + (x + y)
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 = b * (a - 0.5);
double tmp;
if (t_1 <= -5e+117) {
tmp = y + (t_1 + (x + z));
} else if (t_1 <= 5e+50) {
tmp = (y + (x + z)) - (z * Math.log(t));
} else {
tmp = t_1 + (x + y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if t_1 <= -5e+117: tmp = y + (t_1 + (x + z)) elif t_1 <= 5e+50: tmp = (y + (x + z)) - (z * math.log(t)) else: tmp = t_1 + (x + y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if (t_1 <= -5e+117) tmp = Float64(y + Float64(t_1 + Float64(x + z))); elseif (t_1 <= 5e+50) tmp = Float64(Float64(y + Float64(x + z)) - Float64(z * log(t))); else tmp = Float64(t_1 + Float64(x + y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if (t_1 <= -5e+117) tmp = y + (t_1 + (x + z)); elseif (t_1 <= 5e+50) tmp = (y + (x + z)) - (z * log(t)); else tmp = t_1 + (x + y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+117], N[(y + N[(t$95$1 + N[(x + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+50], N[(N[(y + N[(x + z), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(x + y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+117}:\\
\;\;\;\;y + \left(t_1 + \left(x + z\right)\right)\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+50}:\\
\;\;\;\;\left(y + \left(x + z\right)\right) - z \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;t_1 + \left(x + y\right)\\
\end{array}
\end{array}
if (*.f64 (-.f64 a 1/2) b) < -4.99999999999999983e117Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
associate--l+99.9%
fma-neg99.9%
distribute-lft-neg-in99.9%
*-commutative99.9%
sub-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
metadata-eval99.9%
metadata-eval99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in z around 0 90.6%
if -4.99999999999999983e117 < (*.f64 (-.f64 a 1/2) b) < 5e50Initial program 99.8%
associate-+l-99.7%
+-commutative99.7%
associate-+l+99.7%
associate--l+99.7%
fma-neg99.8%
distribute-lft-neg-in99.8%
*-commutative99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
metadata-eval99.8%
metadata-eval99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in b around 0 95.0%
if 5e50 < (*.f64 (-.f64 a 1/2) b) Initial program 100.0%
associate-+l-100.0%
+-commutative100.0%
associate-+l+100.0%
associate--l+100.0%
fma-neg100.0%
distribute-lft-neg-in100.0%
*-commutative100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-in100.0%
metadata-eval100.0%
metadata-eval100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in z around 0 96.7%
Final simplification94.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (<= t_1 -2e+88)
(+ x (+ (* (+ a -0.5) b) (* z (- 1.0 (log t)))))
(if (<= t_1 5e+50) (- (+ y (+ x z)) (* z (log t))) (+ t_1 (+ x y))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if (t_1 <= -2e+88) {
tmp = x + (((a + -0.5) * b) + (z * (1.0 - log(t))));
} else if (t_1 <= 5e+50) {
tmp = (y + (x + z)) - (z * log(t));
} else {
tmp = t_1 + (x + 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) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if (t_1 <= (-2d+88)) then
tmp = x + (((a + (-0.5d0)) * b) + (z * (1.0d0 - log(t))))
else if (t_1 <= 5d+50) then
tmp = (y + (x + z)) - (z * log(t))
else
tmp = t_1 + (x + y)
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 = b * (a - 0.5);
double tmp;
if (t_1 <= -2e+88) {
tmp = x + (((a + -0.5) * b) + (z * (1.0 - Math.log(t))));
} else if (t_1 <= 5e+50) {
tmp = (y + (x + z)) - (z * Math.log(t));
} else {
tmp = t_1 + (x + y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if t_1 <= -2e+88: tmp = x + (((a + -0.5) * b) + (z * (1.0 - math.log(t)))) elif t_1 <= 5e+50: tmp = (y + (x + z)) - (z * math.log(t)) else: tmp = t_1 + (x + y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if (t_1 <= -2e+88) tmp = Float64(x + Float64(Float64(Float64(a + -0.5) * b) + Float64(z * Float64(1.0 - log(t))))); elseif (t_1 <= 5e+50) tmp = Float64(Float64(y + Float64(x + z)) - Float64(z * log(t))); else tmp = Float64(t_1 + Float64(x + y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if (t_1 <= -2e+88) tmp = x + (((a + -0.5) * b) + (z * (1.0 - log(t)))); elseif (t_1 <= 5e+50) tmp = (y + (x + z)) - (z * log(t)); else tmp = t_1 + (x + y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+88], N[(x + N[(N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision] + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+50], N[(N[(y + N[(x + z), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(x + y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{+88}:\\
\;\;\;\;x + \left(\left(a + -0.5\right) \cdot b + z \cdot \left(1 - \log t\right)\right)\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+50}:\\
\;\;\;\;\left(y + \left(x + z\right)\right) - z \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;t_1 + \left(x + y\right)\\
\end{array}
\end{array}
if (*.f64 (-.f64 a 1/2) b) < -1.99999999999999992e88Initial program 99.9%
+-commutative99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
associate--l+99.9%
associate-+l+99.9%
Simplified99.9%
Taylor expanded in y around 0 93.3%
fma-udef93.3%
+-commutative93.3%
associate-+r+93.3%
+-commutative93.3%
*-commutative93.3%
*-un-lft-identity93.3%
distribute-rgt-out--93.2%
Applied egg-rr93.2%
if -1.99999999999999992e88 < (*.f64 (-.f64 a 1/2) b) < 5e50Initial program 99.8%
associate-+l-99.8%
+-commutative99.8%
associate-+l+99.8%
associate--l+99.8%
fma-neg99.8%
distribute-lft-neg-in99.8%
*-commutative99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
metadata-eval99.8%
metadata-eval99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in b around 0 96.3%
if 5e50 < (*.f64 (-.f64 a 1/2) b) Initial program 100.0%
associate-+l-100.0%
+-commutative100.0%
associate-+l+100.0%
associate--l+100.0%
fma-neg100.0%
distribute-lft-neg-in100.0%
*-commutative100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-in100.0%
metadata-eval100.0%
metadata-eval100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in z around 0 96.7%
Final simplification95.7%
(FPCore (x y z t a b) :precision binary64 (if (<= (+ x y) 5e-158) (+ x (+ (* (+ a -0.5) b) (* z (- 1.0 (log t))))) (- (+ (* b (- a 0.5)) (+ y z)) (* z (log t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x + y) <= 5e-158) {
tmp = x + (((a + -0.5) * b) + (z * (1.0 - log(t))));
} else {
tmp = ((b * (a - 0.5)) + (y + z)) - (z * log(t));
}
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 ((x + y) <= 5d-158) then
tmp = x + (((a + (-0.5d0)) * b) + (z * (1.0d0 - log(t))))
else
tmp = ((b * (a - 0.5d0)) + (y + z)) - (z * log(t))
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 ((x + y) <= 5e-158) {
tmp = x + (((a + -0.5) * b) + (z * (1.0 - Math.log(t))));
} else {
tmp = ((b * (a - 0.5)) + (y + z)) - (z * Math.log(t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (x + y) <= 5e-158: tmp = x + (((a + -0.5) * b) + (z * (1.0 - math.log(t)))) else: tmp = ((b * (a - 0.5)) + (y + z)) - (z * math.log(t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(x + y) <= 5e-158) tmp = Float64(x + Float64(Float64(Float64(a + -0.5) * b) + Float64(z * Float64(1.0 - log(t))))); else tmp = Float64(Float64(Float64(b * Float64(a - 0.5)) + Float64(y + z)) - Float64(z * log(t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((x + y) <= 5e-158) tmp = x + (((a + -0.5) * b) + (z * (1.0 - log(t)))); else tmp = ((b * (a - 0.5)) + (y + z)) - (z * log(t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(x + y), $MachinePrecision], 5e-158], N[(x + N[(N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision] + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[(y + z), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x + y \leq 5 \cdot 10^{-158}:\\
\;\;\;\;x + \left(\left(a + -0.5\right) \cdot b + z \cdot \left(1 - \log t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot \left(a - 0.5\right) + \left(y + z\right)\right) - z \cdot \log t\\
\end{array}
\end{array}
if (+.f64 x y) < 4.99999999999999972e-158Initial program 99.9%
+-commutative99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
associate--l+99.9%
associate-+l+99.9%
Simplified99.9%
Taylor expanded in y around 0 82.3%
fma-udef82.3%
+-commutative82.3%
associate-+r+82.3%
+-commutative82.3%
*-commutative82.3%
*-un-lft-identity82.3%
distribute-rgt-out--82.3%
Applied egg-rr82.3%
if 4.99999999999999972e-158 < (+.f64 x y) Initial program 99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
associate--l+99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
metadata-eval99.8%
remove-double-neg99.8%
Simplified99.8%
Taylor expanded in x around 0 76.9%
Final simplification79.8%
(FPCore (x y z t a b) :precision binary64 (+ (+ (- z (* z (log t))) (+ x y)) (* (+ a -0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((z - (z * log(t))) + (x + y)) + ((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 - (z * log(t))) + (x + y)) + ((a + (-0.5d0)) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((z - (z * Math.log(t))) + (x + y)) + ((a + -0.5) * b);
}
def code(x, y, z, t, a, b): return ((z - (z * math.log(t))) + (x + y)) + ((a + -0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(z - Float64(z * log(t))) + Float64(x + y)) + Float64(Float64(a + -0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((z - (z * log(t))) + (x + y)) + ((a + -0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(z - z \cdot \log t\right) + \left(x + y\right)\right) + \left(a + -0.5\right) \cdot b
\end{array}
Initial program 99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
associate--l+99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
metadata-eval99.8%
remove-double-neg99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -9e+182) (not (<= z 6.2e+153))) (+ y (* z (- 1.0 (log t)))) (+ y (+ (* b (- a 0.5)) (+ x z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -9e+182) || !(z <= 6.2e+153)) {
tmp = y + (z * (1.0 - log(t)));
} else {
tmp = y + ((b * (a - 0.5)) + (x + z));
}
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 ((z <= (-9d+182)) .or. (.not. (z <= 6.2d+153))) then
tmp = y + (z * (1.0d0 - log(t)))
else
tmp = y + ((b * (a - 0.5d0)) + (x + z))
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 ((z <= -9e+182) || !(z <= 6.2e+153)) {
tmp = y + (z * (1.0 - Math.log(t)));
} else {
tmp = y + ((b * (a - 0.5)) + (x + z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -9e+182) or not (z <= 6.2e+153): tmp = y + (z * (1.0 - math.log(t))) else: tmp = y + ((b * (a - 0.5)) + (x + z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -9e+182) || !(z <= 6.2e+153)) tmp = Float64(y + Float64(z * Float64(1.0 - log(t)))); else tmp = Float64(y + Float64(Float64(b * Float64(a - 0.5)) + Float64(x + z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -9e+182) || ~((z <= 6.2e+153))) tmp = y + (z * (1.0 - log(t))); else tmp = y + ((b * (a - 0.5)) + (x + z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -9e+182], N[Not[LessEqual[z, 6.2e+153]], $MachinePrecision]], N[(y + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[(x + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{+182} \lor \neg \left(z \leq 6.2 \cdot 10^{+153}\right):\\
\;\;\;\;y + z \cdot \left(1 - \log t\right)\\
\mathbf{else}:\\
\;\;\;\;y + \left(b \cdot \left(a - 0.5\right) + \left(x + z\right)\right)\\
\end{array}
\end{array}
if z < -9.00000000000000058e182 or 6.2e153 < z Initial program 99.6%
associate-+l-99.6%
+-commutative99.6%
associate-+l+99.6%
associate--l+99.6%
fma-neg99.6%
distribute-lft-neg-in99.6%
*-commutative99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
metadata-eval99.6%
metadata-eval99.6%
unsub-neg99.6%
Simplified99.6%
Taylor expanded in z around inf 64.4%
if -9.00000000000000058e182 < z < 6.2e153Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
associate--l+99.9%
fma-neg99.9%
distribute-lft-neg-in99.9%
*-commutative99.9%
sub-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
metadata-eval99.9%
metadata-eval99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in z around 0 89.7%
Final simplification84.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- 1.0 (log t)))))
(if (<= z -2.6e+184)
(+ y t_1)
(if (<= z 4.1e+151) (+ y (+ (* b (- a 0.5)) (+ x z))) (+ 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 <= -2.6e+184) {
tmp = y + t_1;
} else if (z <= 4.1e+151) {
tmp = y + ((b * (a - 0.5)) + (x + z));
} else {
tmp = x + 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 = z * (1.0d0 - log(t))
if (z <= (-2.6d+184)) then
tmp = y + t_1
else if (z <= 4.1d+151) then
tmp = y + ((b * (a - 0.5d0)) + (x + z))
else
tmp = x + 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 = z * (1.0 - Math.log(t));
double tmp;
if (z <= -2.6e+184) {
tmp = y + t_1;
} else if (z <= 4.1e+151) {
tmp = y + ((b * (a - 0.5)) + (x + z));
} else {
tmp = x + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (1.0 - math.log(t)) tmp = 0 if z <= -2.6e+184: tmp = y + t_1 elif z <= 4.1e+151: tmp = y + ((b * (a - 0.5)) + (x + z)) else: tmp = x + 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 <= -2.6e+184) tmp = Float64(y + t_1); elseif (z <= 4.1e+151) tmp = Float64(y + Float64(Float64(b * Float64(a - 0.5)) + Float64(x + z))); else tmp = Float64(x + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (1.0 - log(t)); tmp = 0.0; if (z <= -2.6e+184) tmp = y + t_1; elseif (z <= 4.1e+151) tmp = y + ((b * (a - 0.5)) + (x + z)); else tmp = x + t_1; end tmp_2 = 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, -2.6e+184], N[(y + t$95$1), $MachinePrecision], If[LessEqual[z, 4.1e+151], N[(y + N[(N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[(x + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(1 - \log t\right)\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{+184}:\\
\;\;\;\;y + t_1\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{+151}:\\
\;\;\;\;y + \left(b \cdot \left(a - 0.5\right) + \left(x + z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + t_1\\
\end{array}
\end{array}
if z < -2.59999999999999993e184Initial program 99.5%
associate-+l-99.5%
+-commutative99.5%
associate-+l+99.5%
associate--l+99.5%
fma-neg99.5%
distribute-lft-neg-in99.5%
*-commutative99.5%
sub-neg99.5%
+-commutative99.5%
distribute-neg-in99.5%
metadata-eval99.5%
metadata-eval99.5%
unsub-neg99.5%
Simplified99.5%
Taylor expanded in z around inf 61.4%
if -2.59999999999999993e184 < z < 4.0999999999999998e151Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
associate--l+99.9%
fma-neg99.9%
distribute-lft-neg-in99.9%
*-commutative99.9%
sub-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
metadata-eval99.9%
metadata-eval99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in z around 0 89.7%
if 4.0999999999999998e151 < z Initial program 99.7%
+-commutative99.7%
fma-def99.7%
sub-neg99.7%
metadata-eval99.7%
associate--l+99.7%
associate-+l+99.7%
Simplified99.7%
Taylor expanded in y around 0 99.0%
fma-udef99.0%
+-commutative99.0%
associate-+r+99.0%
+-commutative99.0%
*-commutative99.0%
*-un-lft-identity99.0%
distribute-rgt-out--99.0%
Applied egg-rr99.0%
Taylor expanded in a around 0 77.9%
Taylor expanded in b around 0 77.5%
Final simplification85.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -2.2e+176)
(- (* -0.5 b) (* z (+ (log t) -1.0)))
(if (<= z 1.92e+151)
(+ y (+ (* b (- a 0.5)) (+ x z)))
(+ x (* z (- 1.0 (log t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.2e+176) {
tmp = (-0.5 * b) - (z * (log(t) + -1.0));
} else if (z <= 1.92e+151) {
tmp = y + ((b * (a - 0.5)) + (x + z));
} else {
tmp = x + (z * (1.0 - log(t)));
}
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 (z <= (-2.2d+176)) then
tmp = ((-0.5d0) * b) - (z * (log(t) + (-1.0d0)))
else if (z <= 1.92d+151) then
tmp = y + ((b * (a - 0.5d0)) + (x + z))
else
tmp = x + (z * (1.0d0 - log(t)))
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 (z <= -2.2e+176) {
tmp = (-0.5 * b) - (z * (Math.log(t) + -1.0));
} else if (z <= 1.92e+151) {
tmp = y + ((b * (a - 0.5)) + (x + z));
} else {
tmp = x + (z * (1.0 - Math.log(t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -2.2e+176: tmp = (-0.5 * b) - (z * (math.log(t) + -1.0)) elif z <= 1.92e+151: tmp = y + ((b * (a - 0.5)) + (x + z)) else: tmp = x + (z * (1.0 - math.log(t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.2e+176) tmp = Float64(Float64(-0.5 * b) - Float64(z * Float64(log(t) + -1.0))); elseif (z <= 1.92e+151) tmp = Float64(y + Float64(Float64(b * Float64(a - 0.5)) + Float64(x + z))); else tmp = Float64(x + Float64(z * Float64(1.0 - log(t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -2.2e+176) tmp = (-0.5 * b) - (z * (log(t) + -1.0)); elseif (z <= 1.92e+151) tmp = y + ((b * (a - 0.5)) + (x + z)); else tmp = x + (z * (1.0 - log(t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.2e+176], N[(N[(-0.5 * b), $MachinePrecision] - N[(z * N[(N[Log[t], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.92e+151], N[(y + N[(N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[(x + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{+176}:\\
\;\;\;\;-0.5 \cdot b - z \cdot \left(\log t + -1\right)\\
\mathbf{elif}\;z \leq 1.92 \cdot 10^{+151}:\\
\;\;\;\;y + \left(b \cdot \left(a - 0.5\right) + \left(x + z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(1 - \log t\right)\\
\end{array}
\end{array}
if z < -2.20000000000000007e176Initial program 99.6%
+-commutative99.6%
fma-def99.6%
sub-neg99.6%
metadata-eval99.6%
associate--l+99.6%
associate-+l+99.6%
Simplified99.6%
Taylor expanded in y around 0 96.5%
fma-udef96.5%
+-commutative96.5%
associate-+r+96.5%
+-commutative96.5%
*-commutative96.5%
*-un-lft-identity96.5%
distribute-rgt-out--96.4%
Applied egg-rr96.4%
Taylor expanded in a around 0 79.2%
Taylor expanded in x around 0 74.2%
if -2.20000000000000007e176 < z < 1.92000000000000002e151Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
associate--l+99.9%
fma-neg99.9%
distribute-lft-neg-in99.9%
*-commutative99.9%
sub-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
metadata-eval99.9%
metadata-eval99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in z around 0 90.0%
if 1.92000000000000002e151 < z Initial program 99.7%
+-commutative99.7%
fma-def99.7%
sub-neg99.7%
metadata-eval99.7%
associate--l+99.7%
associate-+l+99.7%
Simplified99.7%
Taylor expanded in y around 0 99.0%
fma-udef99.0%
+-commutative99.0%
associate-+r+99.0%
+-commutative99.0%
*-commutative99.0%
*-un-lft-identity99.0%
distribute-rgt-out--99.0%
Applied egg-rr99.0%
Taylor expanded in a around 0 77.9%
Taylor expanded in b around 0 77.5%
Final simplification86.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.05e+180) (not (<= z 8.2e+154))) (* z (- 1.0 (log t))) (+ y (+ (* b (- a 0.5)) (+ x z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.05e+180) || !(z <= 8.2e+154)) {
tmp = z * (1.0 - log(t));
} else {
tmp = y + ((b * (a - 0.5)) + (x + z));
}
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 ((z <= (-2.05d+180)) .or. (.not. (z <= 8.2d+154))) then
tmp = z * (1.0d0 - log(t))
else
tmp = y + ((b * (a - 0.5d0)) + (x + z))
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 ((z <= -2.05e+180) || !(z <= 8.2e+154)) {
tmp = z * (1.0 - Math.log(t));
} else {
tmp = y + ((b * (a - 0.5)) + (x + z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.05e+180) or not (z <= 8.2e+154): tmp = z * (1.0 - math.log(t)) else: tmp = y + ((b * (a - 0.5)) + (x + z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.05e+180) || !(z <= 8.2e+154)) tmp = Float64(z * Float64(1.0 - log(t))); else tmp = Float64(y + Float64(Float64(b * Float64(a - 0.5)) + Float64(x + z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.05e+180) || ~((z <= 8.2e+154))) tmp = z * (1.0 - log(t)); else tmp = y + ((b * (a - 0.5)) + (x + z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.05e+180], N[Not[LessEqual[z, 8.2e+154]], $MachinePrecision]], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[(x + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.05 \cdot 10^{+180} \lor \neg \left(z \leq 8.2 \cdot 10^{+154}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\
\mathbf{else}:\\
\;\;\;\;y + \left(b \cdot \left(a - 0.5\right) + \left(x + z\right)\right)\\
\end{array}
\end{array}
if z < -2.05e180 or 8.2e154 < z Initial program 99.6%
remove-double-neg99.6%
distribute-rgt-neg-out99.6%
associate--l+99.6%
distribute-rgt-neg-in99.6%
sub-neg99.6%
metadata-eval99.6%
remove-double-neg99.6%
Simplified99.6%
Taylor expanded in a around 0 79.4%
Taylor expanded in z around inf 62.2%
if -2.05e180 < z < 8.2e154Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
associate--l+99.9%
fma-neg99.9%
distribute-lft-neg-in99.9%
*-commutative99.9%
sub-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
metadata-eval99.9%
metadata-eval99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in z around 0 89.7%
Final simplification84.0%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5)))) (if (or (<= t_1 -4e+87) (not (<= t_1 5e+50))) (+ y t_1) (+ z (+ x y)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((t_1 <= -4e+87) || !(t_1 <= 5e+50)) {
tmp = y + t_1;
} else {
tmp = z + (x + 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) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if ((t_1 <= (-4d+87)) .or. (.not. (t_1 <= 5d+50))) then
tmp = y + t_1
else
tmp = z + (x + y)
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 = b * (a - 0.5);
double tmp;
if ((t_1 <= -4e+87) || !(t_1 <= 5e+50)) {
tmp = y + t_1;
} else {
tmp = z + (x + y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (t_1 <= -4e+87) or not (t_1 <= 5e+50): tmp = y + t_1 else: tmp = z + (x + y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if ((t_1 <= -4e+87) || !(t_1 <= 5e+50)) tmp = Float64(y + t_1); else tmp = Float64(z + Float64(x + y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if ((t_1 <= -4e+87) || ~((t_1 <= 5e+50))) tmp = y + t_1; else tmp = z + (x + y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -4e+87], N[Not[LessEqual[t$95$1, 5e+50]], $MachinePrecision]], N[(y + t$95$1), $MachinePrecision], N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t_1 \leq -4 \cdot 10^{+87} \lor \neg \left(t_1 \leq 5 \cdot 10^{+50}\right):\\
\;\;\;\;y + t_1\\
\mathbf{else}:\\
\;\;\;\;z + \left(x + y\right)\\
\end{array}
\end{array}
if (*.f64 (-.f64 a 1/2) b) < -3.9999999999999998e87 or 5e50 < (*.f64 (-.f64 a 1/2) b) Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
associate--l+99.9%
fma-neg99.9%
distribute-lft-neg-in99.9%
*-commutative99.9%
sub-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
metadata-eval99.9%
metadata-eval99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in b around inf 80.8%
if -3.9999999999999998e87 < (*.f64 (-.f64 a 1/2) b) < 5e50Initial program 99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
associate--l+99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
metadata-eval99.8%
remove-double-neg99.8%
Simplified99.8%
add-cube-cbrt99.4%
pow399.3%
Applied egg-rr99.3%
Taylor expanded in z around 0 68.2%
Taylor expanded in a around 0 66.3%
Taylor expanded in b around 0 65.3%
+-commutative65.3%
associate-+r+65.3%
+-commutative65.3%
Simplified65.3%
Final simplification72.6%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5)))) (if (or (<= t_1 -2e+88) (not (<= t_1 5e+132))) t_1 (+ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((t_1 <= -2e+88) || !(t_1 <= 5e+132)) {
tmp = t_1;
} else {
tmp = x + 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) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if ((t_1 <= (-2d+88)) .or. (.not. (t_1 <= 5d+132))) then
tmp = t_1
else
tmp = x + y
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 = b * (a - 0.5);
double tmp;
if ((t_1 <= -2e+88) || !(t_1 <= 5e+132)) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (t_1 <= -2e+88) or not (t_1 <= 5e+132): tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if ((t_1 <= -2e+88) || !(t_1 <= 5e+132)) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if ((t_1 <= -2e+88) || ~((t_1 <= 5e+132))) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e+88], N[Not[LessEqual[t$95$1, 5e+132]], $MachinePrecision]], t$95$1, N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{+88} \lor \neg \left(t_1 \leq 5 \cdot 10^{+132}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if (*.f64 (-.f64 a 1/2) b) < -1.99999999999999992e88 or 5.0000000000000001e132 < (*.f64 (-.f64 a 1/2) b) Initial program 99.9%
+-commutative99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
associate--l+99.9%
associate-+l+99.9%
Simplified99.9%
Taylor expanded in y around 0 93.9%
Taylor expanded in b around inf 77.5%
if -1.99999999999999992e88 < (*.f64 (-.f64 a 1/2) b) < 5.0000000000000001e132Initial program 99.8%
associate-+l-99.8%
+-commutative99.8%
associate-+l+99.8%
associate--l+99.8%
fma-neg99.8%
distribute-lft-neg-in99.8%
*-commutative99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
metadata-eval99.8%
metadata-eval99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in x around inf 64.4%
Final simplification70.1%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5)))) (if (or (<= t_1 -4e+87) (not (<= t_1 5e+132))) t_1 (+ z (+ x y)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((t_1 <= -4e+87) || !(t_1 <= 5e+132)) {
tmp = t_1;
} else {
tmp = z + (x + 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) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if ((t_1 <= (-4d+87)) .or. (.not. (t_1 <= 5d+132))) then
tmp = t_1
else
tmp = z + (x + y)
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 = b * (a - 0.5);
double tmp;
if ((t_1 <= -4e+87) || !(t_1 <= 5e+132)) {
tmp = t_1;
} else {
tmp = z + (x + y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (t_1 <= -4e+87) or not (t_1 <= 5e+132): tmp = t_1 else: tmp = z + (x + y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if ((t_1 <= -4e+87) || !(t_1 <= 5e+132)) tmp = t_1; else tmp = Float64(z + Float64(x + y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if ((t_1 <= -4e+87) || ~((t_1 <= 5e+132))) tmp = t_1; else tmp = z + (x + y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -4e+87], N[Not[LessEqual[t$95$1, 5e+132]], $MachinePrecision]], t$95$1, N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t_1 \leq -4 \cdot 10^{+87} \lor \neg \left(t_1 \leq 5 \cdot 10^{+132}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;z + \left(x + y\right)\\
\end{array}
\end{array}
if (*.f64 (-.f64 a 1/2) b) < -3.9999999999999998e87 or 5.0000000000000001e132 < (*.f64 (-.f64 a 1/2) b) Initial program 99.9%
+-commutative99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
associate--l+99.9%
associate-+l+99.9%
Simplified99.9%
Taylor expanded in y around 0 94.0%
Taylor expanded in b around inf 76.8%
if -3.9999999999999998e87 < (*.f64 (-.f64 a 1/2) b) < 5.0000000000000001e132Initial program 99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
associate--l+99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
metadata-eval99.8%
remove-double-neg99.8%
Simplified99.8%
add-cube-cbrt99.4%
pow399.4%
Applied egg-rr99.4%
Taylor expanded in z around 0 70.2%
Taylor expanded in a around 0 67.0%
Taylor expanded in b around 0 65.8%
+-commutative65.8%
associate-+r+65.8%
+-commutative65.8%
Simplified65.8%
Final simplification70.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -1.75e-102)
x
(if (<= y -4.2e-135)
(* a b)
(if (<= y -7.9e-215) x (if (<= y 8e+93) (* a b) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.75e-102) {
tmp = x;
} else if (y <= -4.2e-135) {
tmp = a * b;
} else if (y <= -7.9e-215) {
tmp = x;
} else if (y <= 8e+93) {
tmp = a * b;
} 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 (y <= (-1.75d-102)) then
tmp = x
else if (y <= (-4.2d-135)) then
tmp = a * b
else if (y <= (-7.9d-215)) then
tmp = x
else if (y <= 8d+93) then
tmp = a * b
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 (y <= -1.75e-102) {
tmp = x;
} else if (y <= -4.2e-135) {
tmp = a * b;
} else if (y <= -7.9e-215) {
tmp = x;
} else if (y <= 8e+93) {
tmp = a * b;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.75e-102: tmp = x elif y <= -4.2e-135: tmp = a * b elif y <= -7.9e-215: tmp = x elif y <= 8e+93: tmp = a * b else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.75e-102) tmp = x; elseif (y <= -4.2e-135) tmp = Float64(a * b); elseif (y <= -7.9e-215) tmp = x; elseif (y <= 8e+93) tmp = Float64(a * b); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.75e-102) tmp = x; elseif (y <= -4.2e-135) tmp = a * b; elseif (y <= -7.9e-215) tmp = x; elseif (y <= 8e+93) tmp = a * b; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.75e-102], x, If[LessEqual[y, -4.2e-135], N[(a * b), $MachinePrecision], If[LessEqual[y, -7.9e-215], x, If[LessEqual[y, 8e+93], N[(a * b), $MachinePrecision], y]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.75 \cdot 10^{-102}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -4.2 \cdot 10^{-135}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;y \leq -7.9 \cdot 10^{-215}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 8 \cdot 10^{+93}:\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -1.74999999999999993e-102 or -4.2e-135 < y < -7.8999999999999996e-215Initial program 99.9%
remove-double-neg99.9%
distribute-rgt-neg-out99.9%
associate--l+99.9%
distribute-rgt-neg-in99.9%
sub-neg99.9%
metadata-eval99.9%
remove-double-neg99.9%
Simplified99.9%
Taylor expanded in a around 0 75.8%
Taylor expanded in x around inf 26.7%
if -1.74999999999999993e-102 < y < -4.2e-135 or -7.8999999999999996e-215 < y < 8.00000000000000035e93Initial program 99.8%
+-commutative99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
associate--l+99.8%
associate-+l+99.8%
Simplified99.8%
Taylor expanded in y around 0 94.8%
Taylor expanded in a around inf 32.9%
*-commutative32.9%
Simplified32.9%
if 8.00000000000000035e93 < y Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
associate--l+99.9%
fma-neg99.9%
distribute-lft-neg-in99.9%
*-commutative99.9%
sub-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
metadata-eval99.9%
metadata-eval99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in y around inf 42.4%
Final simplification32.4%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5)))) (if (<= (+ x y) -5e-64) (+ x t_1) (+ 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 ((x + y) <= -5e-64) {
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 = b * (a - 0.5d0)
if ((x + y) <= (-5d-64)) 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 = b * (a - 0.5);
double tmp;
if ((x + y) <= -5e-64) {
tmp = x + t_1;
} else {
tmp = y + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (x + y) <= -5e-64: tmp = x + t_1 else: tmp = y + t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if (Float64(x + y) <= -5e-64) 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 = b * (a - 0.5); tmp = 0.0; if ((x + y) <= -5e-64) 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[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x + y), $MachinePrecision], -5e-64], N[(x + t$95$1), $MachinePrecision], N[(y + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;x + y \leq -5 \cdot 10^{-64}:\\
\;\;\;\;x + t_1\\
\mathbf{else}:\\
\;\;\;\;y + t_1\\
\end{array}
\end{array}
if (+.f64 x y) < -5.00000000000000033e-64Initial program 99.9%
+-commutative99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
associate--l+99.9%
associate-+l+99.9%
Simplified99.9%
Taylor expanded in y around 0 77.6%
Taylor expanded in z around 0 62.0%
if -5.00000000000000033e-64 < (+.f64 x y) Initial program 99.8%
associate-+l-99.8%
+-commutative99.8%
associate-+l+99.8%
associate--l+99.8%
fma-neg99.8%
distribute-lft-neg-in99.8%
*-commutative99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
metadata-eval99.8%
metadata-eval99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in b around inf 56.2%
Final simplification58.6%
(FPCore (x y z t a b) :precision binary64 (+ y (+ (* b (- a 0.5)) (+ x z))))
double code(double x, double y, double z, double t, double a, double b) {
return y + ((b * (a - 0.5)) + (x + z));
}
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 = y + ((b * (a - 0.5d0)) + (x + z))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return y + ((b * (a - 0.5)) + (x + z));
}
def code(x, y, z, t, a, b): return y + ((b * (a - 0.5)) + (x + z))
function code(x, y, z, t, a, b) return Float64(y + Float64(Float64(b * Float64(a - 0.5)) + Float64(x + z))) end
function tmp = code(x, y, z, t, a, b) tmp = y + ((b * (a - 0.5)) + (x + z)); end
code[x_, y_, z_, t_, a_, b_] := N[(y + N[(N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[(x + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y + \left(b \cdot \left(a - 0.5\right) + \left(x + z\right)\right)
\end{array}
Initial program 99.8%
associate-+l-99.8%
+-commutative99.8%
associate-+l+99.8%
associate--l+99.8%
fma-neg99.8%
distribute-lft-neg-in99.8%
*-commutative99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
metadata-eval99.8%
metadata-eval99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in z around 0 79.0%
Final simplification79.0%
(FPCore (x y z t a b) :precision binary64 (+ (* b (- a 0.5)) (+ x y)))
double code(double x, double y, double z, double t, double a, double b) {
return (b * (a - 0.5)) + (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 = (b * (a - 0.5d0)) + (x + y)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (b * (a - 0.5)) + (x + y);
}
def code(x, y, z, t, a, b): return (b * (a - 0.5)) + (x + y)
function code(x, y, z, t, a, b) return Float64(Float64(b * Float64(a - 0.5)) + Float64(x + y)) end
function tmp = code(x, y, z, t, a, b) tmp = (b * (a - 0.5)) + (x + y); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
b \cdot \left(a - 0.5\right) + \left(x + y\right)
\end{array}
Initial program 99.8%
associate-+l-99.8%
+-commutative99.8%
associate-+l+99.8%
associate--l+99.8%
fma-neg99.8%
distribute-lft-neg-in99.8%
*-commutative99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
metadata-eval99.8%
metadata-eval99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in z around 0 78.4%
Final simplification78.4%
(FPCore (x y z t a b) :precision binary64 (if (<= a -6.6e+63) (* a b) (if (<= a 320.0) (+ x y) (* a b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -6.6e+63) {
tmp = a * b;
} else if (a <= 320.0) {
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) :: tmp
if (a <= (-6.6d+63)) then
tmp = a * b
else if (a <= 320.0d0) 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 tmp;
if (a <= -6.6e+63) {
tmp = a * b;
} else if (a <= 320.0) {
tmp = x + y;
} else {
tmp = a * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -6.6e+63: tmp = a * b elif a <= 320.0: tmp = x + y else: tmp = a * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -6.6e+63) tmp = Float64(a * b); elseif (a <= 320.0) tmp = Float64(x + y); else tmp = Float64(a * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -6.6e+63) tmp = a * b; elseif (a <= 320.0) tmp = x + y; else tmp = a * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -6.6e+63], N[(a * b), $MachinePrecision], If[LessEqual[a, 320.0], N[(x + y), $MachinePrecision], N[(a * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.6 \cdot 10^{+63}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;a \leq 320:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if a < -6.6000000000000003e63 or 320 < a Initial program 99.8%
+-commutative99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
associate--l+99.8%
associate-+l+99.8%
Simplified99.8%
Taylor expanded in y around 0 84.3%
Taylor expanded in a around inf 55.5%
*-commutative55.5%
Simplified55.5%
if -6.6000000000000003e63 < a < 320Initial program 99.8%
associate-+l-99.8%
+-commutative99.8%
associate-+l+99.8%
associate--l+99.8%
fma-neg99.8%
distribute-lft-neg-in99.8%
*-commutative99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
metadata-eval99.8%
metadata-eval99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in x around inf 59.0%
Final simplification57.5%
(FPCore (x y z t a b) :precision binary64 (if (<= x -1.15e-69) x y))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.15e-69) {
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 (x <= (-1.15d-69)) 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 (x <= -1.15e-69) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -1.15e-69: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -1.15e-69) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -1.15e-69) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1.15e-69], x, y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.15 \cdot 10^{-69}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if x < -1.15e-69Initial program 99.9%
remove-double-neg99.9%
distribute-rgt-neg-out99.9%
associate--l+99.9%
distribute-rgt-neg-in99.9%
sub-neg99.9%
metadata-eval99.9%
remove-double-neg99.9%
Simplified99.9%
Taylor expanded in a around 0 73.5%
Taylor expanded in x around inf 35.9%
if -1.15e-69 < x Initial program 99.8%
associate-+l-99.8%
+-commutative99.8%
associate-+l+99.8%
associate--l+99.8%
fma-neg99.8%
distribute-lft-neg-in99.8%
*-commutative99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
metadata-eval99.8%
metadata-eval99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in y around inf 23.2%
Final simplification27.5%
(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.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
associate--l+99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
metadata-eval99.8%
remove-double-neg99.8%
Simplified99.8%
Taylor expanded in a around 0 72.9%
Taylor expanded in x around inf 23.6%
Final simplification23.6%
(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 2023279
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, A"
:precision binary64
:herbie-target
(+ (+ (+ x y) (/ (* (- 1.0 (pow (log t) 2.0)) z) (+ 1.0 (log t)))) (* (- a 0.5) b))
(+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))