
(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.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-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (log t))) (t_2 (* b (- a 0.5))) (t_3 (+ t_2 (- z t_1))))
(if (<= z -7.2e+224)
t_3
(if (<= z -3.1e+117)
(+ (+ z (- (+ x y) t_1)) (* -0.5 b))
(if (<= z 1.6e+46) (+ (+ x y) t_2) t_3)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * log(t);
double t_2 = b * (a - 0.5);
double t_3 = t_2 + (z - t_1);
double tmp;
if (z <= -7.2e+224) {
tmp = t_3;
} else if (z <= -3.1e+117) {
tmp = (z + ((x + y) - t_1)) + (-0.5 * b);
} else if (z <= 1.6e+46) {
tmp = (x + y) + t_2;
} else {
tmp = t_3;
}
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 = z * log(t)
t_2 = b * (a - 0.5d0)
t_3 = t_2 + (z - t_1)
if (z <= (-7.2d+224)) then
tmp = t_3
else if (z <= (-3.1d+117)) then
tmp = (z + ((x + y) - t_1)) + ((-0.5d0) * b)
else if (z <= 1.6d+46) then
tmp = (x + y) + t_2
else
tmp = t_3
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 t_2 = b * (a - 0.5);
double t_3 = t_2 + (z - t_1);
double tmp;
if (z <= -7.2e+224) {
tmp = t_3;
} else if (z <= -3.1e+117) {
tmp = (z + ((x + y) - t_1)) + (-0.5 * b);
} else if (z <= 1.6e+46) {
tmp = (x + y) + t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * math.log(t) t_2 = b * (a - 0.5) t_3 = t_2 + (z - t_1) tmp = 0 if z <= -7.2e+224: tmp = t_3 elif z <= -3.1e+117: tmp = (z + ((x + y) - t_1)) + (-0.5 * b) elif z <= 1.6e+46: tmp = (x + y) + t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * log(t)) t_2 = Float64(b * Float64(a - 0.5)) t_3 = Float64(t_2 + Float64(z - t_1)) tmp = 0.0 if (z <= -7.2e+224) tmp = t_3; elseif (z <= -3.1e+117) tmp = Float64(Float64(z + Float64(Float64(x + y) - t_1)) + Float64(-0.5 * b)); elseif (z <= 1.6e+46) tmp = Float64(Float64(x + y) + t_2); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * log(t); t_2 = b * (a - 0.5); t_3 = t_2 + (z - t_1); tmp = 0.0; if (z <= -7.2e+224) tmp = t_3; elseif (z <= -3.1e+117) tmp = (z + ((x + y) - t_1)) + (-0.5 * b); elseif (z <= 1.6e+46) tmp = (x + y) + t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[(z - t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.2e+224], t$95$3, If[LessEqual[z, -3.1e+117], N[(N[(z + N[(N[(x + y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision] + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e+46], N[(N[(x + y), $MachinePrecision] + t$95$2), $MachinePrecision], t$95$3]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \log t\\
t_2 := b \cdot \left(a - 0.5\right)\\
t_3 := t\_2 + \left(z - t\_1\right)\\
\mathbf{if}\;z \leq -7.2 \cdot 10^{+224}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{+117}:\\
\;\;\;\;\left(z + \left(\left(x + y\right) - t\_1\right)\right) + -0.5 \cdot b\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+46}:\\
\;\;\;\;\left(x + y\right) + t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if z < -7.2e224 or 1.5999999999999999e46 < z Initial program 99.8%
Taylor expanded in y around 0 93.3%
Taylor expanded in x around 0 90.0%
if -7.2e224 < z < -3.09999999999999975e117Initial program 99.7%
+-commutative99.7%
associate--l+99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 87.1%
*-commutative87.1%
Simplified87.1%
if -3.09999999999999975e117 < z < 1.5999999999999999e46Initial program 100.0%
Taylor expanded in z around 0 96.6%
Final simplification94.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (<= z 7e+200)
(+ (+ x y) t_1)
(if (<= z 8.2e+223)
(* (* z b) (/ (- 1.0 (log t)) b))
(if (<= z 5.8e+247) (+ y t_1) (+ x (- z (* z (log t)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if (z <= 7e+200) {
tmp = (x + y) + t_1;
} else if (z <= 8.2e+223) {
tmp = (z * b) * ((1.0 - log(t)) / b);
} else if (z <= 5.8e+247) {
tmp = y + t_1;
} else {
tmp = x + (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) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if (z <= 7d+200) then
tmp = (x + y) + t_1
else if (z <= 8.2d+223) then
tmp = (z * b) * ((1.0d0 - log(t)) / b)
else if (z <= 5.8d+247) then
tmp = y + t_1
else
tmp = x + (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 t_1 = b * (a - 0.5);
double tmp;
if (z <= 7e+200) {
tmp = (x + y) + t_1;
} else if (z <= 8.2e+223) {
tmp = (z * b) * ((1.0 - Math.log(t)) / b);
} else if (z <= 5.8e+247) {
tmp = y + t_1;
} else {
tmp = x + (z - (z * Math.log(t)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if z <= 7e+200: tmp = (x + y) + t_1 elif z <= 8.2e+223: tmp = (z * b) * ((1.0 - math.log(t)) / b) elif z <= 5.8e+247: tmp = y + t_1 else: tmp = x + (z - (z * math.log(t))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if (z <= 7e+200) tmp = Float64(Float64(x + y) + t_1); elseif (z <= 8.2e+223) tmp = Float64(Float64(z * b) * Float64(Float64(1.0 - log(t)) / b)); elseif (z <= 5.8e+247) tmp = Float64(y + t_1); else tmp = Float64(x + Float64(z - Float64(z * log(t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if (z <= 7e+200) tmp = (x + y) + t_1; elseif (z <= 8.2e+223) tmp = (z * b) * ((1.0 - log(t)) / b); elseif (z <= 5.8e+247) tmp = y + t_1; else tmp = x + (z - (z * log(t))); 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[z, 7e+200], N[(N[(x + y), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[z, 8.2e+223], N[(N[(z * b), $MachinePrecision] * N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e+247], N[(y + t$95$1), $MachinePrecision], N[(x + N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;z \leq 7 \cdot 10^{+200}:\\
\;\;\;\;\left(x + y\right) + t\_1\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{+223}:\\
\;\;\;\;\left(z \cdot b\right) \cdot \frac{1 - \log t}{b}\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{+247}:\\
\;\;\;\;y + t\_1\\
\mathbf{else}:\\
\;\;\;\;x + \left(z - z \cdot \log t\right)\\
\end{array}
\end{array}
if z < 7.00000000000000013e200Initial program 99.9%
Taylor expanded in z around 0 88.9%
if 7.00000000000000013e200 < z < 8.2e223Initial program 99.7%
Taylor expanded in y around inf 31.6%
sub-neg31.6%
associate-+r+31.6%
associate-+l+31.6%
sub-neg31.6%
div-sub32.3%
*-rgt-identity32.3%
distribute-lft-out--32.3%
associate-/l*32.3%
Simplified32.3%
Taylor expanded in z around -inf 33.6%
Taylor expanded in b around inf 71.8%
associate--l+71.8%
associate-/l*71.4%
Simplified71.4%
Taylor expanded in z around inf 43.0%
div-sub43.0%
associate-*r*80.6%
Simplified80.6%
if 8.2e223 < z < 5.8000000000000004e247Initial program 99.7%
+-commutative99.7%
associate--l+99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 78.9%
if 5.8000000000000004e247 < z Initial 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.5%
metadata-eval99.5%
fma-define99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in b around 0 87.6%
Taylor expanded in y around 0 81.5%
distribute-rgt-out--87.8%
*-un-lft-identity87.8%
*-commutative87.8%
sub-neg87.8%
distribute-rgt-neg-in87.8%
Applied egg-rr81.7%
distribute-rgt-neg-out81.7%
unsub-neg81.7%
Applied egg-rr81.7%
Final simplification87.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (<= z 1.18e+201)
(+ (+ x y) t_1)
(if (<= z 1.66e+226)
(* z (- 1.0 (log t)))
(if (<= z 4.7e+247) (+ y t_1) (+ x (- z (* z (log t)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if (z <= 1.18e+201) {
tmp = (x + y) + t_1;
} else if (z <= 1.66e+226) {
tmp = z * (1.0 - log(t));
} else if (z <= 4.7e+247) {
tmp = y + t_1;
} else {
tmp = x + (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) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if (z <= 1.18d+201) then
tmp = (x + y) + t_1
else if (z <= 1.66d+226) then
tmp = z * (1.0d0 - log(t))
else if (z <= 4.7d+247) then
tmp = y + t_1
else
tmp = x + (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 t_1 = b * (a - 0.5);
double tmp;
if (z <= 1.18e+201) {
tmp = (x + y) + t_1;
} else if (z <= 1.66e+226) {
tmp = z * (1.0 - Math.log(t));
} else if (z <= 4.7e+247) {
tmp = y + t_1;
} else {
tmp = x + (z - (z * Math.log(t)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if z <= 1.18e+201: tmp = (x + y) + t_1 elif z <= 1.66e+226: tmp = z * (1.0 - math.log(t)) elif z <= 4.7e+247: tmp = y + t_1 else: tmp = x + (z - (z * math.log(t))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if (z <= 1.18e+201) tmp = Float64(Float64(x + y) + t_1); elseif (z <= 1.66e+226) tmp = Float64(z * Float64(1.0 - log(t))); elseif (z <= 4.7e+247) tmp = Float64(y + t_1); else tmp = Float64(x + Float64(z - Float64(z * log(t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if (z <= 1.18e+201) tmp = (x + y) + t_1; elseif (z <= 1.66e+226) tmp = z * (1.0 - log(t)); elseif (z <= 4.7e+247) tmp = y + t_1; else tmp = x + (z - (z * log(t))); 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[z, 1.18e+201], N[(N[(x + y), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[z, 1.66e+226], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.7e+247], N[(y + t$95$1), $MachinePrecision], N[(x + N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;z \leq 1.18 \cdot 10^{+201}:\\
\;\;\;\;\left(x + y\right) + t\_1\\
\mathbf{elif}\;z \leq 1.66 \cdot 10^{+226}:\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{+247}:\\
\;\;\;\;y + t\_1\\
\mathbf{else}:\\
\;\;\;\;x + \left(z - z \cdot \log t\right)\\
\end{array}
\end{array}
if z < 1.18e201Initial program 99.9%
Taylor expanded in z around 0 88.9%
if 1.18e201 < z < 1.6600000000000001e226Initial program 99.6%
Taylor expanded in y around inf 29.3%
sub-neg29.3%
associate-+r+29.3%
associate-+l+29.3%
sub-neg29.3%
div-sub29.9%
*-rgt-identity29.9%
distribute-lft-out--29.9%
associate-/l*29.9%
Simplified29.9%
Taylor expanded in z around -inf 31.1%
Taylor expanded in a around 0 73.7%
Taylor expanded in b around 0 73.7%
if 1.6600000000000001e226 < z < 4.7000000000000002e247Initial program 100.0%
+-commutative100.0%
associate--l+100.0%
Applied egg-rr100.0%
Taylor expanded in y around inf 97.4%
if 4.7000000000000002e247 < z Initial 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.5%
metadata-eval99.5%
fma-define99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in b around 0 87.6%
Taylor expanded in y around 0 81.5%
distribute-rgt-out--87.8%
*-un-lft-identity87.8%
*-commutative87.8%
sub-neg87.8%
distribute-rgt-neg-in87.8%
Applied egg-rr81.7%
distribute-rgt-neg-out81.7%
unsub-neg81.7%
Applied egg-rr81.7%
Final simplification87.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- 1.0 (log t)))) (t_2 (* b (- a 0.5))))
(if (<= z 2.2e+198)
(+ (+ x y) t_2)
(if (<= z 2.4e+227) t_1 (if (<= z 2.4e+248) (+ y t_2) (+ t_1 x))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (1.0 - log(t));
double t_2 = b * (a - 0.5);
double tmp;
if (z <= 2.2e+198) {
tmp = (x + y) + t_2;
} else if (z <= 2.4e+227) {
tmp = t_1;
} else if (z <= 2.4e+248) {
tmp = y + t_2;
} else {
tmp = t_1 + 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = z * (1.0d0 - log(t))
t_2 = b * (a - 0.5d0)
if (z <= 2.2d+198) then
tmp = (x + y) + t_2
else if (z <= 2.4d+227) then
tmp = t_1
else if (z <= 2.4d+248) then
tmp = y + t_2
else
tmp = t_1 + x
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 t_2 = b * (a - 0.5);
double tmp;
if (z <= 2.2e+198) {
tmp = (x + y) + t_2;
} else if (z <= 2.4e+227) {
tmp = t_1;
} else if (z <= 2.4e+248) {
tmp = y + t_2;
} else {
tmp = t_1 + x;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (1.0 - math.log(t)) t_2 = b * (a - 0.5) tmp = 0 if z <= 2.2e+198: tmp = (x + y) + t_2 elif z <= 2.4e+227: tmp = t_1 elif z <= 2.4e+248: tmp = y + t_2 else: tmp = t_1 + x return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(1.0 - log(t))) t_2 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if (z <= 2.2e+198) tmp = Float64(Float64(x + y) + t_2); elseif (z <= 2.4e+227) tmp = t_1; elseif (z <= 2.4e+248) tmp = Float64(y + t_2); else tmp = Float64(t_1 + x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (1.0 - log(t)); t_2 = b * (a - 0.5); tmp = 0.0; if (z <= 2.2e+198) tmp = (x + y) + t_2; elseif (z <= 2.4e+227) tmp = t_1; elseif (z <= 2.4e+248) tmp = y + t_2; else tmp = t_1 + x; 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]}, Block[{t$95$2 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, 2.2e+198], N[(N[(x + y), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[z, 2.4e+227], t$95$1, If[LessEqual[z, 2.4e+248], N[(y + t$95$2), $MachinePrecision], N[(t$95$1 + x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(1 - \log t\right)\\
t_2 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;z \leq 2.2 \cdot 10^{+198}:\\
\;\;\;\;\left(x + y\right) + t\_2\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{+227}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{+248}:\\
\;\;\;\;y + t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1 + x\\
\end{array}
\end{array}
if z < 2.2e198Initial program 99.9%
Taylor expanded in z around 0 88.9%
if 2.2e198 < z < 2.3999999999999998e227Initial program 99.6%
Taylor expanded in y around inf 29.3%
sub-neg29.3%
associate-+r+29.3%
associate-+l+29.3%
sub-neg29.3%
div-sub29.9%
*-rgt-identity29.9%
distribute-lft-out--29.9%
associate-/l*29.9%
Simplified29.9%
Taylor expanded in z around -inf 31.1%
Taylor expanded in a around 0 73.7%
Taylor expanded in b around 0 73.7%
if 2.3999999999999998e227 < z < 2.4e248Initial program 100.0%
+-commutative100.0%
associate--l+100.0%
Applied egg-rr100.0%
Taylor expanded in y around inf 97.4%
if 2.4e248 < z Initial 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.5%
metadata-eval99.5%
fma-define99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in b around 0 87.6%
Taylor expanded in y around 0 81.5%
Final simplification87.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (or (<= z -7.5e+242) (not (<= z 1.6e+46)))
(+ t_1 (- z (* z (log t))))
(+ (+ x y) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((z <= -7.5e+242) || !(z <= 1.6e+46)) {
tmp = t_1 + (z - (z * log(t)));
} else {
tmp = (x + 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 ((z <= (-7.5d+242)) .or. (.not. (z <= 1.6d+46))) then
tmp = t_1 + (z - (z * log(t)))
else
tmp = (x + 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 ((z <= -7.5e+242) || !(z <= 1.6e+46)) {
tmp = t_1 + (z - (z * Math.log(t)));
} else {
tmp = (x + y) + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (z <= -7.5e+242) or not (z <= 1.6e+46): tmp = t_1 + (z - (z * math.log(t))) else: tmp = (x + 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 ((z <= -7.5e+242) || !(z <= 1.6e+46)) tmp = Float64(t_1 + Float64(z - Float64(z * log(t)))); else tmp = Float64(Float64(x + 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 ((z <= -7.5e+242) || ~((z <= 1.6e+46))) tmp = t_1 + (z - (z * log(t))); else tmp = (x + 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[Or[LessEqual[z, -7.5e+242], N[Not[LessEqual[z, 1.6e+46]], $MachinePrecision]], N[(t$95$1 + N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;z \leq -7.5 \cdot 10^{+242} \lor \neg \left(z \leq 1.6 \cdot 10^{+46}\right):\\
\;\;\;\;t\_1 + \left(z - z \cdot \log t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + t\_1\\
\end{array}
\end{array}
if z < -7.49999999999999961e242 or 1.5999999999999999e46 < z Initial program 99.8%
Taylor expanded in y around 0 92.6%
Taylor expanded in x around 0 89.0%
if -7.49999999999999961e242 < z < 1.5999999999999999e46Initial program 99.9%
Taylor expanded in z around 0 92.1%
Final simplification91.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (<= z 1.08e+201)
(+ (+ x y) t_1)
(if (or (<= z 4.6e+233) (not (<= z 4.8e+247)))
(* z (- 1.0 (log t)))
(+ 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 (z <= 1.08e+201) {
tmp = (x + y) + t_1;
} else if ((z <= 4.6e+233) || !(z <= 4.8e+247)) {
tmp = z * (1.0 - log(t));
} 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 (z <= 1.08d+201) then
tmp = (x + y) + t_1
else if ((z <= 4.6d+233) .or. (.not. (z <= 4.8d+247))) then
tmp = z * (1.0d0 - log(t))
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 (z <= 1.08e+201) {
tmp = (x + y) + t_1;
} else if ((z <= 4.6e+233) || !(z <= 4.8e+247)) {
tmp = z * (1.0 - Math.log(t));
} else {
tmp = y + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if z <= 1.08e+201: tmp = (x + y) + t_1 elif (z <= 4.6e+233) or not (z <= 4.8e+247): tmp = z * (1.0 - math.log(t)) 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 (z <= 1.08e+201) tmp = Float64(Float64(x + y) + t_1); elseif ((z <= 4.6e+233) || !(z <= 4.8e+247)) tmp = Float64(z * Float64(1.0 - log(t))); 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 (z <= 1.08e+201) tmp = (x + y) + t_1; elseif ((z <= 4.6e+233) || ~((z <= 4.8e+247))) tmp = z * (1.0 - log(t)); 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[z, 1.08e+201], N[(N[(x + y), $MachinePrecision] + t$95$1), $MachinePrecision], If[Or[LessEqual[z, 4.6e+233], N[Not[LessEqual[z, 4.8e+247]], $MachinePrecision]], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;z \leq 1.08 \cdot 10^{+201}:\\
\;\;\;\;\left(x + y\right) + t\_1\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{+233} \lor \neg \left(z \leq 4.8 \cdot 10^{+247}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\
\mathbf{else}:\\
\;\;\;\;y + t\_1\\
\end{array}
\end{array}
if z < 1.08000000000000006e201Initial program 99.9%
Taylor expanded in z around 0 88.9%
if 1.08000000000000006e201 < z < 4.60000000000000001e233 or 4.8e247 < z Initial program 99.6%
Taylor expanded in y around inf 43.2%
sub-neg43.2%
associate-+r+43.2%
associate-+l+43.2%
sub-neg43.2%
div-sub45.5%
*-rgt-identity45.5%
distribute-lft-out--45.5%
associate-/l*45.4%
Simplified45.4%
Taylor expanded in z around -inf 42.4%
Taylor expanded in a around 0 79.8%
Taylor expanded in b around 0 76.5%
if 4.60000000000000001e233 < z < 4.8e247Initial program 100.0%
+-commutative100.0%
associate--l+100.0%
Applied egg-rr100.0%
Taylor expanded in y around inf 97.4%
Final simplification87.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (<= z 3.7e+199)
(+ (+ x y) t_1)
(if (<= z 9.5e+235)
(* z (- 1.0 (log t)))
(if (<= z 1.12e+248) (+ y t_1) (- z (* z (log t))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if (z <= 3.7e+199) {
tmp = (x + y) + t_1;
} else if (z <= 9.5e+235) {
tmp = z * (1.0 - log(t));
} else if (z <= 1.12e+248) {
tmp = y + t_1;
} else {
tmp = 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) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if (z <= 3.7d+199) then
tmp = (x + y) + t_1
else if (z <= 9.5d+235) then
tmp = z * (1.0d0 - log(t))
else if (z <= 1.12d+248) then
tmp = y + t_1
else
tmp = 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 t_1 = b * (a - 0.5);
double tmp;
if (z <= 3.7e+199) {
tmp = (x + y) + t_1;
} else if (z <= 9.5e+235) {
tmp = z * (1.0 - Math.log(t));
} else if (z <= 1.12e+248) {
tmp = y + t_1;
} else {
tmp = z - (z * Math.log(t));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if z <= 3.7e+199: tmp = (x + y) + t_1 elif z <= 9.5e+235: tmp = z * (1.0 - math.log(t)) elif z <= 1.12e+248: tmp = y + t_1 else: tmp = z - (z * math.log(t)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if (z <= 3.7e+199) tmp = Float64(Float64(x + y) + t_1); elseif (z <= 9.5e+235) tmp = Float64(z * Float64(1.0 - log(t))); elseif (z <= 1.12e+248) tmp = Float64(y + t_1); else tmp = Float64(z - Float64(z * log(t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if (z <= 3.7e+199) tmp = (x + y) + t_1; elseif (z <= 9.5e+235) tmp = z * (1.0 - log(t)); elseif (z <= 1.12e+248) tmp = y + t_1; else tmp = z - (z * log(t)); 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[z, 3.7e+199], N[(N[(x + y), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[z, 9.5e+235], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.12e+248], N[(y + t$95$1), $MachinePrecision], N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;z \leq 3.7 \cdot 10^{+199}:\\
\;\;\;\;\left(x + y\right) + t\_1\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{+235}:\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\
\mathbf{elif}\;z \leq 1.12 \cdot 10^{+248}:\\
\;\;\;\;y + t\_1\\
\mathbf{else}:\\
\;\;\;\;z - z \cdot \log t\\
\end{array}
\end{array}
if z < 3.70000000000000021e199Initial program 99.9%
Taylor expanded in z around 0 88.9%
if 3.70000000000000021e199 < z < 9.49999999999999966e235Initial program 99.6%
Taylor expanded in y around inf 29.3%
sub-neg29.3%
associate-+r+29.3%
associate-+l+29.3%
sub-neg29.3%
div-sub29.9%
*-rgt-identity29.9%
distribute-lft-out--29.9%
associate-/l*29.9%
Simplified29.9%
Taylor expanded in z around -inf 31.1%
Taylor expanded in a around 0 73.7%
Taylor expanded in b around 0 73.7%
if 9.49999999999999966e235 < z < 1.11999999999999992e248Initial program 100.0%
+-commutative100.0%
associate--l+100.0%
Applied egg-rr100.0%
Taylor expanded in y around inf 97.4%
if 1.11999999999999992e248 < z Initial program 99.7%
Taylor expanded in y around 0 93.6%
Taylor expanded in x around 0 90.5%
Taylor expanded in b around 0 78.6%
Final simplification87.7%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5)))) (if (<= (+ x y) 1e+115) (+ t_1 (- (+ z x) (* z (log t)))) (+ (+ x y) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((x + y) <= 1e+115) {
tmp = t_1 + ((z + x) - (z * log(t)));
} else {
tmp = (x + 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) <= 1d+115) then
tmp = t_1 + ((z + x) - (z * log(t)))
else
tmp = (x + 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) <= 1e+115) {
tmp = t_1 + ((z + x) - (z * Math.log(t)));
} else {
tmp = (x + y) + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (x + y) <= 1e+115: tmp = t_1 + ((z + x) - (z * math.log(t))) else: tmp = (x + 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) <= 1e+115) tmp = Float64(t_1 + Float64(Float64(z + x) - Float64(z * log(t)))); else tmp = Float64(Float64(x + 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) <= 1e+115) tmp = t_1 + ((z + x) - (z * log(t))); else tmp = (x + 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], 1e+115], N[(t$95$1 + N[(N[(z + x), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;x + y \leq 10^{+115}:\\
\;\;\;\;t\_1 + \left(\left(z + x\right) - z \cdot \log t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + t\_1\\
\end{array}
\end{array}
if (+.f64 x y) < 1e115Initial program 99.9%
Taylor expanded in y around 0 82.8%
if 1e115 < (+.f64 x y) Initial program 99.9%
Taylor expanded in z around 0 91.8%
Final simplification85.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= z 1.02e+201)
(+ (+ x y) (* b (- a 0.5)))
(if (<= z 1.9e+222)
(* (* z b) (/ (- 1.0 (log t)) b))
(+ x (+ y (- z (* z (log t))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 1.02e+201) {
tmp = (x + y) + (b * (a - 0.5));
} else if (z <= 1.9e+222) {
tmp = (z * b) * ((1.0 - log(t)) / b);
} else {
tmp = x + (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 (z <= 1.02d+201) then
tmp = (x + y) + (b * (a - 0.5d0))
else if (z <= 1.9d+222) then
tmp = (z * b) * ((1.0d0 - log(t)) / b)
else
tmp = x + (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 (z <= 1.02e+201) {
tmp = (x + y) + (b * (a - 0.5));
} else if (z <= 1.9e+222) {
tmp = (z * b) * ((1.0 - Math.log(t)) / b);
} else {
tmp = x + (y + (z - (z * Math.log(t))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= 1.02e+201: tmp = (x + y) + (b * (a - 0.5)) elif z <= 1.9e+222: tmp = (z * b) * ((1.0 - math.log(t)) / b) else: tmp = x + (y + (z - (z * math.log(t)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 1.02e+201) tmp = Float64(Float64(x + y) + Float64(b * Float64(a - 0.5))); elseif (z <= 1.9e+222) tmp = Float64(Float64(z * b) * Float64(Float64(1.0 - log(t)) / b)); else tmp = Float64(x + Float64(y + Float64(z - Float64(z * log(t))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= 1.02e+201) tmp = (x + y) + (b * (a - 0.5)); elseif (z <= 1.9e+222) tmp = (z * b) * ((1.0 - log(t)) / b); else tmp = x + (y + (z - (z * log(t)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 1.02e+201], N[(N[(x + y), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.9e+222], N[(N[(z * b), $MachinePrecision] * N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision], N[(x + N[(y + N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.02 \cdot 10^{+201}:\\
\;\;\;\;\left(x + y\right) + b \cdot \left(a - 0.5\right)\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+222}:\\
\;\;\;\;\left(z \cdot b\right) \cdot \frac{1 - \log t}{b}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y + \left(z - z \cdot \log t\right)\right)\\
\end{array}
\end{array}
if z < 1.02e201Initial program 99.9%
Taylor expanded in z around 0 88.9%
if 1.02e201 < z < 1.90000000000000009e222Initial program 99.7%
Taylor expanded in y around inf 31.6%
sub-neg31.6%
associate-+r+31.6%
associate-+l+31.6%
sub-neg31.6%
div-sub32.3%
*-rgt-identity32.3%
distribute-lft-out--32.3%
associate-/l*32.3%
Simplified32.3%
Taylor expanded in z around -inf 33.6%
Taylor expanded in b around inf 71.8%
associate--l+71.8%
associate-/l*71.4%
Simplified71.4%
Taylor expanded in z around inf 43.0%
div-sub43.0%
associate-*r*80.6%
Simplified80.6%
if 1.90000000000000009e222 < z Initial 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.5%
metadata-eval99.5%
fma-define99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in b around 0 81.5%
distribute-rgt-out--81.6%
*-un-lft-identity81.6%
*-commutative81.6%
sub-neg81.6%
distribute-rgt-neg-in81.6%
Applied egg-rr81.6%
Final simplification88.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- 1.0 (log t))))
(if (<= z 4.9e+200)
(+ (+ x y) (* b (- a 0.5)))
(if (<= z 1.9e+222) (* (* z b) (/ t_1 b)) (+ x (+ (* z t_1) y))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 - log(t);
double tmp;
if (z <= 4.9e+200) {
tmp = (x + y) + (b * (a - 0.5));
} else if (z <= 1.9e+222) {
tmp = (z * b) * (t_1 / b);
} else {
tmp = x + ((z * t_1) + 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 = 1.0d0 - log(t)
if (z <= 4.9d+200) then
tmp = (x + y) + (b * (a - 0.5d0))
else if (z <= 1.9d+222) then
tmp = (z * b) * (t_1 / b)
else
tmp = x + ((z * t_1) + 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 = 1.0 - Math.log(t);
double tmp;
if (z <= 4.9e+200) {
tmp = (x + y) + (b * (a - 0.5));
} else if (z <= 1.9e+222) {
tmp = (z * b) * (t_1 / b);
} else {
tmp = x + ((z * t_1) + y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 1.0 - math.log(t) tmp = 0 if z <= 4.9e+200: tmp = (x + y) + (b * (a - 0.5)) elif z <= 1.9e+222: tmp = (z * b) * (t_1 / b) else: tmp = x + ((z * t_1) + y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(1.0 - log(t)) tmp = 0.0 if (z <= 4.9e+200) tmp = Float64(Float64(x + y) + Float64(b * Float64(a - 0.5))); elseif (z <= 1.9e+222) tmp = Float64(Float64(z * b) * Float64(t_1 / b)); else tmp = Float64(x + Float64(Float64(z * t_1) + y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 1.0 - log(t); tmp = 0.0; if (z <= 4.9e+200) tmp = (x + y) + (b * (a - 0.5)); elseif (z <= 1.9e+222) tmp = (z * b) * (t_1 / b); else tmp = x + ((z * t_1) + y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, 4.9e+200], N[(N[(x + y), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.9e+222], N[(N[(z * b), $MachinePrecision] * N[(t$95$1 / b), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * t$95$1), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 - \log t\\
\mathbf{if}\;z \leq 4.9 \cdot 10^{+200}:\\
\;\;\;\;\left(x + y\right) + b \cdot \left(a - 0.5\right)\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+222}:\\
\;\;\;\;\left(z \cdot b\right) \cdot \frac{t\_1}{b}\\
\mathbf{else}:\\
\;\;\;\;x + \left(z \cdot t\_1 + y\right)\\
\end{array}
\end{array}
if z < 4.89999999999999982e200Initial program 99.9%
Taylor expanded in z around 0 88.9%
if 4.89999999999999982e200 < z < 1.90000000000000009e222Initial program 99.7%
Taylor expanded in y around inf 31.6%
sub-neg31.6%
associate-+r+31.6%
associate-+l+31.6%
sub-neg31.6%
div-sub32.3%
*-rgt-identity32.3%
distribute-lft-out--32.3%
associate-/l*32.3%
Simplified32.3%
Taylor expanded in z around -inf 33.6%
Taylor expanded in b around inf 71.8%
associate--l+71.8%
associate-/l*71.4%
Simplified71.4%
Taylor expanded in z around inf 43.0%
div-sub43.0%
associate-*r*80.6%
Simplified80.6%
if 1.90000000000000009e222 < z Initial 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.5%
metadata-eval99.5%
fma-define99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in b around 0 81.5%
Final simplification88.0%
(FPCore (x y z t a b) :precision binary64 (+ (+ z (- (+ x y) (* z (log t)))) (* b (- a 0.5))))
double code(double x, double y, double z, double t, double a, double b) {
return (z + ((x + y) - (z * log(t)))) + (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 = (z + ((x + y) - (z * log(t)))) + (b * (a - 0.5d0))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (z + ((x + y) - (z * Math.log(t)))) + (b * (a - 0.5));
}
def code(x, y, z, t, a, b): return (z + ((x + y) - (z * math.log(t)))) + (b * (a - 0.5))
function code(x, y, z, t, a, b) return Float64(Float64(z + Float64(Float64(x + y) - Float64(z * log(t)))) + Float64(b * Float64(a - 0.5))) end
function tmp = code(x, y, z, t, a, b) tmp = (z + ((x + y) - (z * log(t)))) + (b * (a - 0.5)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(z + N[(N[(x + y), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(z + \left(\left(x + y\right) - z \cdot \log t\right)\right) + b \cdot \left(a - 0.5\right)
\end{array}
Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
Applied egg-rr99.9%
Final simplification99.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -2.3e+249)
(* -0.5 b)
(if (<= b -1.32e+127)
(* a b)
(if (<= b 2.32e+64)
(+ x y)
(if (<= b 1e+241)
(* a b)
(if (<= b 3e+247) x (if (<= b 2.9e+279) (* -0.5 b) (* a b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.3e+249) {
tmp = -0.5 * b;
} else if (b <= -1.32e+127) {
tmp = a * b;
} else if (b <= 2.32e+64) {
tmp = x + y;
} else if (b <= 1e+241) {
tmp = a * b;
} else if (b <= 3e+247) {
tmp = x;
} else if (b <= 2.9e+279) {
tmp = -0.5 * b;
} 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 (b <= (-2.3d+249)) then
tmp = (-0.5d0) * b
else if (b <= (-1.32d+127)) then
tmp = a * b
else if (b <= 2.32d+64) then
tmp = x + y
else if (b <= 1d+241) then
tmp = a * b
else if (b <= 3d+247) then
tmp = x
else if (b <= 2.9d+279) then
tmp = (-0.5d0) * b
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 (b <= -2.3e+249) {
tmp = -0.5 * b;
} else if (b <= -1.32e+127) {
tmp = a * b;
} else if (b <= 2.32e+64) {
tmp = x + y;
} else if (b <= 1e+241) {
tmp = a * b;
} else if (b <= 3e+247) {
tmp = x;
} else if (b <= 2.9e+279) {
tmp = -0.5 * b;
} else {
tmp = a * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -2.3e+249: tmp = -0.5 * b elif b <= -1.32e+127: tmp = a * b elif b <= 2.32e+64: tmp = x + y elif b <= 1e+241: tmp = a * b elif b <= 3e+247: tmp = x elif b <= 2.9e+279: tmp = -0.5 * b else: tmp = a * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.3e+249) tmp = Float64(-0.5 * b); elseif (b <= -1.32e+127) tmp = Float64(a * b); elseif (b <= 2.32e+64) tmp = Float64(x + y); elseif (b <= 1e+241) tmp = Float64(a * b); elseif (b <= 3e+247) tmp = x; elseif (b <= 2.9e+279) tmp = Float64(-0.5 * b); else tmp = Float64(a * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -2.3e+249) tmp = -0.5 * b; elseif (b <= -1.32e+127) tmp = a * b; elseif (b <= 2.32e+64) tmp = x + y; elseif (b <= 1e+241) tmp = a * b; elseif (b <= 3e+247) tmp = x; elseif (b <= 2.9e+279) tmp = -0.5 * b; else tmp = a * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.3e+249], N[(-0.5 * b), $MachinePrecision], If[LessEqual[b, -1.32e+127], N[(a * b), $MachinePrecision], If[LessEqual[b, 2.32e+64], N[(x + y), $MachinePrecision], If[LessEqual[b, 1e+241], N[(a * b), $MachinePrecision], If[LessEqual[b, 3e+247], x, If[LessEqual[b, 2.9e+279], N[(-0.5 * b), $MachinePrecision], N[(a * b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.3 \cdot 10^{+249}:\\
\;\;\;\;-0.5 \cdot b\\
\mathbf{elif}\;b \leq -1.32 \cdot 10^{+127}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;b \leq 2.32 \cdot 10^{+64}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;b \leq 10^{+241}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;b \leq 3 \cdot 10^{+247}:\\
\;\;\;\;x\\
\mathbf{elif}\;b \leq 2.9 \cdot 10^{+279}:\\
\;\;\;\;-0.5 \cdot b\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if b < -2.2999999999999998e249 or 3e247 < b < 2.89999999999999975e279Initial 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-define100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in b around inf 89.0%
Taylor expanded in a around 0 63.4%
*-commutative63.4%
Simplified63.4%
if -2.2999999999999998e249 < b < -1.32000000000000005e127 or 2.3199999999999999e64 < b < 1.0000000000000001e241 or 2.89999999999999975e279 < b 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-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around inf 50.9%
*-commutative50.9%
Simplified50.9%
if -1.32000000000000005e127 < b < 2.3199999999999999e64Initial 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-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in b around 0 76.9%
Taylor expanded in y around inf 54.0%
if 1.0000000000000001e241 < b < 3e247Initial 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-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 33.7%
Final simplification53.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -1.06e+40)
(* a b)
(if (<= a -1e-47)
(* -0.5 b)
(if (<= a -7.2e-102)
x
(if (<= a 1.25e-197)
(* -0.5 b)
(if (<= a 1.02e-95) y (if (<= a 2.5e-39) x (* a b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.06e+40) {
tmp = a * b;
} else if (a <= -1e-47) {
tmp = -0.5 * b;
} else if (a <= -7.2e-102) {
tmp = x;
} else if (a <= 1.25e-197) {
tmp = -0.5 * b;
} else if (a <= 1.02e-95) {
tmp = y;
} else if (a <= 2.5e-39) {
tmp = x;
} 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 <= (-1.06d+40)) then
tmp = a * b
else if (a <= (-1d-47)) then
tmp = (-0.5d0) * b
else if (a <= (-7.2d-102)) then
tmp = x
else if (a <= 1.25d-197) then
tmp = (-0.5d0) * b
else if (a <= 1.02d-95) then
tmp = y
else if (a <= 2.5d-39) then
tmp = x
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 <= -1.06e+40) {
tmp = a * b;
} else if (a <= -1e-47) {
tmp = -0.5 * b;
} else if (a <= -7.2e-102) {
tmp = x;
} else if (a <= 1.25e-197) {
tmp = -0.5 * b;
} else if (a <= 1.02e-95) {
tmp = y;
} else if (a <= 2.5e-39) {
tmp = x;
} else {
tmp = a * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.06e+40: tmp = a * b elif a <= -1e-47: tmp = -0.5 * b elif a <= -7.2e-102: tmp = x elif a <= 1.25e-197: tmp = -0.5 * b elif a <= 1.02e-95: tmp = y elif a <= 2.5e-39: tmp = x else: tmp = a * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.06e+40) tmp = Float64(a * b); elseif (a <= -1e-47) tmp = Float64(-0.5 * b); elseif (a <= -7.2e-102) tmp = x; elseif (a <= 1.25e-197) tmp = Float64(-0.5 * b); elseif (a <= 1.02e-95) tmp = y; elseif (a <= 2.5e-39) tmp = x; else tmp = Float64(a * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1.06e+40) tmp = a * b; elseif (a <= -1e-47) tmp = -0.5 * b; elseif (a <= -7.2e-102) tmp = x; elseif (a <= 1.25e-197) tmp = -0.5 * b; elseif (a <= 1.02e-95) tmp = y; elseif (a <= 2.5e-39) tmp = x; else tmp = a * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.06e+40], N[(a * b), $MachinePrecision], If[LessEqual[a, -1e-47], N[(-0.5 * b), $MachinePrecision], If[LessEqual[a, -7.2e-102], x, If[LessEqual[a, 1.25e-197], N[(-0.5 * b), $MachinePrecision], If[LessEqual[a, 1.02e-95], y, If[LessEqual[a, 2.5e-39], x, N[(a * b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.06 \cdot 10^{+40}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;a \leq -1 \cdot 10^{-47}:\\
\;\;\;\;-0.5 \cdot b\\
\mathbf{elif}\;a \leq -7.2 \cdot 10^{-102}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.25 \cdot 10^{-197}:\\
\;\;\;\;-0.5 \cdot b\\
\mathbf{elif}\;a \leq 1.02 \cdot 10^{-95}:\\
\;\;\;\;y\\
\mathbf{elif}\;a \leq 2.5 \cdot 10^{-39}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if a < -1.05999999999999996e40 or 2.4999999999999999e-39 < a 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-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around inf 52.1%
*-commutative52.1%
Simplified52.1%
if -1.05999999999999996e40 < a < -9.9999999999999997e-48 or -7.2e-102 < a < 1.2500000000000001e-197Initial 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-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in b around inf 46.7%
Taylor expanded in a around 0 43.5%
*-commutative43.5%
Simplified43.5%
if -9.9999999999999997e-48 < a < -7.2e-102 or 1.01999999999999995e-95 < a < 2.4999999999999999e-39Initial 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.7%
metadata-eval99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 19.1%
if 1.2500000000000001e-197 < a < 1.01999999999999995e-95Initial 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-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 20.0%
Final simplification44.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* a b))) (t_2 (* b (- a 0.5))))
(if (<= b -7.8e+64)
t_2
(if (<= b -3.5e-12)
t_1
(if (<= b 4.1e-96) (+ x y) (if (<= b 4.1e+98) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (a * b);
double t_2 = b * (a - 0.5);
double tmp;
if (b <= -7.8e+64) {
tmp = t_2;
} else if (b <= -3.5e-12) {
tmp = t_1;
} else if (b <= 4.1e-96) {
tmp = x + y;
} else if (b <= 4.1e+98) {
tmp = t_1;
} 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) :: tmp
t_1 = x + (a * b)
t_2 = b * (a - 0.5d0)
if (b <= (-7.8d+64)) then
tmp = t_2
else if (b <= (-3.5d-12)) then
tmp = t_1
else if (b <= 4.1d-96) then
tmp = x + y
else if (b <= 4.1d+98) then
tmp = t_1
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 = x + (a * b);
double t_2 = b * (a - 0.5);
double tmp;
if (b <= -7.8e+64) {
tmp = t_2;
} else if (b <= -3.5e-12) {
tmp = t_1;
} else if (b <= 4.1e-96) {
tmp = x + y;
} else if (b <= 4.1e+98) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (a * b) t_2 = b * (a - 0.5) tmp = 0 if b <= -7.8e+64: tmp = t_2 elif b <= -3.5e-12: tmp = t_1 elif b <= 4.1e-96: tmp = x + y elif b <= 4.1e+98: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(a * b)) t_2 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if (b <= -7.8e+64) tmp = t_2; elseif (b <= -3.5e-12) tmp = t_1; elseif (b <= 4.1e-96) tmp = Float64(x + y); elseif (b <= 4.1e+98) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (a * b); t_2 = b * (a - 0.5); tmp = 0.0; if (b <= -7.8e+64) tmp = t_2; elseif (b <= -3.5e-12) tmp = t_1; elseif (b <= 4.1e-96) tmp = x + y; elseif (b <= 4.1e+98) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(a * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -7.8e+64], t$95$2, If[LessEqual[b, -3.5e-12], t$95$1, If[LessEqual[b, 4.1e-96], N[(x + y), $MachinePrecision], If[LessEqual[b, 4.1e+98], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + a \cdot b\\
t_2 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;b \leq -7.8 \cdot 10^{+64}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -3.5 \cdot 10^{-12}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 4.1 \cdot 10^{-96}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;b \leq 4.1 \cdot 10^{+98}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -7.7999999999999996e64 or 4.1e98 < b 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-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in b around inf 74.8%
if -7.7999999999999996e64 < b < -3.5e-12 or 4.10000000000000024e-96 < b < 4.1e98Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 54.6%
Taylor expanded in x around inf 49.5%
Taylor expanded in a around inf 46.7%
Taylor expanded in x around 0 50.2%
*-commutative50.2%
Simplified50.2%
if -3.5e-12 < b < 4.10000000000000024e-96Initial 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-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in b around 0 87.4%
Taylor expanded in y around inf 63.5%
Final simplification65.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (- a 0.5) -1e+79) (not (<= (- a 0.5) -0.5))) (+ x (* a b)) (+ y (* -0.5 b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((a - 0.5) <= -1e+79) || !((a - 0.5) <= -0.5)) {
tmp = x + (a * b);
} else {
tmp = y + (-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 (((a - 0.5d0) <= (-1d+79)) .or. (.not. ((a - 0.5d0) <= (-0.5d0)))) then
tmp = x + (a * b)
else
tmp = y + ((-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 (((a - 0.5) <= -1e+79) || !((a - 0.5) <= -0.5)) {
tmp = x + (a * b);
} else {
tmp = y + (-0.5 * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((a - 0.5) <= -1e+79) or not ((a - 0.5) <= -0.5): tmp = x + (a * b) else: tmp = y + (-0.5 * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(a - 0.5) <= -1e+79) || !(Float64(a - 0.5) <= -0.5)) tmp = Float64(x + Float64(a * b)); else tmp = Float64(y + Float64(-0.5 * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((a - 0.5) <= -1e+79) || ~(((a - 0.5) <= -0.5))) tmp = x + (a * b); else tmp = y + (-0.5 * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(a - 0.5), $MachinePrecision], -1e+79], N[Not[LessEqual[N[(a - 0.5), $MachinePrecision], -0.5]], $MachinePrecision]], N[(x + N[(a * b), $MachinePrecision]), $MachinePrecision], N[(y + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a - 0.5 \leq -1 \cdot 10^{+79} \lor \neg \left(a - 0.5 \leq -0.5\right):\\
\;\;\;\;x + a \cdot b\\
\mathbf{else}:\\
\;\;\;\;y + -0.5 \cdot b\\
\end{array}
\end{array}
if (-.f64 a #s(literal 1/2 binary64)) < -9.99999999999999967e78 or -0.5 < (-.f64 a #s(literal 1/2 binary64)) Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 70.3%
Taylor expanded in x around inf 62.9%
Taylor expanded in a around inf 63.0%
Taylor expanded in x around 0 70.4%
*-commutative70.4%
Simplified70.4%
if -9.99999999999999967e78 < (-.f64 a #s(literal 1/2 binary64)) < -0.5Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 62.6%
Taylor expanded in a around 0 60.0%
*-commutative97.2%
Simplified60.0%
Final simplification64.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -4.1e+38) (not (<= b 5.5e-25))) (* b (- a 0.5)) (+ x y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -4.1e+38) || !(b <= 5.5e-25)) {
tmp = b * (a - 0.5);
} 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) :: tmp
if ((b <= (-4.1d+38)) .or. (.not. (b <= 5.5d-25))) then
tmp = b * (a - 0.5d0)
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 tmp;
if ((b <= -4.1e+38) || !(b <= 5.5e-25)) {
tmp = b * (a - 0.5);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -4.1e+38) or not (b <= 5.5e-25): tmp = b * (a - 0.5) else: tmp = x + y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -4.1e+38) || !(b <= 5.5e-25)) tmp = Float64(b * Float64(a - 0.5)); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -4.1e+38) || ~((b <= 5.5e-25))) tmp = b * (a - 0.5); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -4.1e+38], N[Not[LessEqual[b, 5.5e-25]], $MachinePrecision]], N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.1 \cdot 10^{+38} \lor \neg \left(b \leq 5.5 \cdot 10^{-25}\right):\\
\;\;\;\;b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if b < -4.1000000000000003e38 or 5.50000000000000004e-25 < b 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-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in b around inf 67.8%
if -4.1000000000000003e38 < b < 5.50000000000000004e-25Initial 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-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in b around 0 86.8%
Taylor expanded in y around inf 61.9%
Final simplification65.4%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5)))) (if (<= (+ x y) -400000.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 + y) <= -400000.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 + y) <= (-400000.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 + y) <= -400000.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 + y) <= -400000.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 (Float64(x + y) <= -400000.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 + y) <= -400000.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[N[(x + y), $MachinePrecision], -400000.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 + y \leq -400000:\\
\;\;\;\;x + t\_1\\
\mathbf{else}:\\
\;\;\;\;y + t\_1\\
\end{array}
\end{array}
if (+.f64 x y) < -4e5Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 56.8%
if -4e5 < (+.f64 x y) Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 66.8%
Final simplification63.1%
(FPCore (x y z t a b) :precision binary64 (if (<= (+ x y) 1e+105) (+ x (* b (- a 0.5))) (+ y (* -0.5 b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x + y) <= 1e+105) {
tmp = x + (b * (a - 0.5));
} else {
tmp = y + (-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 ((x + y) <= 1d+105) then
tmp = x + (b * (a - 0.5d0))
else
tmp = y + ((-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 ((x + y) <= 1e+105) {
tmp = x + (b * (a - 0.5));
} else {
tmp = y + (-0.5 * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (x + y) <= 1e+105: tmp = x + (b * (a - 0.5)) else: tmp = y + (-0.5 * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(x + y) <= 1e+105) tmp = Float64(x + Float64(b * Float64(a - 0.5))); else tmp = Float64(y + Float64(-0.5 * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((x + y) <= 1e+105) tmp = x + (b * (a - 0.5)); else tmp = y + (-0.5 * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(x + y), $MachinePrecision], 1e+105], N[(x + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x + y \leq 10^{+105}:\\
\;\;\;\;x + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;y + -0.5 \cdot b\\
\end{array}
\end{array}
if (+.f64 x y) < 9.9999999999999994e104Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 62.7%
if 9.9999999999999994e104 < (+.f64 x y) Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 60.4%
Taylor expanded in a around 0 33.2%
*-commutative73.0%
Simplified33.2%
Final simplification53.4%
(FPCore (x y z t a b) :precision binary64 (if (<= x -2.5e+123) x (if (<= x -2.9e-80) (* -0.5 b) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2.5e+123) {
tmp = x;
} else if (x <= -2.9e-80) {
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 (x <= (-2.5d+123)) then
tmp = x
else if (x <= (-2.9d-80)) 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 (x <= -2.5e+123) {
tmp = x;
} else if (x <= -2.9e-80) {
tmp = -0.5 * b;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -2.5e+123: tmp = x elif x <= -2.9e-80: tmp = -0.5 * b else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -2.5e+123) tmp = x; elseif (x <= -2.9e-80) 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 (x <= -2.5e+123) tmp = x; elseif (x <= -2.9e-80) tmp = -0.5 * b; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2.5e+123], x, If[LessEqual[x, -2.9e-80], N[(-0.5 * b), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.5 \cdot 10^{+123}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -2.9 \cdot 10^{-80}:\\
\;\;\;\;-0.5 \cdot b\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if x < -2.49999999999999987e123Initial 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-define100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf 50.3%
if -2.49999999999999987e123 < x < -2.89999999999999998e-80Initial 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-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in b around inf 55.4%
Taylor expanded in a around 0 26.3%
*-commutative26.3%
Simplified26.3%
if -2.89999999999999998e-80 < x 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-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 24.1%
Final simplification27.9%
(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(Float64(x + 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[(N[(x + y), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) + b \cdot \left(a - 0.5\right)
\end{array}
Initial program 99.9%
Taylor expanded in z around 0 82.4%
Final simplification82.4%
(FPCore (x y z t a b) :precision binary64 (if (<= x -3.6e+155) x y))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -3.6e+155) {
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 <= (-3.6d+155)) 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 <= -3.6e+155) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -3.6e+155: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -3.6e+155) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -3.6e+155) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -3.6e+155], x, y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.6 \cdot 10^{+155}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if x < -3.60000000000000007e155Initial 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--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 51.3%
if -3.60000000000000007e155 < x 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-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 22.9%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 99.9%
+-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-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 17.9%
(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 2024107
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, A"
:precision binary64
:alt
(+ (+ (+ 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)))