
(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 (- 1.0 (log t))) (fma (+ a -0.5) b (+ x y))))
double code(double x, double y, double z, double t, double a, double b) {
return (z * (1.0 - log(t))) + fma((a + -0.5), b, (x + y));
}
function code(x, y, z, t, a, b) return Float64(Float64(z * Float64(1.0 - log(t))) + fma(Float64(a + -0.5), b, Float64(x + y))) end
code[x_, y_, z_, t_, a_, b_] := N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * b + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
z \cdot \left(1 - \log t\right) + \mathsf{fma}\left(a + -0.5, b, x + y\right)
\end{array}
Initial program 99.4%
+-commutative99.4%
associate--l+99.4%
associate-+r+99.4%
+-commutative99.4%
*-lft-identity99.4%
metadata-eval99.4%
*-commutative99.4%
distribute-rgt-out--99.5%
metadata-eval99.5%
fma-def99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Final simplification99.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (+ a -0.5) b)))
(if (<= (+ x y) -5e+110)
(+ (+ y (+ z x)) t_1)
(+ t_1 (- (+ z y) (* z (log t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a + -0.5) * b;
double tmp;
if ((x + y) <= -5e+110) {
tmp = (y + (z + x)) + t_1;
} else {
tmp = t_1 + ((z + y) - (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) :: t_1
real(8) :: tmp
t_1 = (a + (-0.5d0)) * b
if ((x + y) <= (-5d+110)) then
tmp = (y + (z + x)) + t_1
else
tmp = t_1 + ((z + y) - (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 t_1 = (a + -0.5) * b;
double tmp;
if ((x + y) <= -5e+110) {
tmp = (y + (z + x)) + t_1;
} else {
tmp = t_1 + ((z + y) - (z * Math.log(t)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a + -0.5) * b tmp = 0 if (x + y) <= -5e+110: tmp = (y + (z + x)) + t_1 else: tmp = t_1 + ((z + y) - (z * math.log(t))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a + -0.5) * b) tmp = 0.0 if (Float64(x + y) <= -5e+110) tmp = Float64(Float64(y + Float64(z + x)) + t_1); else tmp = Float64(t_1 + Float64(Float64(z + y) - Float64(z * log(t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a + -0.5) * b; tmp = 0.0; if ((x + y) <= -5e+110) tmp = (y + (z + x)) + t_1; else tmp = t_1 + ((z + y) - (z * log(t))); 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[(x + y), $MachinePrecision], -5e+110], N[(N[(y + N[(z + x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(t$95$1 + N[(N[(z + y), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + -0.5\right) \cdot b\\
\mathbf{if}\;x + y \leq -5 \cdot 10^{+110}:\\
\;\;\;\;\left(y + \left(z + x\right)\right) + t_1\\
\mathbf{else}:\\
\;\;\;\;t_1 + \left(\left(z + y\right) - z \cdot \log t\right)\\
\end{array}
\end{array}
if (+.f64 x y) < -4.99999999999999978e110Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
add-sqr-sqrt52.8%
pow252.8%
Applied egg-rr52.8%
Taylor expanded in z around 0 88.1%
+-commutative88.1%
associate-+r+88.1%
Simplified88.1%
if -4.99999999999999978e110 < (+.f64 x y) Initial program 99.3%
associate-+l-99.3%
+-commutative99.3%
associate-+l-99.3%
associate-+l+99.3%
sub-neg99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 81.9%
+-commutative81.9%
Simplified81.9%
Final simplification83.6%
(FPCore (x y z t a b) :precision binary64 (+ (- (+ y (+ z x)) (* z (log t))) (* (+ a -0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((y + (z + x)) - (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 = ((y + (z + x)) - (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 ((y + (z + x)) - (z * Math.log(t))) + ((a + -0.5) * b);
}
def code(x, y, z, t, a, b): return ((y + (z + x)) - (z * math.log(t))) + ((a + -0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(y + Float64(z + x)) - Float64(z * log(t))) + Float64(Float64(a + -0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((y + (z + x)) - (z * log(t))) + ((a + -0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(y + N[(z + x), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(y + \left(z + x\right)\right) - z \cdot \log t\right) + \left(a + -0.5\right) \cdot b
\end{array}
Initial program 99.4%
associate-+l-99.4%
+-commutative99.4%
associate-+l-99.4%
associate-+l+99.4%
sub-neg99.4%
metadata-eval99.4%
Simplified99.4%
Final simplification99.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- 1.0 (log t)))))
(if (<= z -2.25e+249)
t_1
(if (<= z -6.5e+193)
(+ x (+ y (* b (- a 0.5))))
(if (or (<= z -3.7e+180) (not (<= z 9e+187)))
t_1
(+ (+ y (+ z x)) (* (+ a -0.5) b)))))))
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.25e+249) {
tmp = t_1;
} else if (z <= -6.5e+193) {
tmp = x + (y + (b * (a - 0.5)));
} else if ((z <= -3.7e+180) || !(z <= 9e+187)) {
tmp = t_1;
} else {
tmp = (y + (z + x)) + ((a + -0.5) * 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 = z * (1.0d0 - log(t))
if (z <= (-2.25d+249)) then
tmp = t_1
else if (z <= (-6.5d+193)) then
tmp = x + (y + (b * (a - 0.5d0)))
else if ((z <= (-3.7d+180)) .or. (.not. (z <= 9d+187))) then
tmp = t_1
else
tmp = (y + (z + x)) + ((a + (-0.5d0)) * 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 = z * (1.0 - Math.log(t));
double tmp;
if (z <= -2.25e+249) {
tmp = t_1;
} else if (z <= -6.5e+193) {
tmp = x + (y + (b * (a - 0.5)));
} else if ((z <= -3.7e+180) || !(z <= 9e+187)) {
tmp = t_1;
} else {
tmp = (y + (z + x)) + ((a + -0.5) * b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (1.0 - math.log(t)) tmp = 0 if z <= -2.25e+249: tmp = t_1 elif z <= -6.5e+193: tmp = x + (y + (b * (a - 0.5))) elif (z <= -3.7e+180) or not (z <= 9e+187): tmp = t_1 else: tmp = (y + (z + x)) + ((a + -0.5) * b) 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.25e+249) tmp = t_1; elseif (z <= -6.5e+193) tmp = Float64(x + Float64(y + Float64(b * Float64(a - 0.5)))); elseif ((z <= -3.7e+180) || !(z <= 9e+187)) tmp = t_1; else tmp = Float64(Float64(y + Float64(z + x)) + Float64(Float64(a + -0.5) * b)); 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.25e+249) tmp = t_1; elseif (z <= -6.5e+193) tmp = x + (y + (b * (a - 0.5))); elseif ((z <= -3.7e+180) || ~((z <= 9e+187))) tmp = t_1; else tmp = (y + (z + x)) + ((a + -0.5) * b); 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.25e+249], t$95$1, If[LessEqual[z, -6.5e+193], N[(x + N[(y + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -3.7e+180], N[Not[LessEqual[z, 9e+187]], $MachinePrecision]], t$95$1, N[(N[(y + N[(z + x), $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(1 - \log t\right)\\
\mathbf{if}\;z \leq -2.25 \cdot 10^{+249}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -6.5 \cdot 10^{+193}:\\
\;\;\;\;x + \left(y + b \cdot \left(a - 0.5\right)\right)\\
\mathbf{elif}\;z \leq -3.7 \cdot 10^{+180} \lor \neg \left(z \leq 9 \cdot 10^{+187}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\left(y + \left(z + x\right)\right) + \left(a + -0.5\right) \cdot b\\
\end{array}
\end{array}
if z < -2.2499999999999998e249 or -6.4999999999999997e193 < z < -3.7000000000000002e180 or 9.00000000000000052e187 < z Initial program 97.5%
associate-+l-97.5%
+-commutative97.5%
associate-+l-97.5%
associate-+l+97.5%
sub-neg97.5%
metadata-eval97.5%
Simplified97.5%
Taylor expanded in a around 0 97.5%
Taylor expanded in z around inf 69.6%
if -2.2499999999999998e249 < z < -6.4999999999999997e193Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 70.2%
if -3.7000000000000002e180 < z < 9.00000000000000052e187Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
add-sqr-sqrt46.8%
pow246.8%
Applied egg-rr46.8%
Taylor expanded in z around 0 92.9%
+-commutative92.9%
associate-+r+92.9%
Simplified92.9%
Final simplification87.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.8e+248)
(- z (* z (log t)))
(if (<= z -8.3e+201)
(+ x (+ y (* b (- a 0.5))))
(if (or (<= z -3.7e+180) (not (<= z 6.5e+186)))
(* z (- 1.0 (log t)))
(+ (+ y (+ z x)) (* (+ a -0.5) b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.8e+248) {
tmp = z - (z * log(t));
} else if (z <= -8.3e+201) {
tmp = x + (y + (b * (a - 0.5)));
} else if ((z <= -3.7e+180) || !(z <= 6.5e+186)) {
tmp = z * (1.0 - log(t));
} else {
tmp = (y + (z + x)) + ((a + -0.5) * 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 (z <= (-1.8d+248)) then
tmp = z - (z * log(t))
else if (z <= (-8.3d+201)) then
tmp = x + (y + (b * (a - 0.5d0)))
else if ((z <= (-3.7d+180)) .or. (.not. (z <= 6.5d+186))) then
tmp = z * (1.0d0 - log(t))
else
tmp = (y + (z + x)) + ((a + (-0.5d0)) * 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 (z <= -1.8e+248) {
tmp = z - (z * Math.log(t));
} else if (z <= -8.3e+201) {
tmp = x + (y + (b * (a - 0.5)));
} else if ((z <= -3.7e+180) || !(z <= 6.5e+186)) {
tmp = z * (1.0 - Math.log(t));
} else {
tmp = (y + (z + x)) + ((a + -0.5) * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.8e+248: tmp = z - (z * math.log(t)) elif z <= -8.3e+201: tmp = x + (y + (b * (a - 0.5))) elif (z <= -3.7e+180) or not (z <= 6.5e+186): tmp = z * (1.0 - math.log(t)) else: tmp = (y + (z + x)) + ((a + -0.5) * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.8e+248) tmp = Float64(z - Float64(z * log(t))); elseif (z <= -8.3e+201) tmp = Float64(x + Float64(y + Float64(b * Float64(a - 0.5)))); elseif ((z <= -3.7e+180) || !(z <= 6.5e+186)) tmp = Float64(z * Float64(1.0 - log(t))); else tmp = Float64(Float64(y + Float64(z + x)) + Float64(Float64(a + -0.5) * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.8e+248) tmp = z - (z * log(t)); elseif (z <= -8.3e+201) tmp = x + (y + (b * (a - 0.5))); elseif ((z <= -3.7e+180) || ~((z <= 6.5e+186))) tmp = z * (1.0 - log(t)); else tmp = (y + (z + x)) + ((a + -0.5) * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.8e+248], N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -8.3e+201], N[(x + N[(y + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -3.7e+180], N[Not[LessEqual[z, 6.5e+186]], $MachinePrecision]], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y + N[(z + x), $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+248}:\\
\;\;\;\;z - z \cdot \log t\\
\mathbf{elif}\;z \leq -8.3 \cdot 10^{+201}:\\
\;\;\;\;x + \left(y + b \cdot \left(a - 0.5\right)\right)\\
\mathbf{elif}\;z \leq -3.7 \cdot 10^{+180} \lor \neg \left(z \leq 6.5 \cdot 10^{+186}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y + \left(z + x\right)\right) + \left(a + -0.5\right) \cdot b\\
\end{array}
\end{array}
if z < -1.80000000000000001e248Initial program 99.6%
associate-+l-99.6%
+-commutative99.6%
associate-+l-99.6%
associate-+l+99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around -inf 74.7%
distribute-rgt-in74.8%
*-un-lft-identity74.8%
mul-1-neg74.8%
Applied egg-rr74.8%
if -1.80000000000000001e248 < z < -8.30000000000000005e201Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 70.2%
if -8.30000000000000005e201 < z < -3.7000000000000002e180 or 6.4999999999999997e186 < z Initial program 96.5%
associate-+l-96.5%
+-commutative96.5%
associate-+l-96.5%
associate-+l+96.5%
sub-neg96.5%
metadata-eval96.5%
Simplified96.5%
Taylor expanded in a around 0 96.4%
Taylor expanded in z around inf 67.0%
if -3.7000000000000002e180 < z < 6.4999999999999997e186Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
add-sqr-sqrt46.8%
pow246.8%
Applied egg-rr46.8%
Taylor expanded in z around 0 92.9%
+-commutative92.9%
associate-+r+92.9%
Simplified92.9%
Final simplification87.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -4.4e+117) (not (<= z 3.6e+186))) (+ (* z (- 1.0 (log t))) (+ x y)) (+ (+ y (+ z x)) (* (+ a -0.5) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.4e+117) || !(z <= 3.6e+186)) {
tmp = (z * (1.0 - log(t))) + (x + y);
} else {
tmp = (y + (z + x)) + ((a + -0.5) * 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 ((z <= (-4.4d+117)) .or. (.not. (z <= 3.6d+186))) then
tmp = (z * (1.0d0 - log(t))) + (x + y)
else
tmp = (y + (z + x)) + ((a + (-0.5d0)) * 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 ((z <= -4.4e+117) || !(z <= 3.6e+186)) {
tmp = (z * (1.0 - Math.log(t))) + (x + y);
} else {
tmp = (y + (z + x)) + ((a + -0.5) * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -4.4e+117) or not (z <= 3.6e+186): tmp = (z * (1.0 - math.log(t))) + (x + y) else: tmp = (y + (z + x)) + ((a + -0.5) * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -4.4e+117) || !(z <= 3.6e+186)) tmp = Float64(Float64(z * Float64(1.0 - log(t))) + Float64(x + y)); else tmp = Float64(Float64(y + Float64(z + x)) + Float64(Float64(a + -0.5) * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -4.4e+117) || ~((z <= 3.6e+186))) tmp = (z * (1.0 - log(t))) + (x + y); else tmp = (y + (z + x)) + ((a + -0.5) * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4.4e+117], N[Not[LessEqual[z, 3.6e+186]], $MachinePrecision]], N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision], N[(N[(y + N[(z + x), $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{+117} \lor \neg \left(z \leq 3.6 \cdot 10^{+186}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right) + \left(x + y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y + \left(z + x\right)\right) + \left(a + -0.5\right) \cdot b\\
\end{array}
\end{array}
if z < -4.40000000000000028e117 or 3.6000000000000002e186 < z Initial program 98.2%
+-commutative98.2%
associate--l+98.2%
associate-+r+98.2%
+-commutative98.2%
*-lft-identity98.2%
metadata-eval98.2%
*-commutative98.2%
distribute-rgt-out--98.3%
metadata-eval98.3%
fma-def98.3%
sub-neg98.3%
metadata-eval98.3%
Simplified98.3%
Taylor expanded in b around 0 78.5%
if -4.40000000000000028e117 < z < 3.6000000000000002e186Initial program 100.0%
associate-+l-100.0%
+-commutative100.0%
associate-+l-100.0%
associate-+l+100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
add-sqr-sqrt46.3%
pow246.3%
Applied egg-rr46.3%
Taylor expanded in z around 0 94.9%
+-commutative94.9%
associate-+r+94.9%
Simplified94.9%
Final simplification89.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -2.35e+117)
(- (+ x (+ z y)) (* z (log t)))
(if (<= z 3.3e+186)
(+ (+ y (+ z x)) (* (+ a -0.5) b))
(+ (* z (- 1.0 (log t))) (+ x y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.35e+117) {
tmp = (x + (z + y)) - (z * log(t));
} else if (z <= 3.3e+186) {
tmp = (y + (z + x)) + ((a + -0.5) * b);
} else {
tmp = (z * (1.0 - log(t))) + (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) :: tmp
if (z <= (-2.35d+117)) then
tmp = (x + (z + y)) - (z * log(t))
else if (z <= 3.3d+186) then
tmp = (y + (z + x)) + ((a + (-0.5d0)) * b)
else
tmp = (z * (1.0d0 - log(t))) + (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 tmp;
if (z <= -2.35e+117) {
tmp = (x + (z + y)) - (z * Math.log(t));
} else if (z <= 3.3e+186) {
tmp = (y + (z + x)) + ((a + -0.5) * b);
} else {
tmp = (z * (1.0 - Math.log(t))) + (x + y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -2.35e+117: tmp = (x + (z + y)) - (z * math.log(t)) elif z <= 3.3e+186: tmp = (y + (z + x)) + ((a + -0.5) * b) else: tmp = (z * (1.0 - math.log(t))) + (x + y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.35e+117) tmp = Float64(Float64(x + Float64(z + y)) - Float64(z * log(t))); elseif (z <= 3.3e+186) tmp = Float64(Float64(y + Float64(z + x)) + Float64(Float64(a + -0.5) * b)); else tmp = Float64(Float64(z * Float64(1.0 - log(t))) + Float64(x + y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -2.35e+117) tmp = (x + (z + y)) - (z * log(t)); elseif (z <= 3.3e+186) tmp = (y + (z + x)) + ((a + -0.5) * b); else tmp = (z * (1.0 - log(t))) + (x + y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.35e+117], N[(N[(x + N[(z + y), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.3e+186], N[(N[(y + N[(z + x), $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.35 \cdot 10^{+117}:\\
\;\;\;\;\left(x + \left(z + y\right)\right) - z \cdot \log t\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{+186}:\\
\;\;\;\;\left(y + \left(z + x\right)\right) + \left(a + -0.5\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(1 - \log t\right) + \left(x + y\right)\\
\end{array}
\end{array}
if z < -2.35000000000000003e117Initial program 99.6%
associate-+l-99.6%
+-commutative99.6%
associate-+l-99.6%
associate-+l+99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in b around 0 76.0%
if -2.35000000000000003e117 < z < 3.30000000000000023e186Initial program 100.0%
associate-+l-100.0%
+-commutative100.0%
associate-+l-100.0%
associate-+l+100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
add-sqr-sqrt46.3%
pow246.3%
Applied egg-rr46.3%
Taylor expanded in z around 0 94.9%
+-commutative94.9%
associate-+r+94.9%
Simplified94.9%
if 3.30000000000000023e186 < z Initial program 95.9%
+-commutative95.9%
associate--l+95.9%
associate-+r+95.9%
+-commutative95.9%
*-lft-identity95.9%
metadata-eval95.9%
*-commutative95.9%
distribute-rgt-out--96.1%
metadata-eval96.1%
fma-def96.1%
sub-neg96.1%
metadata-eval96.1%
Simplified96.1%
Taylor expanded in b around 0 82.7%
Final simplification90.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (+ a -0.5) b)))
(if (<= z -1.45e+171)
(+ t_1 (- z (* z (log t))))
(if (<= z 4.5e+186)
(+ (+ y (+ z x)) t_1)
(+ (* z (- 1.0 (log t))) (+ x y))))))
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 <= -1.45e+171) {
tmp = t_1 + (z - (z * log(t)));
} else if (z <= 4.5e+186) {
tmp = (y + (z + x)) + t_1;
} else {
tmp = (z * (1.0 - log(t))) + (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 = (a + (-0.5d0)) * b
if (z <= (-1.45d+171)) then
tmp = t_1 + (z - (z * log(t)))
else if (z <= 4.5d+186) then
tmp = (y + (z + x)) + t_1
else
tmp = (z * (1.0d0 - log(t))) + (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 = (a + -0.5) * b;
double tmp;
if (z <= -1.45e+171) {
tmp = t_1 + (z - (z * Math.log(t)));
} else if (z <= 4.5e+186) {
tmp = (y + (z + x)) + t_1;
} else {
tmp = (z * (1.0 - Math.log(t))) + (x + y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a + -0.5) * b tmp = 0 if z <= -1.45e+171: tmp = t_1 + (z - (z * math.log(t))) elif z <= 4.5e+186: tmp = (y + (z + x)) + t_1 else: tmp = (z * (1.0 - math.log(t))) + (x + y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a + -0.5) * b) tmp = 0.0 if (z <= -1.45e+171) tmp = Float64(t_1 + Float64(z - Float64(z * log(t)))); elseif (z <= 4.5e+186) tmp = Float64(Float64(y + Float64(z + x)) + t_1); else tmp = Float64(Float64(z * Float64(1.0 - log(t))) + Float64(x + y)); 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 <= -1.45e+171) tmp = t_1 + (z - (z * log(t))); elseif (z <= 4.5e+186) tmp = (y + (z + x)) + t_1; else tmp = (z * (1.0 - log(t))) + (x + y); 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[z, -1.45e+171], N[(t$95$1 + N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e+186], N[(N[(y + N[(z + x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + -0.5\right) \cdot b\\
\mathbf{if}\;z \leq -1.45 \cdot 10^{+171}:\\
\;\;\;\;t_1 + \left(z - z \cdot \log t\right)\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+186}:\\
\;\;\;\;\left(y + \left(z + x\right)\right) + t_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(1 - \log t\right) + \left(x + y\right)\\
\end{array}
\end{array}
if z < -1.44999999999999992e171Initial program 99.7%
associate-+l-99.7%
+-commutative99.7%
associate-+l-99.7%
associate-+l+99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 93.6%
+-commutative93.6%
Simplified93.6%
Taylor expanded in y around 0 88.4%
if -1.44999999999999992e171 < z < 4.50000000000000045e186Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
add-sqr-sqrt47.6%
pow247.6%
Applied egg-rr47.6%
Taylor expanded in z around 0 93.3%
+-commutative93.3%
associate-+r+93.3%
Simplified93.3%
if 4.50000000000000045e186 < z Initial program 95.9%
+-commutative95.9%
associate--l+95.9%
associate-+r+95.9%
+-commutative95.9%
*-lft-identity95.9%
metadata-eval95.9%
*-commutative95.9%
distribute-rgt-out--96.1%
metadata-eval96.1%
fma-def96.1%
sub-neg96.1%
metadata-eval96.1%
Simplified96.1%
Taylor expanded in b around 0 82.7%
Final simplification91.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.9e+145) (not (<= z 5.6e+187))) (+ (* z (- 1.0 (log t))) y) (+ (+ y (+ z x)) (* (+ a -0.5) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.9e+145) || !(z <= 5.6e+187)) {
tmp = (z * (1.0 - log(t))) + y;
} else {
tmp = (y + (z + x)) + ((a + -0.5) * 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 ((z <= (-3.9d+145)) .or. (.not. (z <= 5.6d+187))) then
tmp = (z * (1.0d0 - log(t))) + y
else
tmp = (y + (z + x)) + ((a + (-0.5d0)) * 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 ((z <= -3.9e+145) || !(z <= 5.6e+187)) {
tmp = (z * (1.0 - Math.log(t))) + y;
} else {
tmp = (y + (z + x)) + ((a + -0.5) * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.9e+145) or not (z <= 5.6e+187): tmp = (z * (1.0 - math.log(t))) + y else: tmp = (y + (z + x)) + ((a + -0.5) * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.9e+145) || !(z <= 5.6e+187)) tmp = Float64(Float64(z * Float64(1.0 - log(t))) + y); else tmp = Float64(Float64(y + Float64(z + x)) + Float64(Float64(a + -0.5) * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3.9e+145) || ~((z <= 5.6e+187))) tmp = (z * (1.0 - log(t))) + y; else tmp = (y + (z + x)) + ((a + -0.5) * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.9e+145], N[Not[LessEqual[z, 5.6e+187]], $MachinePrecision]], N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision], N[(N[(y + N[(z + x), $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.9 \cdot 10^{+145} \lor \neg \left(z \leq 5.6 \cdot 10^{+187}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right) + y\\
\mathbf{else}:\\
\;\;\;\;\left(y + \left(z + x\right)\right) + \left(a + -0.5\right) \cdot b\\
\end{array}
\end{array}
if z < -3.8999999999999998e145 or 5.59999999999999979e187 < z Initial program 98.1%
+-commutative98.1%
associate--l+98.1%
associate-+r+98.1%
+-commutative98.1%
*-lft-identity98.1%
metadata-eval98.1%
*-commutative98.1%
distribute-rgt-out--98.2%
metadata-eval98.2%
fma-def98.2%
sub-neg98.2%
metadata-eval98.2%
Simplified98.2%
Taylor expanded in b around 0 76.7%
Taylor expanded in x around 0 68.3%
if -3.8999999999999998e145 < z < 5.59999999999999979e187Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
add-sqr-sqrt47.0%
pow247.0%
Applied egg-rr47.0%
Taylor expanded in z around 0 94.1%
+-commutative94.1%
associate-+r+94.1%
Simplified94.1%
Final simplification87.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -3.9e+145)
(+ (* z (- 1.0 (log t))) y)
(if (<= z 1.55e+187)
(+ (+ y (+ z x)) (* (+ a -0.5) b))
(- (+ z x) (* z (log t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.9e+145) {
tmp = (z * (1.0 - log(t))) + y;
} else if (z <= 1.55e+187) {
tmp = (y + (z + x)) + ((a + -0.5) * b);
} else {
tmp = (z + x) - (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 (z <= (-3.9d+145)) then
tmp = (z * (1.0d0 - log(t))) + y
else if (z <= 1.55d+187) then
tmp = (y + (z + x)) + ((a + (-0.5d0)) * b)
else
tmp = (z + x) - (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 (z <= -3.9e+145) {
tmp = (z * (1.0 - Math.log(t))) + y;
} else if (z <= 1.55e+187) {
tmp = (y + (z + x)) + ((a + -0.5) * b);
} else {
tmp = (z + x) - (z * Math.log(t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -3.9e+145: tmp = (z * (1.0 - math.log(t))) + y elif z <= 1.55e+187: tmp = (y + (z + x)) + ((a + -0.5) * b) else: tmp = (z + x) - (z * math.log(t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.9e+145) tmp = Float64(Float64(z * Float64(1.0 - log(t))) + y); elseif (z <= 1.55e+187) tmp = Float64(Float64(y + Float64(z + x)) + Float64(Float64(a + -0.5) * b)); else tmp = Float64(Float64(z + x) - Float64(z * log(t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -3.9e+145) tmp = (z * (1.0 - log(t))) + y; elseif (z <= 1.55e+187) tmp = (y + (z + x)) + ((a + -0.5) * b); else tmp = (z + x) - (z * log(t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.9e+145], N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[z, 1.55e+187], N[(N[(y + N[(z + x), $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], N[(N[(z + x), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.9 \cdot 10^{+145}:\\
\;\;\;\;z \cdot \left(1 - \log t\right) + y\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{+187}:\\
\;\;\;\;\left(y + \left(z + x\right)\right) + \left(a + -0.5\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(z + x\right) - z \cdot \log t\\
\end{array}
\end{array}
if z < -3.8999999999999998e145Initial program 99.7%
+-commutative99.7%
associate--l+99.7%
associate-+r+99.7%
+-commutative99.7%
*-lft-identity99.7%
metadata-eval99.7%
*-commutative99.7%
distribute-rgt-out--99.6%
metadata-eval99.6%
fma-def99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in b around 0 72.6%
Taylor expanded in x around 0 62.5%
if -3.8999999999999998e145 < z < 1.55000000000000006e187Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
add-sqr-sqrt47.0%
pow247.0%
Applied egg-rr47.0%
Taylor expanded in z around 0 94.1%
+-commutative94.1%
associate-+r+94.1%
Simplified94.1%
if 1.55000000000000006e187 < z Initial program 95.9%
associate-+l-95.9%
+-commutative95.9%
associate-+l-95.9%
associate-+l+95.9%
sub-neg95.9%
metadata-eval95.9%
Simplified95.9%
Taylor expanded in b around 0 82.5%
add-sqr-sqrt58.2%
pow258.2%
Applied egg-rr48.2%
Taylor expanded in y around 0 66.8%
Final simplification85.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (log t))))
(if (<= z -5e+143)
(- (+ z y) t_1)
(if (<= z 2.5e+186) (+ (+ y (+ z x)) (* (+ a -0.5) b)) (- (+ z x) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * log(t);
double tmp;
if (z <= -5e+143) {
tmp = (z + y) - t_1;
} else if (z <= 2.5e+186) {
tmp = (y + (z + x)) + ((a + -0.5) * b);
} else {
tmp = (z + 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 * log(t)
if (z <= (-5d+143)) then
tmp = (z + y) - t_1
else if (z <= 2.5d+186) then
tmp = (y + (z + x)) + ((a + (-0.5d0)) * b)
else
tmp = (z + 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 * Math.log(t);
double tmp;
if (z <= -5e+143) {
tmp = (z + y) - t_1;
} else if (z <= 2.5e+186) {
tmp = (y + (z + x)) + ((a + -0.5) * b);
} else {
tmp = (z + x) - t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * math.log(t) tmp = 0 if z <= -5e+143: tmp = (z + y) - t_1 elif z <= 2.5e+186: tmp = (y + (z + x)) + ((a + -0.5) * b) else: tmp = (z + x) - t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * log(t)) tmp = 0.0 if (z <= -5e+143) tmp = Float64(Float64(z + y) - t_1); elseif (z <= 2.5e+186) tmp = Float64(Float64(y + Float64(z + x)) + Float64(Float64(a + -0.5) * b)); else tmp = Float64(Float64(z + x) - t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * log(t); tmp = 0.0; if (z <= -5e+143) tmp = (z + y) - t_1; elseif (z <= 2.5e+186) tmp = (y + (z + x)) + ((a + -0.5) * b); else tmp = (z + x) - t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5e+143], N[(N[(z + y), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[z, 2.5e+186], N[(N[(y + N[(z + x), $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], N[(N[(z + x), $MachinePrecision] - t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \log t\\
\mathbf{if}\;z \leq -5 \cdot 10^{+143}:\\
\;\;\;\;\left(z + y\right) - t_1\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+186}:\\
\;\;\;\;\left(y + \left(z + x\right)\right) + \left(a + -0.5\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(z + x\right) - t_1\\
\end{array}
\end{array}
if z < -5.00000000000000012e143Initial program 99.7%
associate-+l-99.7%
+-commutative99.7%
associate-+l-99.7%
associate-+l+99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in b around 0 72.6%
Taylor expanded in x around 0 62.5%
if -5.00000000000000012e143 < z < 2.49999999999999977e186Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
add-sqr-sqrt47.0%
pow247.0%
Applied egg-rr47.0%
Taylor expanded in z around 0 94.1%
+-commutative94.1%
associate-+r+94.1%
Simplified94.1%
if 2.49999999999999977e186 < z Initial program 95.9%
associate-+l-95.9%
+-commutative95.9%
associate-+l-95.9%
associate-+l+95.9%
sub-neg95.9%
metadata-eval95.9%
Simplified95.9%
Taylor expanded in b around 0 82.5%
add-sqr-sqrt58.2%
pow258.2%
Applied egg-rr48.2%
Taylor expanded in y around 0 66.8%
Final simplification85.8%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= b -2.8e+190)
(not
(or (<= b -9.8e+148) (and (not (<= b -5.7e+79)) (<= b 1.4e+111)))))
(* b (- a 0.5))
(+ y (+ z x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -2.8e+190) || !((b <= -9.8e+148) || (!(b <= -5.7e+79) && (b <= 1.4e+111)))) {
tmp = b * (a - 0.5);
} else {
tmp = y + (z + x);
}
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 ((b <= (-2.8d+190)) .or. (.not. (b <= (-9.8d+148)) .or. (.not. (b <= (-5.7d+79))) .and. (b <= 1.4d+111))) then
tmp = b * (a - 0.5d0)
else
tmp = y + (z + x)
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 ((b <= -2.8e+190) || !((b <= -9.8e+148) || (!(b <= -5.7e+79) && (b <= 1.4e+111)))) {
tmp = b * (a - 0.5);
} else {
tmp = y + (z + x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -2.8e+190) or not ((b <= -9.8e+148) or (not (b <= -5.7e+79) and (b <= 1.4e+111))): tmp = b * (a - 0.5) else: tmp = y + (z + x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -2.8e+190) || !((b <= -9.8e+148) || (!(b <= -5.7e+79) && (b <= 1.4e+111)))) tmp = Float64(b * Float64(a - 0.5)); else tmp = Float64(y + Float64(z + x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -2.8e+190) || ~(((b <= -9.8e+148) || (~((b <= -5.7e+79)) && (b <= 1.4e+111))))) tmp = b * (a - 0.5); else tmp = y + (z + x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -2.8e+190], N[Not[Or[LessEqual[b, -9.8e+148], And[N[Not[LessEqual[b, -5.7e+79]], $MachinePrecision], LessEqual[b, 1.4e+111]]]], $MachinePrecision]], N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], N[(y + N[(z + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.8 \cdot 10^{+190} \lor \neg \left(b \leq -9.8 \cdot 10^{+148} \lor \neg \left(b \leq -5.7 \cdot 10^{+79}\right) \land b \leq 1.4 \cdot 10^{+111}\right):\\
\;\;\;\;b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;y + \left(z + x\right)\\
\end{array}
\end{array}
if b < -2.79999999999999997e190 or -9.8e148 < b < -5.6999999999999997e79 or 1.4e111 < b Initial program 98.9%
+-commutative98.9%
associate--l+98.9%
associate-+r+98.9%
+-commutative98.9%
*-lft-identity98.9%
metadata-eval98.9%
*-commutative98.9%
distribute-rgt-out--98.9%
metadata-eval98.9%
fma-def98.9%
sub-neg98.9%
metadata-eval98.9%
Simplified98.9%
Taylor expanded in b around inf 76.2%
if -2.79999999999999997e190 < b < -9.8e148 or -5.6999999999999997e79 < b < 1.4e111Initial program 99.8%
associate-+l-99.8%
+-commutative99.8%
associate-+l-99.8%
associate-+l+99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
add-sqr-sqrt49.5%
pow249.5%
Applied egg-rr49.5%
Taylor expanded in z around 0 74.2%
+-commutative74.2%
associate-+r+74.2%
Simplified74.2%
Taylor expanded in b around 0 59.6%
+-commutative59.6%
associate-+r+59.6%
+-commutative59.6%
Simplified59.6%
Final simplification66.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= x -2.5e+88)
x
(if (<= x -2050000.0)
(* a b)
(if (<= x -5.8e-28) (* -0.5 b) (if (<= x 1.95e-181) (* a b) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2.5e+88) {
tmp = x;
} else if (x <= -2050000.0) {
tmp = a * b;
} else if (x <= -5.8e-28) {
tmp = -0.5 * b;
} else if (x <= 1.95e-181) {
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 (x <= (-2.5d+88)) then
tmp = x
else if (x <= (-2050000.0d0)) then
tmp = a * b
else if (x <= (-5.8d-28)) then
tmp = (-0.5d0) * b
else if (x <= 1.95d-181) 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 (x <= -2.5e+88) {
tmp = x;
} else if (x <= -2050000.0) {
tmp = a * b;
} else if (x <= -5.8e-28) {
tmp = -0.5 * b;
} else if (x <= 1.95e-181) {
tmp = a * b;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -2.5e+88: tmp = x elif x <= -2050000.0: tmp = a * b elif x <= -5.8e-28: tmp = -0.5 * b elif x <= 1.95e-181: tmp = a * b else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -2.5e+88) tmp = x; elseif (x <= -2050000.0) tmp = Float64(a * b); elseif (x <= -5.8e-28) tmp = Float64(-0.5 * b); elseif (x <= 1.95e-181) 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 (x <= -2.5e+88) tmp = x; elseif (x <= -2050000.0) tmp = a * b; elseif (x <= -5.8e-28) tmp = -0.5 * b; elseif (x <= 1.95e-181) tmp = a * b; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2.5e+88], x, If[LessEqual[x, -2050000.0], N[(a * b), $MachinePrecision], If[LessEqual[x, -5.8e-28], N[(-0.5 * b), $MachinePrecision], If[LessEqual[x, 1.95e-181], N[(a * b), $MachinePrecision], y]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.5 \cdot 10^{+88}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -2050000:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;x \leq -5.8 \cdot 10^{-28}:\\
\;\;\;\;-0.5 \cdot b\\
\mathbf{elif}\;x \leq 1.95 \cdot 10^{-181}:\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if x < -2.49999999999999999e88Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.8%
metadata-eval99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 49.2%
if -2.49999999999999999e88 < x < -2.05e6 or -5.80000000000000026e-28 < x < 1.95e-181Initial program 99.7%
+-commutative99.7%
associate--l+99.8%
associate-+r+99.8%
+-commutative99.8%
*-lft-identity99.8%
metadata-eval99.8%
*-commutative99.8%
distribute-rgt-out--99.8%
metadata-eval99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around inf 30.8%
*-commutative30.8%
Simplified30.8%
if -2.05e6 < x < -5.80000000000000026e-28Initial program 100.0%
+-commutative100.0%
associate--l+100.0%
associate-+r+100.0%
+-commutative100.0%
*-lft-identity100.0%
metadata-eval100.0%
*-commutative100.0%
distribute-rgt-out--100.0%
metadata-eval100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in b around inf 71.9%
Taylor expanded in a around 0 45.0%
if 1.95e-181 < x Initial program 99.0%
+-commutative99.0%
associate--l+99.0%
associate-+r+99.0%
+-commutative99.0%
*-lft-identity99.0%
metadata-eval99.0%
*-commutative99.0%
distribute-rgt-out--99.0%
metadata-eval99.0%
fma-def99.0%
sub-neg99.0%
metadata-eval99.0%
Simplified99.0%
Taylor expanded in y around inf 21.3%
Final simplification29.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= x -1.12e+89)
(+ z x)
(if (<= x -80000.0)
(* a b)
(if (<= x -2.2e-27) (* -0.5 b) (if (<= x 2.4e-182) (* a b) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.12e+89) {
tmp = z + x;
} else if (x <= -80000.0) {
tmp = a * b;
} else if (x <= -2.2e-27) {
tmp = -0.5 * b;
} else if (x <= 2.4e-182) {
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 (x <= (-1.12d+89)) then
tmp = z + x
else if (x <= (-80000.0d0)) then
tmp = a * b
else if (x <= (-2.2d-27)) then
tmp = (-0.5d0) * b
else if (x <= 2.4d-182) 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 (x <= -1.12e+89) {
tmp = z + x;
} else if (x <= -80000.0) {
tmp = a * b;
} else if (x <= -2.2e-27) {
tmp = -0.5 * b;
} else if (x <= 2.4e-182) {
tmp = a * b;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -1.12e+89: tmp = z + x elif x <= -80000.0: tmp = a * b elif x <= -2.2e-27: tmp = -0.5 * b elif x <= 2.4e-182: tmp = a * b else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -1.12e+89) tmp = Float64(z + x); elseif (x <= -80000.0) tmp = Float64(a * b); elseif (x <= -2.2e-27) tmp = Float64(-0.5 * b); elseif (x <= 2.4e-182) 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 (x <= -1.12e+89) tmp = z + x; elseif (x <= -80000.0) tmp = a * b; elseif (x <= -2.2e-27) tmp = -0.5 * b; elseif (x <= 2.4e-182) tmp = a * b; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1.12e+89], N[(z + x), $MachinePrecision], If[LessEqual[x, -80000.0], N[(a * b), $MachinePrecision], If[LessEqual[x, -2.2e-27], N[(-0.5 * b), $MachinePrecision], If[LessEqual[x, 2.4e-182], N[(a * b), $MachinePrecision], y]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.12 \cdot 10^{+89}:\\
\;\;\;\;z + x\\
\mathbf{elif}\;x \leq -80000:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;x \leq -2.2 \cdot 10^{-27}:\\
\;\;\;\;-0.5 \cdot b\\
\mathbf{elif}\;x \leq 2.4 \cdot 10^{-182}:\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if x < -1.11999999999999995e89Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
add-sqr-sqrt49.9%
pow249.9%
Applied egg-rr49.9%
Taylor expanded in z around 0 79.7%
+-commutative79.7%
associate-+r+79.7%
Simplified79.7%
Taylor expanded in y around 0 69.3%
associate-+r+69.3%
sub-neg69.3%
metadata-eval69.3%
+-commutative69.3%
Simplified69.3%
Taylor expanded in b around 0 50.3%
if -1.11999999999999995e89 < x < -8e4 or -2.19999999999999987e-27 < x < 2.3999999999999998e-182Initial program 99.7%
+-commutative99.7%
associate--l+99.8%
associate-+r+99.8%
+-commutative99.8%
*-lft-identity99.8%
metadata-eval99.8%
*-commutative99.8%
distribute-rgt-out--99.8%
metadata-eval99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around inf 30.8%
*-commutative30.8%
Simplified30.8%
if -8e4 < x < -2.19999999999999987e-27Initial program 100.0%
+-commutative100.0%
associate--l+100.0%
associate-+r+100.0%
+-commutative100.0%
*-lft-identity100.0%
metadata-eval100.0%
*-commutative100.0%
distribute-rgt-out--100.0%
metadata-eval100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in b around inf 71.9%
Taylor expanded in a around 0 45.0%
if 2.3999999999999998e-182 < x Initial program 99.0%
+-commutative99.0%
associate--l+99.0%
associate-+r+99.0%
+-commutative99.0%
*-lft-identity99.0%
metadata-eval99.0%
*-commutative99.0%
distribute-rgt-out--99.0%
metadata-eval99.0%
fma-def99.0%
sub-neg99.0%
metadata-eval99.0%
Simplified99.0%
Taylor expanded in y around inf 21.3%
Final simplification30.1%
(FPCore (x y z t a b) :precision binary64 (+ x (+ y (+ (* -0.5 b) (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
return x + (y + ((-0.5 * b) + (a * 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 + (((-0.5d0) * b) + (a * b)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x + (y + ((-0.5 * b) + (a * b)));
}
def code(x, y, z, t, a, b): return x + (y + ((-0.5 * b) + (a * b)))
function code(x, y, z, t, a, b) return Float64(x + Float64(y + Float64(Float64(-0.5 * b) + Float64(a * b)))) end
function tmp = code(x, y, z, t, a, b) tmp = x + (y + ((-0.5 * b) + (a * b))); end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(y + N[(N[(-0.5 * b), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y + \left(-0.5 \cdot b + a \cdot b\right)\right)
\end{array}
Initial program 99.4%
associate-+l-99.4%
+-commutative99.4%
associate-+l-99.4%
associate-+l+99.4%
sub-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in a around 0 99.4%
Taylor expanded in z around 0 78.2%
Final simplification78.2%
(FPCore (x y z t a b) :precision binary64 (+ (+ y (+ z x)) (* (+ a -0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return (y + (z + x)) + ((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 = (y + (z + x)) + ((a + (-0.5d0)) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (y + (z + x)) + ((a + -0.5) * b);
}
def code(x, y, z, t, a, b): return (y + (z + x)) + ((a + -0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(y + Float64(z + x)) + Float64(Float64(a + -0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = (y + (z + x)) + ((a + -0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(y + N[(z + x), $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(y + \left(z + x\right)\right) + \left(a + -0.5\right) \cdot b
\end{array}
Initial program 99.4%
associate-+l-99.4%
+-commutative99.4%
associate-+l-99.4%
associate-+l+99.4%
sub-neg99.4%
metadata-eval99.4%
Simplified99.4%
add-sqr-sqrt48.7%
pow248.7%
Applied egg-rr48.7%
Taylor expanded in z around 0 78.9%
+-commutative78.9%
associate-+r+78.9%
Simplified78.9%
Final simplification78.9%
(FPCore (x y z t a b) :precision binary64 (if (<= x -1.5e+136) (+ z x) (if (<= x 3.5e+77) (* b (- a 0.5)) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.5e+136) {
tmp = z + x;
} else if (x <= 3.5e+77) {
tmp = b * (a - 0.5);
} 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.5d+136)) then
tmp = z + x
else if (x <= 3.5d+77) then
tmp = b * (a - 0.5d0)
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.5e+136) {
tmp = z + x;
} else if (x <= 3.5e+77) {
tmp = b * (a - 0.5);
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -1.5e+136: tmp = z + x elif x <= 3.5e+77: tmp = b * (a - 0.5) else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -1.5e+136) tmp = Float64(z + x); elseif (x <= 3.5e+77) tmp = Float64(b * Float64(a - 0.5)); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -1.5e+136) tmp = z + x; elseif (x <= 3.5e+77) tmp = b * (a - 0.5); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1.5e+136], N[(z + x), $MachinePrecision], If[LessEqual[x, 3.5e+77], N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.5 \cdot 10^{+136}:\\
\;\;\;\;z + x\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{+77}:\\
\;\;\;\;b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if x < -1.49999999999999989e136Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
add-sqr-sqrt48.4%
pow248.4%
Applied egg-rr48.4%
Taylor expanded in z around 0 79.3%
+-commutative79.3%
associate-+r+79.3%
Simplified79.3%
Taylor expanded in y around 0 73.2%
associate-+r+73.2%
sub-neg73.2%
metadata-eval73.2%
+-commutative73.2%
Simplified73.2%
Taylor expanded in b around 0 54.4%
if -1.49999999999999989e136 < x < 3.5000000000000001e77Initial program 99.8%
+-commutative99.8%
associate--l+99.8%
associate-+r+99.8%
+-commutative99.8%
*-lft-identity99.8%
metadata-eval99.8%
*-commutative99.8%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in b around inf 47.3%
if 3.5000000000000001e77 < x Initial program 98.1%
+-commutative98.1%
associate--l+98.1%
associate-+r+98.1%
+-commutative98.1%
*-lft-identity98.1%
metadata-eval98.1%
*-commutative98.1%
distribute-rgt-out--98.1%
metadata-eval98.1%
fma-def98.1%
sub-neg98.1%
metadata-eval98.1%
Simplified98.1%
Taylor expanded in y around inf 21.3%
Final simplification42.5%
(FPCore (x y z t a b) :precision binary64 (if (<= y 1.15e+162) (+ x (* b (- a 0.5))) (+ y (+ z x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 1.15e+162) {
tmp = x + (b * (a - 0.5));
} else {
tmp = y + (z + x);
}
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.15d+162) then
tmp = x + (b * (a - 0.5d0))
else
tmp = y + (z + x)
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.15e+162) {
tmp = x + (b * (a - 0.5));
} else {
tmp = y + (z + x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 1.15e+162: tmp = x + (b * (a - 0.5)) else: tmp = y + (z + x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 1.15e+162) tmp = Float64(x + Float64(b * Float64(a - 0.5))); else tmp = Float64(y + Float64(z + x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 1.15e+162) tmp = x + (b * (a - 0.5)); else tmp = y + (z + x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 1.15e+162], N[(x + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(z + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.15 \cdot 10^{+162}:\\
\;\;\;\;x + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;y + \left(z + x\right)\\
\end{array}
\end{array}
if y < 1.14999999999999997e162Initial program 99.4%
associate-+l-99.4%
+-commutative99.4%
associate-+l-99.4%
associate-+l+99.4%
sub-neg99.4%
metadata-eval99.4%
Simplified99.4%
add-sqr-sqrt48.5%
pow248.5%
Applied egg-rr48.5%
Taylor expanded in z around 0 77.7%
+-commutative77.7%
associate-+r+77.7%
Simplified77.7%
Taylor expanded in y around 0 63.4%
associate-+r+63.4%
sub-neg63.4%
metadata-eval63.4%
+-commutative63.4%
Simplified63.4%
Taylor expanded in z around 0 62.6%
if 1.14999999999999997e162 < y Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
add-sqr-sqrt49.8%
pow249.8%
Applied egg-rr49.8%
Taylor expanded in z around 0 86.6%
+-commutative86.6%
associate-+r+86.6%
Simplified86.6%
Taylor expanded in b around 0 63.8%
+-commutative63.8%
associate-+r+63.8%
+-commutative63.8%
Simplified63.8%
Final simplification62.7%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5)))) (if (<= x -29000000.0) (+ 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 <= -29000000.0) {
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 <= (-29000000.0d0)) 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 <= -29000000.0) {
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 <= -29000000.0: 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 (x <= -29000000.0) 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 <= -29000000.0) 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[x, -29000000.0], 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 \leq -29000000:\\
\;\;\;\;x + t_1\\
\mathbf{else}:\\
\;\;\;\;y + t_1\\
\end{array}
\end{array}
if x < -2.9e7Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
add-sqr-sqrt50.7%
pow250.7%
Applied egg-rr50.7%
Taylor expanded in z around 0 78.9%
+-commutative78.9%
associate-+r+78.9%
Simplified78.9%
Taylor expanded in y around 0 64.0%
associate-+r+64.0%
sub-neg64.0%
metadata-eval64.0%
+-commutative64.0%
Simplified64.0%
Taylor expanded in z around 0 63.5%
if -2.9e7 < x Initial program 99.3%
associate-+l-99.3%
+-commutative99.3%
associate-+l-99.3%
associate-+l+99.3%
sub-neg99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 85.2%
+-commutative85.2%
Simplified85.2%
Taylor expanded in z around 0 64.5%
Final simplification64.3%
(FPCore (x y z t a b) :precision binary64 (+ x (+ y (* b (- a 0.5)))))
double code(double x, double y, double z, double t, double a, double b) {
return x + (y + (b * (a - 0.5)));
}
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 + (b * (a - 0.5d0)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x + (y + (b * (a - 0.5)));
}
def code(x, y, z, t, a, b): return x + (y + (b * (a - 0.5)))
function code(x, y, z, t, a, b) return Float64(x + Float64(y + Float64(b * Float64(a - 0.5)))) end
function tmp = code(x, y, z, t, a, b) tmp = x + (y + (b * (a - 0.5))); end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(y + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y + b \cdot \left(a - 0.5\right)\right)
\end{array}
Initial program 99.4%
+-commutative99.4%
associate--l+99.4%
associate-+r+99.4%
+-commutative99.4%
*-lft-identity99.4%
metadata-eval99.4%
*-commutative99.4%
distribute-rgt-out--99.5%
metadata-eval99.5%
fma-def99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 78.2%
Final simplification78.2%
(FPCore (x y z t a b) :precision binary64 (if (<= y 2.85e-27) x (if (<= y 4.8e+155) (* -0.5 b) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 2.85e-27) {
tmp = x;
} else if (y <= 4.8e+155) {
tmp = -0.5 * 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 <= 2.85d-27) then
tmp = x
else if (y <= 4.8d+155) then
tmp = (-0.5d0) * 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 <= 2.85e-27) {
tmp = x;
} else if (y <= 4.8e+155) {
tmp = -0.5 * b;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 2.85e-27: tmp = x elif y <= 4.8e+155: tmp = -0.5 * b else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 2.85e-27) tmp = x; elseif (y <= 4.8e+155) tmp = Float64(-0.5 * b); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 2.85e-27) tmp = x; elseif (y <= 4.8e+155) tmp = -0.5 * b; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 2.85e-27], x, If[LessEqual[y, 4.8e+155], N[(-0.5 * b), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.85 \cdot 10^{-27}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{+155}:\\
\;\;\;\;-0.5 \cdot b\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < 2.8499999999999998e-27Initial program 99.3%
+-commutative99.3%
associate--l+99.3%
associate-+r+99.3%
+-commutative99.3%
*-lft-identity99.3%
metadata-eval99.3%
*-commutative99.3%
distribute-rgt-out--99.4%
metadata-eval99.4%
fma-def99.4%
sub-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 22.9%
if 2.8499999999999998e-27 < y < 4.80000000000000042e155Initial program 99.7%
+-commutative99.7%
associate--l+99.7%
associate-+r+99.7%
+-commutative99.7%
*-lft-identity99.7%
metadata-eval99.7%
*-commutative99.7%
distribute-rgt-out--99.7%
metadata-eval99.7%
fma-def99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in b around inf 41.1%
Taylor expanded in a around 0 24.3%
if 4.80000000000000042e155 < y Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 53.3%
Final simplification27.3%
(FPCore (x y z t a b) :precision binary64 (if (<= y 3.4e+17) x y))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 3.4e+17) {
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 (y <= 3.4d+17) 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 (y <= 3.4e+17) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 3.4e+17: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 3.4e+17) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 3.4e+17) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 3.4e+17], x, y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 3.4 \cdot 10^{+17}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < 3.4e17Initial program 99.3%
+-commutative99.3%
associate--l+99.3%
associate-+r+99.3%
+-commutative99.3%
*-lft-identity99.3%
metadata-eval99.3%
*-commutative99.3%
distribute-rgt-out--99.4%
metadata-eval99.4%
fma-def99.4%
sub-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 23.2%
if 3.4e17 < y Initial program 99.8%
+-commutative99.8%
associate--l+99.8%
associate-+r+99.8%
+-commutative99.8%
*-lft-identity99.8%
metadata-eval99.8%
*-commutative99.8%
distribute-rgt-out--99.8%
metadata-eval99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 38.3%
Final simplification26.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.4%
+-commutative99.4%
associate--l+99.4%
associate-+r+99.4%
+-commutative99.4%
*-lft-identity99.4%
metadata-eval99.4%
*-commutative99.4%
distribute-rgt-out--99.5%
metadata-eval99.5%
fma-def99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 21.3%
Final simplification21.3%
(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 2023320
(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)))