
(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 (fma (+ a -0.5) b (- (+ y (+ x z)) (* z (log t)))))
double code(double x, double y, double z, double t, double a, double b) {
return fma((a + -0.5), b, ((y + (x + z)) - (z * log(t))));
}
function code(x, y, z, t, a, b) return fma(Float64(a + -0.5), b, Float64(Float64(y + Float64(x + z)) - Float64(z * log(t)))) end
code[x_, y_, z_, t_, a_, b_] := N[(N[(a + -0.5), $MachinePrecision] * b + N[(N[(y + N[(x + z), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a + -0.5, b, \left(y + \left(x + z\right)\right) - z \cdot \log t\right)
\end{array}
Initial program 99.9%
+-commutative99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
associate-+l+99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (<= t_1 -2e+79)
(+ (+ y x) (+ (* -0.5 b) (* a b)))
(if (<= t_1 1e+46)
(+ (+ y x) (* z (- 1.0 (log t))))
(fma (+ a -0.5) b (+ y x))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if (t_1 <= -2e+79) {
tmp = (y + x) + ((-0.5 * b) + (a * b));
} else if (t_1 <= 1e+46) {
tmp = (y + x) + (z * (1.0 - log(t)));
} else {
tmp = fma((a + -0.5), b, (y + x));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if (t_1 <= -2e+79) tmp = Float64(Float64(y + x) + Float64(Float64(-0.5 * b) + Float64(a * b))); elseif (t_1 <= 1e+46) tmp = Float64(Float64(y + x) + Float64(z * Float64(1.0 - log(t)))); else tmp = fma(Float64(a + -0.5), b, Float64(y + x)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+79], N[(N[(y + x), $MachinePrecision] + N[(N[(-0.5 * b), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+46], N[(N[(y + x), $MachinePrecision] + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a + -0.5), $MachinePrecision] * b + N[(y + x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{+79}:\\
\;\;\;\;\left(y + x\right) + \left(-0.5 \cdot b + a \cdot b\right)\\
\mathbf{elif}\;t_1 \leq 10^{+46}:\\
\;\;\;\;\left(y + x\right) + z \cdot \left(1 - \log t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a + -0.5, b, y + x\right)\\
\end{array}
\end{array}
if (*.f64 (-.f64 a 1/2) b) < -1.99999999999999993e79Initial program 99.9%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 87.5%
Taylor expanded in a around 0 87.5%
if -1.99999999999999993e79 < (*.f64 (-.f64 a 1/2) b) < 9.9999999999999999e45Initial program 99.9%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in99.8%
*-commutative99.8%
fma-def99.8%
+-commutative99.8%
unsub-neg99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in b around 0 93.0%
if 9.9999999999999999e45 < (*.f64 (-.f64 a 1/2) b) Initial program 99.9%
+-commutative99.9%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in z around 0 91.7%
Final simplification91.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.45e+60) (not (<= z 2.05e+154))) (+ (* z (- 1.0 (log t))) (+ y (* b (- a 0.5)))) (+ (+ y x) (+ (* -0.5 b) (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.45e+60) || !(z <= 2.05e+154)) {
tmp = (z * (1.0 - log(t))) + (y + (b * (a - 0.5)));
} else {
tmp = (y + x) + ((-0.5 * b) + (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 ((z <= (-2.45d+60)) .or. (.not. (z <= 2.05d+154))) then
tmp = (z * (1.0d0 - log(t))) + (y + (b * (a - 0.5d0)))
else
tmp = (y + x) + (((-0.5d0) * b) + (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 ((z <= -2.45e+60) || !(z <= 2.05e+154)) {
tmp = (z * (1.0 - Math.log(t))) + (y + (b * (a - 0.5)));
} else {
tmp = (y + x) + ((-0.5 * b) + (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.45e+60) or not (z <= 2.05e+154): tmp = (z * (1.0 - math.log(t))) + (y + (b * (a - 0.5))) else: tmp = (y + x) + ((-0.5 * b) + (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.45e+60) || !(z <= 2.05e+154)) tmp = Float64(Float64(z * Float64(1.0 - log(t))) + Float64(y + Float64(b * Float64(a - 0.5)))); else tmp = Float64(Float64(y + x) + Float64(Float64(-0.5 * b) + Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.45e+60) || ~((z <= 2.05e+154))) tmp = (z * (1.0 - log(t))) + (y + (b * (a - 0.5))); else tmp = (y + x) + ((-0.5 * b) + (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.45e+60], N[Not[LessEqual[z, 2.05e+154]], $MachinePrecision]], N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y + x), $MachinePrecision] + N[(N[(-0.5 * b), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.45 \cdot 10^{+60} \lor \neg \left(z \leq 2.05 \cdot 10^{+154}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right) + \left(y + b \cdot \left(a - 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y + x\right) + \left(-0.5 \cdot b + a \cdot b\right)\\
\end{array}
\end{array}
if z < -2.4500000000000001e60 or 2.05e154 < z Initial program 99.7%
associate--l+99.7%
associate-+l+99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
*-commutative99.7%
cancel-sign-sub-inv99.7%
distribute-rgt1-in99.7%
*-commutative99.7%
fma-def99.7%
+-commutative99.7%
unsub-neg99.7%
fma-def99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 94.1%
if -2.4500000000000001e60 < z < 2.05e154Initial program 100.0%
associate--l+100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+r+100.0%
+-commutative100.0%
+-commutative100.0%
*-commutative100.0%
cancel-sign-sub-inv100.0%
distribute-rgt1-in100.0%
*-commutative100.0%
fma-def100.0%
+-commutative100.0%
unsub-neg100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 98.2%
Taylor expanded in a around 0 98.2%
Final simplification96.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- 1.0 (log t)))) (t_2 (+ y t_1)))
(if (<= z -7e+225)
t_2
(if (<= z -2.4e+196)
(+ (+ y x) (* b (- a 0.5)))
(if (<= z -4.1e+63)
(+ x t_1)
(if (<= z 1.8e+154) (+ (+ y x) (+ (* -0.5 b) (* a b))) t_2))))))
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 = y + t_1;
double tmp;
if (z <= -7e+225) {
tmp = t_2;
} else if (z <= -2.4e+196) {
tmp = (y + x) + (b * (a - 0.5));
} else if (z <= -4.1e+63) {
tmp = x + t_1;
} else if (z <= 1.8e+154) {
tmp = (y + x) + ((-0.5 * b) + (a * b));
} 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 = z * (1.0d0 - log(t))
t_2 = y + t_1
if (z <= (-7d+225)) then
tmp = t_2
else if (z <= (-2.4d+196)) then
tmp = (y + x) + (b * (a - 0.5d0))
else if (z <= (-4.1d+63)) then
tmp = x + t_1
else if (z <= 1.8d+154) then
tmp = (y + x) + (((-0.5d0) * b) + (a * b))
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 = z * (1.0 - Math.log(t));
double t_2 = y + t_1;
double tmp;
if (z <= -7e+225) {
tmp = t_2;
} else if (z <= -2.4e+196) {
tmp = (y + x) + (b * (a - 0.5));
} else if (z <= -4.1e+63) {
tmp = x + t_1;
} else if (z <= 1.8e+154) {
tmp = (y + x) + ((-0.5 * b) + (a * b));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (1.0 - math.log(t)) t_2 = y + t_1 tmp = 0 if z <= -7e+225: tmp = t_2 elif z <= -2.4e+196: tmp = (y + x) + (b * (a - 0.5)) elif z <= -4.1e+63: tmp = x + t_1 elif z <= 1.8e+154: tmp = (y + x) + ((-0.5 * b) + (a * b)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(1.0 - log(t))) t_2 = Float64(y + t_1) tmp = 0.0 if (z <= -7e+225) tmp = t_2; elseif (z <= -2.4e+196) tmp = Float64(Float64(y + x) + Float64(b * Float64(a - 0.5))); elseif (z <= -4.1e+63) tmp = Float64(x + t_1); elseif (z <= 1.8e+154) tmp = Float64(Float64(y + x) + Float64(Float64(-0.5 * b) + Float64(a * b))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (1.0 - log(t)); t_2 = y + t_1; tmp = 0.0; if (z <= -7e+225) tmp = t_2; elseif (z <= -2.4e+196) tmp = (y + x) + (b * (a - 0.5)); elseif (z <= -4.1e+63) tmp = x + t_1; elseif (z <= 1.8e+154) tmp = (y + x) + ((-0.5 * b) + (a * b)); else tmp = t_2; 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[(y + t$95$1), $MachinePrecision]}, If[LessEqual[z, -7e+225], t$95$2, If[LessEqual[z, -2.4e+196], N[(N[(y + x), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.1e+63], N[(x + t$95$1), $MachinePrecision], If[LessEqual[z, 1.8e+154], N[(N[(y + x), $MachinePrecision] + N[(N[(-0.5 * b), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(1 - \log t\right)\\
t_2 := y + t_1\\
\mathbf{if}\;z \leq -7 \cdot 10^{+225}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -2.4 \cdot 10^{+196}:\\
\;\;\;\;\left(y + x\right) + b \cdot \left(a - 0.5\right)\\
\mathbf{elif}\;z \leq -4.1 \cdot 10^{+63}:\\
\;\;\;\;x + t_1\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+154}:\\
\;\;\;\;\left(y + x\right) + \left(-0.5 \cdot b + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -7.0000000000000006e225 or 1.8e154 < z Initial program 99.6%
associate--l+99.6%
associate-+l+99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
+-commutative99.6%
*-commutative99.6%
cancel-sign-sub-inv99.6%
distribute-rgt1-in99.6%
*-commutative99.6%
fma-def99.6%
+-commutative99.6%
unsub-neg99.6%
fma-def99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 99.6%
Taylor expanded in b around 0 79.6%
if -7.0000000000000006e225 < z < -2.4e196Initial program 99.7%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 79.3%
if -2.4e196 < z < -4.09999999999999993e63Initial program 99.8%
associate--l+99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
distribute-rgt1-in99.8%
*-commutative99.8%
fma-def99.8%
+-commutative99.8%
unsub-neg99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 59.4%
if -4.09999999999999993e63 < z < 1.8e154Initial program 100.0%
associate--l+100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+r+100.0%
+-commutative100.0%
+-commutative100.0%
*-commutative100.0%
cancel-sign-sub-inv100.0%
distribute-rgt1-in100.0%
*-commutative100.0%
fma-def100.0%
+-commutative100.0%
unsub-neg100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 98.2%
Taylor expanded in a around 0 98.2%
Final simplification89.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- 1.0 (log t)))))
(if (<= z -2.1e+227)
(+ y t_1)
(if (<= z -5.5e+194)
(+ (+ y x) (* b (- a 0.5)))
(if (<= z -4.1e+63)
(+ x t_1)
(if (<= z 6.7e+156)
(+ (+ y x) (+ (* -0.5 b) (* a b)))
(+ y (- z (* z (log t))))))))))
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.1e+227) {
tmp = y + t_1;
} else if (z <= -5.5e+194) {
tmp = (y + x) + (b * (a - 0.5));
} else if (z <= -4.1e+63) {
tmp = x + t_1;
} else if (z <= 6.7e+156) {
tmp = (y + x) + ((-0.5 * b) + (a * b));
} else {
tmp = 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) :: t_1
real(8) :: tmp
t_1 = z * (1.0d0 - log(t))
if (z <= (-2.1d+227)) then
tmp = y + t_1
else if (z <= (-5.5d+194)) then
tmp = (y + x) + (b * (a - 0.5d0))
else if (z <= (-4.1d+63)) then
tmp = x + t_1
else if (z <= 6.7d+156) then
tmp = (y + x) + (((-0.5d0) * b) + (a * b))
else
tmp = 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 t_1 = z * (1.0 - Math.log(t));
double tmp;
if (z <= -2.1e+227) {
tmp = y + t_1;
} else if (z <= -5.5e+194) {
tmp = (y + x) + (b * (a - 0.5));
} else if (z <= -4.1e+63) {
tmp = x + t_1;
} else if (z <= 6.7e+156) {
tmp = (y + x) + ((-0.5 * b) + (a * b));
} else {
tmp = y + (z - (z * Math.log(t)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (1.0 - math.log(t)) tmp = 0 if z <= -2.1e+227: tmp = y + t_1 elif z <= -5.5e+194: tmp = (y + x) + (b * (a - 0.5)) elif z <= -4.1e+63: tmp = x + t_1 elif z <= 6.7e+156: tmp = (y + x) + ((-0.5 * b) + (a * b)) else: tmp = y + (z - (z * math.log(t))) 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.1e+227) tmp = Float64(y + t_1); elseif (z <= -5.5e+194) tmp = Float64(Float64(y + x) + Float64(b * Float64(a - 0.5))); elseif (z <= -4.1e+63) tmp = Float64(x + t_1); elseif (z <= 6.7e+156) tmp = Float64(Float64(y + x) + Float64(Float64(-0.5 * b) + Float64(a * b))); else tmp = Float64(y + Float64(z - Float64(z * log(t)))); 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.1e+227) tmp = y + t_1; elseif (z <= -5.5e+194) tmp = (y + x) + (b * (a - 0.5)); elseif (z <= -4.1e+63) tmp = x + t_1; elseif (z <= 6.7e+156) tmp = (y + x) + ((-0.5 * b) + (a * b)); else tmp = y + (z - (z * log(t))); 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.1e+227], N[(y + t$95$1), $MachinePrecision], If[LessEqual[z, -5.5e+194], N[(N[(y + x), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.1e+63], N[(x + t$95$1), $MachinePrecision], If[LessEqual[z, 6.7e+156], N[(N[(y + x), $MachinePrecision] + N[(N[(-0.5 * b), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(1 - \log t\right)\\
\mathbf{if}\;z \leq -2.1 \cdot 10^{+227}:\\
\;\;\;\;y + t_1\\
\mathbf{elif}\;z \leq -5.5 \cdot 10^{+194}:\\
\;\;\;\;\left(y + x\right) + b \cdot \left(a - 0.5\right)\\
\mathbf{elif}\;z \leq -4.1 \cdot 10^{+63}:\\
\;\;\;\;x + t_1\\
\mathbf{elif}\;z \leq 6.7 \cdot 10^{+156}:\\
\;\;\;\;\left(y + x\right) + \left(-0.5 \cdot b + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;y + \left(z - z \cdot \log t\right)\\
\end{array}
\end{array}
if z < -2.10000000000000019e227Initial program 99.5%
associate--l+99.5%
associate-+l+99.5%
associate-+l+99.5%
+-commutative99.5%
associate-+r+99.5%
+-commutative99.5%
+-commutative99.5%
*-commutative99.5%
cancel-sign-sub-inv99.5%
distribute-rgt1-in99.5%
*-commutative99.5%
fma-def99.5%
+-commutative99.5%
unsub-neg99.5%
fma-def99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around 0 99.5%
Taylor expanded in b around 0 93.7%
if -2.10000000000000019e227 < z < -5.4999999999999999e194Initial program 99.7%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 79.3%
if -5.4999999999999999e194 < z < -4.09999999999999993e63Initial program 99.8%
associate--l+99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
distribute-rgt1-in99.8%
*-commutative99.8%
fma-def99.8%
+-commutative99.8%
unsub-neg99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 59.4%
if -4.09999999999999993e63 < z < 6.7e156Initial program 100.0%
associate--l+100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+r+100.0%
+-commutative100.0%
+-commutative100.0%
*-commutative100.0%
cancel-sign-sub-inv100.0%
distribute-rgt1-in100.0%
*-commutative100.0%
fma-def100.0%
+-commutative100.0%
unsub-neg100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 98.2%
Taylor expanded in a around 0 98.2%
if 6.7e156 < z Initial program 99.7%
associate--l+99.7%
associate-+l+99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
*-commutative99.7%
cancel-sign-sub-inv99.7%
distribute-rgt1-in99.7%
*-commutative99.7%
fma-def99.7%
+-commutative99.7%
unsub-neg99.7%
fma-def99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
add-cube-cbrt98.6%
pow398.8%
*-commutative98.8%
Applied egg-rr98.8%
Taylor expanded in b around 0 70.8%
+-commutative70.8%
pow-base-170.8%
*-lft-identity70.8%
*-commutative70.8%
sub-neg70.8%
log-rec70.8%
+-commutative70.8%
distribute-lft1-in70.8%
*-commutative70.8%
log-rec70.8%
distribute-rgt-neg-in70.8%
+-commutative70.8%
sub-neg70.8%
*-commutative70.8%
Simplified70.8%
Final simplification89.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.25e+62) (not (<= z 1.15e+152))) (+ (* z (- 1.0 (log t))) (* b (- a 0.5))) (+ (+ y x) (+ (* -0.5 b) (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.25e+62) || !(z <= 1.15e+152)) {
tmp = (z * (1.0 - log(t))) + (b * (a - 0.5));
} else {
tmp = (y + x) + ((-0.5 * b) + (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 ((z <= (-2.25d+62)) .or. (.not. (z <= 1.15d+152))) then
tmp = (z * (1.0d0 - log(t))) + (b * (a - 0.5d0))
else
tmp = (y + x) + (((-0.5d0) * b) + (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 ((z <= -2.25e+62) || !(z <= 1.15e+152)) {
tmp = (z * (1.0 - Math.log(t))) + (b * (a - 0.5));
} else {
tmp = (y + x) + ((-0.5 * b) + (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.25e+62) or not (z <= 1.15e+152): tmp = (z * (1.0 - math.log(t))) + (b * (a - 0.5)) else: tmp = (y + x) + ((-0.5 * b) + (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.25e+62) || !(z <= 1.15e+152)) tmp = Float64(Float64(z * Float64(1.0 - log(t))) + Float64(b * Float64(a - 0.5))); else tmp = Float64(Float64(y + x) + Float64(Float64(-0.5 * b) + Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.25e+62) || ~((z <= 1.15e+152))) tmp = (z * (1.0 - log(t))) + (b * (a - 0.5)); else tmp = (y + x) + ((-0.5 * b) + (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.25e+62], N[Not[LessEqual[z, 1.15e+152]], $MachinePrecision]], N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y + x), $MachinePrecision] + N[(N[(-0.5 * b), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.25 \cdot 10^{+62} \lor \neg \left(z \leq 1.15 \cdot 10^{+152}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right) + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y + x\right) + \left(-0.5 \cdot b + a \cdot b\right)\\
\end{array}
\end{array}
if z < -2.24999999999999999e62 or 1.14999999999999993e152 < z Initial program 99.7%
associate--l+99.7%
associate-+l+99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
*-commutative99.7%
cancel-sign-sub-inv99.7%
distribute-rgt1-in99.7%
*-commutative99.7%
fma-def99.7%
+-commutative99.7%
unsub-neg99.7%
fma-def99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 94.1%
Taylor expanded in y around 0 84.6%
if -2.24999999999999999e62 < z < 1.14999999999999993e152Initial program 100.0%
associate--l+100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+r+100.0%
+-commutative100.0%
+-commutative100.0%
*-commutative100.0%
cancel-sign-sub-inv100.0%
distribute-rgt1-in100.0%
*-commutative100.0%
fma-def100.0%
+-commutative100.0%
unsub-neg100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 98.2%
Taylor expanded in a around 0 98.2%
Final simplification93.7%
(FPCore (x y z t a b) :precision binary64 (+ (+ (+ y x) (- z (* z (log t)))) (* (+ a -0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((y + x) + (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 = ((y + x) + (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 ((y + x) + (z - (z * Math.log(t)))) + ((a + -0.5) * b);
}
def code(x, y, z, t, a, b): return ((y + x) + (z - (z * math.log(t)))) + ((a + -0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(y + x) + Float64(z - Float64(z * log(t)))) + Float64(Float64(a + -0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((y + x) + (z - (z * log(t)))) + ((a + -0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(y + x), $MachinePrecision] + N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(y + x\right) + \left(z - z \cdot \log t\right)\right) + \left(a + -0.5\right) \cdot b
\end{array}
Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* z (- 1.0 (log t))))))
(if (<= z -5e+224)
t_1
(if (<= z -1.75e+192)
(+ (+ y x) (* b (- a 0.5)))
(if (<= z -2.85e+63)
t_1
(if (<= z 5e+156)
(+ (+ y x) (+ (* -0.5 b) (* a b)))
(- z (* z (log t)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z * (1.0 - log(t)));
double tmp;
if (z <= -5e+224) {
tmp = t_1;
} else if (z <= -1.75e+192) {
tmp = (y + x) + (b * (a - 0.5));
} else if (z <= -2.85e+63) {
tmp = t_1;
} else if (z <= 5e+156) {
tmp = (y + x) + ((-0.5 * b) + (a * b));
} 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 = x + (z * (1.0d0 - log(t)))
if (z <= (-5d+224)) then
tmp = t_1
else if (z <= (-1.75d+192)) then
tmp = (y + x) + (b * (a - 0.5d0))
else if (z <= (-2.85d+63)) then
tmp = t_1
else if (z <= 5d+156) then
tmp = (y + x) + (((-0.5d0) * b) + (a * b))
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 = x + (z * (1.0 - Math.log(t)));
double tmp;
if (z <= -5e+224) {
tmp = t_1;
} else if (z <= -1.75e+192) {
tmp = (y + x) + (b * (a - 0.5));
} else if (z <= -2.85e+63) {
tmp = t_1;
} else if (z <= 5e+156) {
tmp = (y + x) + ((-0.5 * b) + (a * b));
} else {
tmp = z - (z * Math.log(t));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (z * (1.0 - math.log(t))) tmp = 0 if z <= -5e+224: tmp = t_1 elif z <= -1.75e+192: tmp = (y + x) + (b * (a - 0.5)) elif z <= -2.85e+63: tmp = t_1 elif z <= 5e+156: tmp = (y + x) + ((-0.5 * b) + (a * b)) else: tmp = z - (z * math.log(t)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(z * Float64(1.0 - log(t)))) tmp = 0.0 if (z <= -5e+224) tmp = t_1; elseif (z <= -1.75e+192) tmp = Float64(Float64(y + x) + Float64(b * Float64(a - 0.5))); elseif (z <= -2.85e+63) tmp = t_1; elseif (z <= 5e+156) tmp = Float64(Float64(y + x) + Float64(Float64(-0.5 * b) + Float64(a * b))); else tmp = Float64(z - Float64(z * log(t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (z * (1.0 - log(t))); tmp = 0.0; if (z <= -5e+224) tmp = t_1; elseif (z <= -1.75e+192) tmp = (y + x) + (b * (a - 0.5)); elseif (z <= -2.85e+63) tmp = t_1; elseif (z <= 5e+156) tmp = (y + x) + ((-0.5 * b) + (a * b)); else tmp = z - (z * log(t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5e+224], t$95$1, If[LessEqual[z, -1.75e+192], N[(N[(y + x), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.85e+63], t$95$1, If[LessEqual[z, 5e+156], N[(N[(y + x), $MachinePrecision] + N[(N[(-0.5 * b), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \left(1 - \log t\right)\\
\mathbf{if}\;z \leq -5 \cdot 10^{+224}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.75 \cdot 10^{+192}:\\
\;\;\;\;\left(y + x\right) + b \cdot \left(a - 0.5\right)\\
\mathbf{elif}\;z \leq -2.85 \cdot 10^{+63}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+156}:\\
\;\;\;\;\left(y + x\right) + \left(-0.5 \cdot b + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;z - z \cdot \log t\\
\end{array}
\end{array}
if z < -4.99999999999999964e224 or -1.74999999999999991e192 < z < -2.8500000000000001e63Initial program 99.7%
associate--l+99.7%
associate-+l+99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
*-commutative99.7%
cancel-sign-sub-inv99.7%
distribute-rgt1-in99.7%
*-commutative99.7%
fma-def99.7%
+-commutative99.7%
unsub-neg99.7%
fma-def99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 69.4%
if -4.99999999999999964e224 < z < -1.74999999999999991e192Initial program 99.7%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 79.3%
if -2.8500000000000001e63 < z < 4.99999999999999992e156Initial program 100.0%
associate--l+100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+r+100.0%
+-commutative100.0%
+-commutative100.0%
*-commutative100.0%
cancel-sign-sub-inv100.0%
distribute-rgt1-in100.0%
*-commutative100.0%
fma-def100.0%
+-commutative100.0%
unsub-neg100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 98.2%
Taylor expanded in a around 0 98.2%
if 4.99999999999999992e156 < z Initial program 99.7%
associate--l+99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in a around 0 99.7%
Taylor expanded in z around inf 67.4%
sub-neg67.4%
+-commutative67.4%
distribute-rgt1-in67.5%
cancel-sign-sub-inv67.5%
*-commutative67.5%
Simplified67.5%
Final simplification88.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1e+225) (not (<= z 5.2e+156))) (* z (- 1.0 (log t))) (+ (+ y x) (+ (* -0.5 b) (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1e+225) || !(z <= 5.2e+156)) {
tmp = z * (1.0 - log(t));
} else {
tmp = (y + x) + ((-0.5 * b) + (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 ((z <= (-1d+225)) .or. (.not. (z <= 5.2d+156))) then
tmp = z * (1.0d0 - log(t))
else
tmp = (y + x) + (((-0.5d0) * b) + (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 ((z <= -1e+225) || !(z <= 5.2e+156)) {
tmp = z * (1.0 - Math.log(t));
} else {
tmp = (y + x) + ((-0.5 * b) + (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1e+225) or not (z <= 5.2e+156): tmp = z * (1.0 - math.log(t)) else: tmp = (y + x) + ((-0.5 * b) + (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1e+225) || !(z <= 5.2e+156)) tmp = Float64(z * Float64(1.0 - log(t))); else tmp = Float64(Float64(y + x) + Float64(Float64(-0.5 * b) + Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1e+225) || ~((z <= 5.2e+156))) tmp = z * (1.0 - log(t)); else tmp = (y + x) + ((-0.5 * b) + (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1e+225], N[Not[LessEqual[z, 5.2e+156]], $MachinePrecision]], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y + x), $MachinePrecision] + N[(N[(-0.5 * b), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+225} \lor \neg \left(z \leq 5.2 \cdot 10^{+156}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y + x\right) + \left(-0.5 \cdot b + a \cdot b\right)\\
\end{array}
\end{array}
if z < -9.99999999999999928e224 or 5.20000000000000037e156 < z Initial program 99.6%
associate--l+99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in a around 0 99.6%
Taylor expanded in z around inf 74.7%
if -9.99999999999999928e224 < z < 5.20000000000000037e156Initial program 99.9%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 90.9%
Taylor expanded in a around 0 90.9%
Final simplification88.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -5.2e+224)
(* z (- 1.0 (log t)))
(if (<= z 2.05e+157)
(+ (+ y x) (+ (* -0.5 b) (* a b)))
(- z (* z (log t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -5.2e+224) {
tmp = z * (1.0 - log(t));
} else if (z <= 2.05e+157) {
tmp = (y + x) + ((-0.5 * b) + (a * b));
} 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) :: tmp
if (z <= (-5.2d+224)) then
tmp = z * (1.0d0 - log(t))
else if (z <= 2.05d+157) then
tmp = (y + x) + (((-0.5d0) * b) + (a * b))
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 tmp;
if (z <= -5.2e+224) {
tmp = z * (1.0 - Math.log(t));
} else if (z <= 2.05e+157) {
tmp = (y + x) + ((-0.5 * b) + (a * b));
} else {
tmp = z - (z * Math.log(t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -5.2e+224: tmp = z * (1.0 - math.log(t)) elif z <= 2.05e+157: tmp = (y + x) + ((-0.5 * b) + (a * b)) else: tmp = z - (z * math.log(t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -5.2e+224) tmp = Float64(z * Float64(1.0 - log(t))); elseif (z <= 2.05e+157) tmp = Float64(Float64(y + x) + Float64(Float64(-0.5 * b) + Float64(a * b))); else tmp = 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 <= -5.2e+224) tmp = z * (1.0 - log(t)); elseif (z <= 2.05e+157) tmp = (y + x) + ((-0.5 * b) + (a * b)); else tmp = z - (z * log(t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -5.2e+224], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.05e+157], N[(N[(y + x), $MachinePrecision] + N[(N[(-0.5 * b), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{+224}:\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\
\mathbf{elif}\;z \leq 2.05 \cdot 10^{+157}:\\
\;\;\;\;\left(y + x\right) + \left(-0.5 \cdot b + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;z - z \cdot \log t\\
\end{array}
\end{array}
if z < -5.2000000000000001e224Initial program 99.5%
associate--l+99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in a around 0 99.5%
Taylor expanded in z around inf 86.3%
if -5.2000000000000001e224 < z < 2.05000000000000008e157Initial program 99.9%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 90.9%
Taylor expanded in a around 0 90.9%
if 2.05000000000000008e157 < z Initial program 99.7%
associate--l+99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in a around 0 99.7%
Taylor expanded in z around inf 67.4%
sub-neg67.4%
+-commutative67.4%
distribute-rgt1-in67.5%
cancel-sign-sub-inv67.5%
*-commutative67.5%
Simplified67.5%
Final simplification88.1%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5)))) (if (or (<= t_1 -2e+79) (not (<= t_1 5e+181))) t_1 (+ y x))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((t_1 <= -2e+79) || !(t_1 <= 5e+181)) {
tmp = t_1;
} else {
tmp = y + 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) :: tmp
t_1 = b * (a - 0.5d0)
if ((t_1 <= (-2d+79)) .or. (.not. (t_1 <= 5d+181))) then
tmp = t_1
else
tmp = y + 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 = b * (a - 0.5);
double tmp;
if ((t_1 <= -2e+79) || !(t_1 <= 5e+181)) {
tmp = t_1;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (t_1 <= -2e+79) or not (t_1 <= 5e+181): tmp = t_1 else: tmp = y + x return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if ((t_1 <= -2e+79) || !(t_1 <= 5e+181)) tmp = t_1; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if ((t_1 <= -2e+79) || ~((t_1 <= 5e+181))) tmp = t_1; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e+79], N[Not[LessEqual[t$95$1, 5e+181]], $MachinePrecision]], t$95$1, N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{+79} \lor \neg \left(t_1 \leq 5 \cdot 10^{+181}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if (*.f64 (-.f64 a 1/2) b) < -1.99999999999999993e79 or 5.0000000000000003e181 < (*.f64 (-.f64 a 1/2) b) Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in b around inf 78.2%
if -1.99999999999999993e79 < (*.f64 (-.f64 a 1/2) b) < 5.0000000000000003e181Initial program 99.9%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 59.8%
Final simplification67.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -3.5e+92)
(* a b)
(if (<= a -9e-42)
x
(if (<= a -1.4e-100)
(* -0.5 b)
(if (<= a -2.4e-220) x (if (<= a 1.45e+47) (* -0.5 b) (* a b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -3.5e+92) {
tmp = a * b;
} else if (a <= -9e-42) {
tmp = x;
} else if (a <= -1.4e-100) {
tmp = -0.5 * b;
} else if (a <= -2.4e-220) {
tmp = x;
} else if (a <= 1.45e+47) {
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 (a <= (-3.5d+92)) then
tmp = a * b
else if (a <= (-9d-42)) then
tmp = x
else if (a <= (-1.4d-100)) then
tmp = (-0.5d0) * b
else if (a <= (-2.4d-220)) then
tmp = x
else if (a <= 1.45d+47) 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 (a <= -3.5e+92) {
tmp = a * b;
} else if (a <= -9e-42) {
tmp = x;
} else if (a <= -1.4e-100) {
tmp = -0.5 * b;
} else if (a <= -2.4e-220) {
tmp = x;
} else if (a <= 1.45e+47) {
tmp = -0.5 * b;
} else {
tmp = a * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -3.5e+92: tmp = a * b elif a <= -9e-42: tmp = x elif a <= -1.4e-100: tmp = -0.5 * b elif a <= -2.4e-220: tmp = x elif a <= 1.45e+47: tmp = -0.5 * b else: tmp = a * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -3.5e+92) tmp = Float64(a * b); elseif (a <= -9e-42) tmp = x; elseif (a <= -1.4e-100) tmp = Float64(-0.5 * b); elseif (a <= -2.4e-220) tmp = x; elseif (a <= 1.45e+47) 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 (a <= -3.5e+92) tmp = a * b; elseif (a <= -9e-42) tmp = x; elseif (a <= -1.4e-100) tmp = -0.5 * b; elseif (a <= -2.4e-220) tmp = x; elseif (a <= 1.45e+47) tmp = -0.5 * b; else tmp = a * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -3.5e+92], N[(a * b), $MachinePrecision], If[LessEqual[a, -9e-42], x, If[LessEqual[a, -1.4e-100], N[(-0.5 * b), $MachinePrecision], If[LessEqual[a, -2.4e-220], x, If[LessEqual[a, 1.45e+47], N[(-0.5 * b), $MachinePrecision], N[(a * b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.5 \cdot 10^{+92}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;a \leq -9 \cdot 10^{-42}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -1.4 \cdot 10^{-100}:\\
\;\;\;\;-0.5 \cdot b\\
\mathbf{elif}\;a \leq -2.4 \cdot 10^{-220}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.45 \cdot 10^{+47}:\\
\;\;\;\;-0.5 \cdot b\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if a < -3.49999999999999986e92 or 1.4499999999999999e47 < a Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in a around inf 61.4%
*-commutative61.4%
Simplified61.4%
if -3.49999999999999986e92 < a < -9e-42 or -1.39999999999999998e-100 < a < -2.4000000000000001e-220Initial program 99.8%
associate--l+99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
distribute-rgt1-in99.8%
*-commutative99.8%
fma-def99.8%
+-commutative99.8%
unsub-neg99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 28.1%
if -9e-42 < a < -1.39999999999999998e-100 or -2.4000000000000001e-220 < a < 1.4499999999999999e47Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in b around inf 36.3%
Taylor expanded in a around 0 36.0%
Final simplification44.5%
(FPCore (x y z t a b) :precision binary64 (if (<= (+ y x) -20000000000000.0) (+ x (* a b)) (if (<= (+ y x) 5e+144) (* b (- a 0.5)) (+ y x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y + x) <= -20000000000000.0) {
tmp = x + (a * b);
} else if ((y + x) <= 5e+144) {
tmp = b * (a - 0.5);
} else {
tmp = y + 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 + x) <= (-20000000000000.0d0)) then
tmp = x + (a * b)
else if ((y + x) <= 5d+144) then
tmp = b * (a - 0.5d0)
else
tmp = y + 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 + x) <= -20000000000000.0) {
tmp = x + (a * b);
} else if ((y + x) <= 5e+144) {
tmp = b * (a - 0.5);
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y + x) <= -20000000000000.0: tmp = x + (a * b) elif (y + x) <= 5e+144: tmp = b * (a - 0.5) else: tmp = y + x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(y + x) <= -20000000000000.0) tmp = Float64(x + Float64(a * b)); elseif (Float64(y + x) <= 5e+144) tmp = Float64(b * Float64(a - 0.5)); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y + x) <= -20000000000000.0) tmp = x + (a * b); elseif ((y + x) <= 5e+144) tmp = b * (a - 0.5); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(y + x), $MachinePrecision], -20000000000000.0], N[(x + N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(y + x), $MachinePrecision], 5e+144], N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y + x \leq -20000000000000:\\
\;\;\;\;x + a \cdot b\\
\mathbf{elif}\;y + x \leq 5 \cdot 10^{+144}:\\
\;\;\;\;b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if (+.f64 x y) < -2e13Initial program 99.9%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around inf 49.5%
if -2e13 < (+.f64 x y) < 4.9999999999999999e144Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in b around inf 60.3%
if 4.9999999999999999e144 < (+.f64 x y) Initial program 99.9%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 61.3%
Final simplification56.0%
(FPCore (x y z t a b) :precision binary64 (if (<= (+ y x) -20000000000000.0) (+ x (* a b)) (if (<= (+ y x) 2e-41) (* 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 ((y + x) <= -20000000000000.0) {
tmp = x + (a * b);
} else if ((y + x) <= 2e-41) {
tmp = 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 ((y + x) <= (-20000000000000.0d0)) then
tmp = x + (a * b)
else if ((y + x) <= 2d-41) then
tmp = 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 ((y + x) <= -20000000000000.0) {
tmp = x + (a * b);
} else if ((y + x) <= 2e-41) {
tmp = b * (a - 0.5);
} else {
tmp = y + (-0.5 * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y + x) <= -20000000000000.0: tmp = x + (a * b) elif (y + x) <= 2e-41: tmp = 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(y + x) <= -20000000000000.0) tmp = Float64(x + Float64(a * b)); elseif (Float64(y + x) <= 2e-41) tmp = 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 ((y + x) <= -20000000000000.0) tmp = x + (a * b); elseif ((y + x) <= 2e-41) tmp = 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[(y + x), $MachinePrecision], -20000000000000.0], N[(x + N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(y + x), $MachinePrecision], 2e-41], N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], N[(y + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y + x \leq -20000000000000:\\
\;\;\;\;x + a \cdot b\\
\mathbf{elif}\;y + x \leq 2 \cdot 10^{-41}:\\
\;\;\;\;b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;y + -0.5 \cdot b\\
\end{array}
\end{array}
if (+.f64 x y) < -2e13Initial program 99.9%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around inf 49.5%
if -2e13 < (+.f64 x y) < 2.00000000000000001e-41Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in b around inf 68.8%
if 2.00000000000000001e-41 < (+.f64 x y) Initial program 99.9%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 79.8%
Taylor expanded in x around 0 58.7%
Taylor expanded in a around 0 40.1%
Final simplification51.1%
(FPCore (x y z t a b) :precision binary64 (if (<= (+ y x) -20000000000000.0) (+ x (* a b)) (if (<= (+ y x) 1e+97) (* b (- a 0.5)) (+ y (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y + x) <= -20000000000000.0) {
tmp = x + (a * b);
} else if ((y + x) <= 1e+97) {
tmp = b * (a - 0.5);
} else {
tmp = y + (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 ((y + x) <= (-20000000000000.0d0)) then
tmp = x + (a * b)
else if ((y + x) <= 1d+97) then
tmp = b * (a - 0.5d0)
else
tmp = y + (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 ((y + x) <= -20000000000000.0) {
tmp = x + (a * b);
} else if ((y + x) <= 1e+97) {
tmp = b * (a - 0.5);
} else {
tmp = y + (a * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y + x) <= -20000000000000.0: tmp = x + (a * b) elif (y + x) <= 1e+97: tmp = b * (a - 0.5) else: tmp = y + (a * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(y + x) <= -20000000000000.0) tmp = Float64(x + Float64(a * b)); elseif (Float64(y + x) <= 1e+97) tmp = Float64(b * Float64(a - 0.5)); else tmp = Float64(y + Float64(a * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y + x) <= -20000000000000.0) tmp = x + (a * b); elseif ((y + x) <= 1e+97) tmp = b * (a - 0.5); else tmp = y + (a * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(y + x), $MachinePrecision], -20000000000000.0], N[(x + N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(y + x), $MachinePrecision], 1e+97], N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y + x \leq -20000000000000:\\
\;\;\;\;x + a \cdot b\\
\mathbf{elif}\;y + x \leq 10^{+97}:\\
\;\;\;\;b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;y + a \cdot b\\
\end{array}
\end{array}
if (+.f64 x y) < -2e13Initial program 99.9%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around inf 49.5%
if -2e13 < (+.f64 x y) < 1.0000000000000001e97Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in b around inf 62.4%
if 1.0000000000000001e97 < (+.f64 x y) Initial program 99.8%
associate--l+99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
distribute-rgt1-in99.8%
*-commutative99.8%
fma-def99.8%
+-commutative99.8%
unsub-neg99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 86.7%
Taylor expanded in x around 0 58.6%
Taylor expanded in a around 0 58.7%
Taylor expanded in a around inf 49.3%
*-commutative49.3%
Simplified49.3%
Final simplification54.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= x -170000000000.0)
x
(if (<= x -2.2e-171)
(* -0.5 b)
(if (<= x -1.12e-244) y (if (<= x 2e-295) (* -0.5 b) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -170000000000.0) {
tmp = x;
} else if (x <= -2.2e-171) {
tmp = -0.5 * b;
} else if (x <= -1.12e-244) {
tmp = y;
} else if (x <= 2e-295) {
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 <= (-170000000000.0d0)) then
tmp = x
else if (x <= (-2.2d-171)) then
tmp = (-0.5d0) * b
else if (x <= (-1.12d-244)) then
tmp = y
else if (x <= 2d-295) 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 <= -170000000000.0) {
tmp = x;
} else if (x <= -2.2e-171) {
tmp = -0.5 * b;
} else if (x <= -1.12e-244) {
tmp = y;
} else if (x <= 2e-295) {
tmp = -0.5 * b;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -170000000000.0: tmp = x elif x <= -2.2e-171: tmp = -0.5 * b elif x <= -1.12e-244: tmp = y elif x <= 2e-295: tmp = -0.5 * b else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -170000000000.0) tmp = x; elseif (x <= -2.2e-171) tmp = Float64(-0.5 * b); elseif (x <= -1.12e-244) tmp = y; elseif (x <= 2e-295) 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 <= -170000000000.0) tmp = x; elseif (x <= -2.2e-171) tmp = -0.5 * b; elseif (x <= -1.12e-244) tmp = y; elseif (x <= 2e-295) tmp = -0.5 * b; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -170000000000.0], x, If[LessEqual[x, -2.2e-171], N[(-0.5 * b), $MachinePrecision], If[LessEqual[x, -1.12e-244], y, If[LessEqual[x, 2e-295], N[(-0.5 * b), $MachinePrecision], y]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -170000000000:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -2.2 \cdot 10^{-171}:\\
\;\;\;\;-0.5 \cdot b\\
\mathbf{elif}\;x \leq -1.12 \cdot 10^{-244}:\\
\;\;\;\;y\\
\mathbf{elif}\;x \leq 2 \cdot 10^{-295}:\\
\;\;\;\;-0.5 \cdot b\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if x < -1.7e11Initial program 99.9%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 47.9%
if -1.7e11 < x < -2.2000000000000001e-171 or -1.1200000000000001e-244 < x < 2.00000000000000012e-295Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in b around inf 53.4%
Taylor expanded in a around 0 29.7%
if -2.2000000000000001e-171 < x < -1.1200000000000001e-244 or 2.00000000000000012e-295 < x Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in y around inf 22.8%
Final simplification30.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -3.5e+91)
(* a b)
(if (<= a -2.4e-42)
(+ y x)
(if (<= a -2.5e-74) (* -0.5 b) (if (<= a 3.7e+120) (+ y x) (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -3.5e+91) {
tmp = a * b;
} else if (a <= -2.4e-42) {
tmp = y + x;
} else if (a <= -2.5e-74) {
tmp = -0.5 * b;
} else if (a <= 3.7e+120) {
tmp = y + 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 <= (-3.5d+91)) then
tmp = a * b
else if (a <= (-2.4d-42)) then
tmp = y + x
else if (a <= (-2.5d-74)) then
tmp = (-0.5d0) * b
else if (a <= 3.7d+120) then
tmp = y + 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 <= -3.5e+91) {
tmp = a * b;
} else if (a <= -2.4e-42) {
tmp = y + x;
} else if (a <= -2.5e-74) {
tmp = -0.5 * b;
} else if (a <= 3.7e+120) {
tmp = y + x;
} else {
tmp = a * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -3.5e+91: tmp = a * b elif a <= -2.4e-42: tmp = y + x elif a <= -2.5e-74: tmp = -0.5 * b elif a <= 3.7e+120: tmp = y + x else: tmp = a * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -3.5e+91) tmp = Float64(a * b); elseif (a <= -2.4e-42) tmp = Float64(y + x); elseif (a <= -2.5e-74) tmp = Float64(-0.5 * b); elseif (a <= 3.7e+120) tmp = Float64(y + 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 <= -3.5e+91) tmp = a * b; elseif (a <= -2.4e-42) tmp = y + x; elseif (a <= -2.5e-74) tmp = -0.5 * b; elseif (a <= 3.7e+120) tmp = y + x; else tmp = a * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -3.5e+91], N[(a * b), $MachinePrecision], If[LessEqual[a, -2.4e-42], N[(y + x), $MachinePrecision], If[LessEqual[a, -2.5e-74], N[(-0.5 * b), $MachinePrecision], If[LessEqual[a, 3.7e+120], N[(y + x), $MachinePrecision], N[(a * b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.5 \cdot 10^{+91}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;a \leq -2.4 \cdot 10^{-42}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;a \leq -2.5 \cdot 10^{-74}:\\
\;\;\;\;-0.5 \cdot b\\
\mathbf{elif}\;a \leq 3.7 \cdot 10^{+120}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if a < -3.50000000000000001e91 or 3.70000000000000024e120 < a Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in a around inf 62.9%
*-commutative62.9%
Simplified62.9%
if -3.50000000000000001e91 < a < -2.40000000000000003e-42 or -2.49999999999999999e-74 < a < 3.70000000000000024e120Initial program 99.9%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 48.6%
if -2.40000000000000003e-42 < a < -2.49999999999999999e-74Initial program 100.0%
associate--l+100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in a around 0 100.0%
Taylor expanded in b around inf 86.0%
Taylor expanded in a around 0 86.0%
Final simplification54.8%
(FPCore (x y z t a b) :precision binary64 (if (<= (+ y x) 1e+97) (+ x (* b (- a 0.5))) (+ y (* a b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y + x) <= 1e+97) {
tmp = x + (b * (a - 0.5));
} else {
tmp = y + (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 ((y + x) <= 1d+97) then
tmp = x + (b * (a - 0.5d0))
else
tmp = y + (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 ((y + x) <= 1e+97) {
tmp = x + (b * (a - 0.5));
} else {
tmp = y + (a * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y + x) <= 1e+97: tmp = x + (b * (a - 0.5)) else: tmp = y + (a * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(y + x) <= 1e+97) tmp = Float64(x + Float64(b * Float64(a - 0.5))); else tmp = Float64(y + Float64(a * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y + x) <= 1e+97) tmp = x + (b * (a - 0.5)); else tmp = y + (a * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(y + x), $MachinePrecision], 1e+97], N[(x + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y + x \leq 10^{+97}:\\
\;\;\;\;x + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;y + a \cdot b\\
\end{array}
\end{array}
if (+.f64 x y) < 1.0000000000000001e97Initial program 99.9%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in b around inf 59.4%
if 1.0000000000000001e97 < (+.f64 x y) Initial program 99.8%
associate--l+99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
distribute-rgt1-in99.8%
*-commutative99.8%
fma-def99.8%
+-commutative99.8%
unsub-neg99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 86.7%
Taylor expanded in x around 0 58.6%
Taylor expanded in a around 0 58.7%
Taylor expanded in a around inf 49.3%
*-commutative49.3%
Simplified49.3%
Final simplification57.1%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5)))) (if (<= (+ y x) 2e-87) (+ 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 ((y + x) <= 2e-87) {
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 ((y + x) <= 2d-87) 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 ((y + x) <= 2e-87) {
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 (y + x) <= 2e-87: 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(y + x) <= 2e-87) 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 ((y + x) <= 2e-87) 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[(y + x), $MachinePrecision], 2e-87], 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}\;y + x \leq 2 \cdot 10^{-87}:\\
\;\;\;\;x + t_1\\
\mathbf{else}:\\
\;\;\;\;y + t_1\\
\end{array}
\end{array}
if (+.f64 x y) < 2.00000000000000004e-87Initial program 99.9%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in b around inf 59.4%
if 2.00000000000000004e-87 < (+.f64 x y) Initial program 99.9%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 80.5%
Taylor expanded in x around 0 61.1%
Final simplification60.1%
(FPCore (x y z t a b) :precision binary64 (+ (+ y x) (+ (* -0.5 b) (* a b))))
double code(double x, double y, double z, double t, double a, double b) {
return (y + x) + ((-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 = (y + x) + (((-0.5d0) * b) + (a * b))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (y + x) + ((-0.5 * b) + (a * b));
}
def code(x, y, z, t, a, b): return (y + x) + ((-0.5 * b) + (a * b))
function code(x, y, z, t, a, b) return Float64(Float64(y + x) + Float64(Float64(-0.5 * b) + Float64(a * b))) end
function tmp = code(x, y, z, t, a, b) tmp = (y + x) + ((-0.5 * b) + (a * b)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(y + x), $MachinePrecision] + N[(N[(-0.5 * b), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(y + x\right) + \left(-0.5 \cdot b + a \cdot b\right)
\end{array}
Initial program 99.9%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 79.7%
Taylor expanded in a around 0 79.7%
Final simplification79.7%
(FPCore (x y z t a b) :precision binary64 (+ (+ y x) (* b (- a 0.5))))
double code(double x, double y, double z, double t, double a, double b) {
return (y + x) + (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 = (y + x) + (b * (a - 0.5d0))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (y + x) + (b * (a - 0.5));
}
def code(x, y, z, t, a, b): return (y + x) + (b * (a - 0.5))
function code(x, y, z, t, a, b) return Float64(Float64(y + x) + Float64(b * Float64(a - 0.5))) end
function tmp = code(x, y, z, t, a, b) tmp = (y + x) + (b * (a - 0.5)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(y + x), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(y + x\right) + b \cdot \left(a - 0.5\right)
\end{array}
Initial program 99.9%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 79.7%
Final simplification79.7%
(FPCore (x y z t a b) :precision binary64 (if (<= x -2600000000000.0) x y))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2600000000000.0) {
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 <= (-2600000000000.0d0)) 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 <= -2600000000000.0) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -2600000000000.0: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -2600000000000.0) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -2600000000000.0) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2600000000000.0], x, y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2600000000000:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if x < -2.6e12Initial program 99.9%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 47.9%
if -2.6e12 < x Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in y around inf 24.2%
Final simplification29.6%
(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%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 19.0%
Final simplification19.0%
(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 2023195
(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)))