
(FPCore (x y z t a b) :precision binary64 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (((x + y) + z) - (z * log(t))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return (((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (((x + y) + z) - (z * log(t))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return (((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\end{array}
(FPCore (x y z t a b) :precision binary64 (+ (* 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-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (or (<= t_1 -2e+105) (not (<= t_1 1e+38)))
(+ (+ z (+ x y)) t_1)
(+ (* z (- 1.0 (log t))) (+ x y)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((t_1 <= -2e+105) || !(t_1 <= 1e+38)) {
tmp = (z + (x + y)) + t_1;
} else {
tmp = (z * (1.0 - log(t))) + (x + y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if ((t_1 <= (-2d+105)) .or. (.not. (t_1 <= 1d+38))) then
tmp = (z + (x + y)) + t_1
else
tmp = (z * (1.0d0 - log(t))) + (x + y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((t_1 <= -2e+105) || !(t_1 <= 1e+38)) {
tmp = (z + (x + y)) + t_1;
} else {
tmp = (z * (1.0 - Math.log(t))) + (x + y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (t_1 <= -2e+105) or not (t_1 <= 1e+38): tmp = (z + (x + y)) + t_1 else: tmp = (z * (1.0 - math.log(t))) + (x + y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if ((t_1 <= -2e+105) || !(t_1 <= 1e+38)) tmp = Float64(Float64(z + Float64(x + y)) + t_1); else tmp = Float64(Float64(z * Float64(1.0 - log(t))) + Float64(x + y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if ((t_1 <= -2e+105) || ~((t_1 <= 1e+38))) tmp = (z + (x + y)) + t_1; else tmp = (z * (1.0 - log(t))) + (x + y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e+105], N[Not[LessEqual[t$95$1, 1e+38]], $MachinePrecision]], N[(N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{+105} \lor \neg \left(t_1 \leq 10^{+38}\right):\\
\;\;\;\;\left(z + \left(x + y\right)\right) + t_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(1 - \log t\right) + \left(x + y\right)\\
\end{array}
\end{array}
if (*.f64 (-.f64 a 1/2) b) < -1.9999999999999999e105 or 9.99999999999999977e37 < (*.f64 (-.f64 a 1/2) b) Initial program 99.9%
add-sqr-sqrt46.3%
pow246.3%
Applied egg-rr46.3%
Taylor expanded in z around 0 91.7%
associate-+r+91.7%
+-commutative91.7%
Simplified91.7%
if -1.9999999999999999e105 < (*.f64 (-.f64 a 1/2) b) < 9.99999999999999977e37Initial program 99.8%
+-commutative99.8%
associate--l+99.8%
associate-+r+99.8%
+-commutative99.8%
*-lft-identity99.8%
metadata-eval99.8%
*-commutative99.8%
distribute-rgt-out--99.8%
metadata-eval99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in b around 0 95.5%
Final simplification93.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (<= (+ x y) 4e+42)
(+ t_1 (- (+ z x) (* z (log t))))
(+ (+ z (+ 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) <= 4e+42) {
tmp = t_1 + ((z + x) - (z * log(t)));
} else {
tmp = (z + (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) <= 4d+42) then
tmp = t_1 + ((z + x) - (z * log(t)))
else
tmp = (z + (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) <= 4e+42) {
tmp = t_1 + ((z + x) - (z * Math.log(t)));
} else {
tmp = (z + (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) <= 4e+42: tmp = t_1 + ((z + x) - (z * math.log(t))) else: tmp = (z + (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) <= 4e+42) tmp = Float64(t_1 + Float64(Float64(z + x) - Float64(z * log(t)))); else tmp = Float64(Float64(z + 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) <= 4e+42) tmp = t_1 + ((z + x) - (z * log(t))); else tmp = (z + (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], 4e+42], N[(t$95$1 + N[(N[(z + x), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(x + y), $MachinePrecision]), $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 4 \cdot 10^{+42}:\\
\;\;\;\;t_1 + \left(\left(z + x\right) - z \cdot \log t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z + \left(x + y\right)\right) + t_1\\
\end{array}
\end{array}
if (+.f64 x y) < 4.00000000000000018e42Initial program 99.8%
Taylor expanded in y around 0 83.7%
if 4.00000000000000018e42 < (+.f64 x y) Initial program 99.9%
add-sqr-sqrt51.6%
pow251.6%
Applied egg-rr51.6%
Taylor expanded in z around 0 83.1%
associate-+r+83.1%
+-commutative83.1%
Simplified83.1%
Final simplification83.5%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* z (log t))) (t_2 (* b (- a 0.5)))) (if (<= (+ x y) -5e-79) (+ t_2 (- (+ z x) t_1)) (+ t_2 (- (+ z y) t_1)))))
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 tmp;
if ((x + y) <= -5e-79) {
tmp = t_2 + ((z + x) - t_1);
} else {
tmp = t_2 + ((z + 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) :: t_2
real(8) :: tmp
t_1 = z * log(t)
t_2 = b * (a - 0.5d0)
if ((x + y) <= (-5d-79)) then
tmp = t_2 + ((z + x) - t_1)
else
tmp = t_2 + ((z + 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 = z * Math.log(t);
double t_2 = b * (a - 0.5);
double tmp;
if ((x + y) <= -5e-79) {
tmp = t_2 + ((z + x) - t_1);
} else {
tmp = t_2 + ((z + y) - t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * math.log(t) t_2 = b * (a - 0.5) tmp = 0 if (x + y) <= -5e-79: tmp = t_2 + ((z + x) - t_1) else: tmp = t_2 + ((z + y) - t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * log(t)) t_2 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if (Float64(x + y) <= -5e-79) tmp = Float64(t_2 + Float64(Float64(z + x) - t_1)); else tmp = Float64(t_2 + Float64(Float64(z + y) - t_1)); 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); tmp = 0.0; if ((x + y) <= -5e-79) tmp = t_2 + ((z + x) - t_1); else tmp = t_2 + ((z + y) - t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x + y), $MachinePrecision], -5e-79], N[(t$95$2 + N[(N[(z + x), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], N[(t$95$2 + N[(N[(z + y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \log t\\
t_2 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;x + y \leq -5 \cdot 10^{-79}:\\
\;\;\;\;t_2 + \left(\left(z + x\right) - t_1\right)\\
\mathbf{else}:\\
\;\;\;\;t_2 + \left(\left(z + y\right) - t_1\right)\\
\end{array}
\end{array}
if (+.f64 x y) < -4.99999999999999999e-79Initial program 99.9%
Taylor expanded in y around 0 77.8%
if -4.99999999999999999e-79 < (+.f64 x y) Initial program 99.9%
add-sqr-sqrt54.9%
pow254.9%
Applied egg-rr54.9%
Taylor expanded in x around 0 74.1%
Final simplification75.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.45e+243)
(- z (* z (log t)))
(if (or (<= z -1.15e+110) (and (not (<= z -1.8e+79)) (<= z 2.4e+136)))
(+ (+ z (+ x y)) (* b (- a 0.5)))
(+ (* z (- 1.0 (log t))) x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.45e+243) {
tmp = z - (z * log(t));
} else if ((z <= -1.15e+110) || (!(z <= -1.8e+79) && (z <= 2.4e+136))) {
tmp = (z + (x + y)) + (b * (a - 0.5));
} else {
tmp = (z * (1.0 - log(t))) + 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 (z <= (-1.45d+243)) then
tmp = z - (z * log(t))
else if ((z <= (-1.15d+110)) .or. (.not. (z <= (-1.8d+79))) .and. (z <= 2.4d+136)) then
tmp = (z + (x + y)) + (b * (a - 0.5d0))
else
tmp = (z * (1.0d0 - log(t))) + 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 (z <= -1.45e+243) {
tmp = z - (z * Math.log(t));
} else if ((z <= -1.15e+110) || (!(z <= -1.8e+79) && (z <= 2.4e+136))) {
tmp = (z + (x + y)) + (b * (a - 0.5));
} else {
tmp = (z * (1.0 - Math.log(t))) + x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.45e+243: tmp = z - (z * math.log(t)) elif (z <= -1.15e+110) or (not (z <= -1.8e+79) and (z <= 2.4e+136)): tmp = (z + (x + y)) + (b * (a - 0.5)) else: tmp = (z * (1.0 - math.log(t))) + x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.45e+243) tmp = Float64(z - Float64(z * log(t))); elseif ((z <= -1.15e+110) || (!(z <= -1.8e+79) && (z <= 2.4e+136))) tmp = Float64(Float64(z + Float64(x + y)) + Float64(b * Float64(a - 0.5))); else tmp = Float64(Float64(z * Float64(1.0 - log(t))) + x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.45e+243) tmp = z - (z * log(t)); elseif ((z <= -1.15e+110) || (~((z <= -1.8e+79)) && (z <= 2.4e+136))) tmp = (z + (x + y)) + (b * (a - 0.5)); else tmp = (z * (1.0 - log(t))) + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.45e+243], N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -1.15e+110], And[N[Not[LessEqual[z, -1.8e+79]], $MachinePrecision], LessEqual[z, 2.4e+136]]], N[(N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+243}:\\
\;\;\;\;z - z \cdot \log t\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{+110} \lor \neg \left(z \leq -1.8 \cdot 10^{+79}\right) \land z \leq 2.4 \cdot 10^{+136}:\\
\;\;\;\;\left(z + \left(x + y\right)\right) + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(1 - \log t\right) + x\\
\end{array}
\end{array}
if z < -1.45000000000000003e243Initial program 100.0%
Taylor expanded in a around 0 99.9%
Taylor expanded in b around 0 95.9%
Taylor expanded in y around 0 95.9%
Taylor expanded in x around 0 95.9%
if -1.45000000000000003e243 < z < -1.15e110 or -1.8e79 < z < 2.4e136Initial program 99.9%
add-sqr-sqrt52.3%
pow252.3%
Applied egg-rr52.3%
Taylor expanded in z around 0 93.1%
associate-+r+93.1%
+-commutative93.1%
Simplified93.1%
if -1.15e110 < z < -1.8e79 or 2.4e136 < z Initial program 99.6%
+-commutative99.6%
associate--l+99.6%
associate-+r+99.6%
+-commutative99.6%
*-lft-identity99.6%
metadata-eval99.6%
*-commutative99.6%
distribute-rgt-out--99.6%
metadata-eval99.6%
fma-def99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in b around 0 90.1%
Taylor expanded in y around 0 84.1%
Final simplification91.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ z (+ x y)) (* b (- a 0.5)))) (t_2 (* z (- 1.0 (log t)))))
(if (<= z -2e+243)
(- z (* z (log t)))
(if (<= z -6.8e+109)
t_1
(if (<= z -1.9e+79) (+ t_2 x) (if (<= z 2.6e+136) t_1 (+ t_2 y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + (x + y)) + (b * (a - 0.5));
double t_2 = z * (1.0 - log(t));
double tmp;
if (z <= -2e+243) {
tmp = z - (z * log(t));
} else if (z <= -6.8e+109) {
tmp = t_1;
} else if (z <= -1.9e+79) {
tmp = t_2 + x;
} else if (z <= 2.6e+136) {
tmp = t_1;
} else {
tmp = t_2 + 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) :: t_2
real(8) :: tmp
t_1 = (z + (x + y)) + (b * (a - 0.5d0))
t_2 = z * (1.0d0 - log(t))
if (z <= (-2d+243)) then
tmp = z - (z * log(t))
else if (z <= (-6.8d+109)) then
tmp = t_1
else if (z <= (-1.9d+79)) then
tmp = t_2 + x
else if (z <= 2.6d+136) then
tmp = t_1
else
tmp = t_2 + 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 = (z + (x + y)) + (b * (a - 0.5));
double t_2 = z * (1.0 - Math.log(t));
double tmp;
if (z <= -2e+243) {
tmp = z - (z * Math.log(t));
} else if (z <= -6.8e+109) {
tmp = t_1;
} else if (z <= -1.9e+79) {
tmp = t_2 + x;
} else if (z <= 2.6e+136) {
tmp = t_1;
} else {
tmp = t_2 + y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + (x + y)) + (b * (a - 0.5)) t_2 = z * (1.0 - math.log(t)) tmp = 0 if z <= -2e+243: tmp = z - (z * math.log(t)) elif z <= -6.8e+109: tmp = t_1 elif z <= -1.9e+79: tmp = t_2 + x elif z <= 2.6e+136: tmp = t_1 else: tmp = t_2 + y return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + Float64(x + y)) + Float64(b * Float64(a - 0.5))) t_2 = Float64(z * Float64(1.0 - log(t))) tmp = 0.0 if (z <= -2e+243) tmp = Float64(z - Float64(z * log(t))); elseif (z <= -6.8e+109) tmp = t_1; elseif (z <= -1.9e+79) tmp = Float64(t_2 + x); elseif (z <= 2.6e+136) tmp = t_1; else tmp = Float64(t_2 + y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + (x + y)) + (b * (a - 0.5)); t_2 = z * (1.0 - log(t)); tmp = 0.0; if (z <= -2e+243) tmp = z - (z * log(t)); elseif (z <= -6.8e+109) tmp = t_1; elseif (z <= -1.9e+79) tmp = t_2 + x; elseif (z <= 2.6e+136) tmp = t_1; else tmp = t_2 + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2e+243], N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.8e+109], t$95$1, If[LessEqual[z, -1.9e+79], N[(t$95$2 + x), $MachinePrecision], If[LessEqual[z, 2.6e+136], t$95$1, N[(t$95$2 + y), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + \left(x + y\right)\right) + b \cdot \left(a - 0.5\right)\\
t_2 := z \cdot \left(1 - \log t\right)\\
\mathbf{if}\;z \leq -2 \cdot 10^{+243}:\\
\;\;\;\;z - z \cdot \log t\\
\mathbf{elif}\;z \leq -6.8 \cdot 10^{+109}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{+79}:\\
\;\;\;\;t_2 + x\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+136}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2 + y\\
\end{array}
\end{array}
if z < -2.0000000000000001e243Initial program 100.0%
Taylor expanded in a around 0 99.9%
Taylor expanded in b around 0 95.9%
Taylor expanded in y around 0 95.9%
Taylor expanded in x around 0 95.9%
if -2.0000000000000001e243 < z < -6.80000000000000013e109 or -1.9000000000000001e79 < z < 2.6000000000000001e136Initial program 99.9%
add-sqr-sqrt52.3%
pow252.3%
Applied egg-rr52.3%
Taylor expanded in z around 0 93.1%
associate-+r+93.1%
+-commutative93.1%
Simplified93.1%
if -6.80000000000000013e109 < z < -1.9000000000000001e79Initial program 99.4%
+-commutative99.4%
associate--l+99.4%
associate-+r+99.4%
+-commutative99.4%
*-lft-identity99.4%
metadata-eval99.4%
*-commutative99.4%
distribute-rgt-out--99.2%
metadata-eval99.2%
fma-def99.2%
sub-neg99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in b around 0 99.2%
Taylor expanded in y around 0 85.6%
if 2.6000000000000001e136 < z Initial program 99.6%
+-commutative99.6%
associate--l+99.6%
associate-+r+99.6%
+-commutative99.6%
*-lft-identity99.6%
metadata-eval99.6%
*-commutative99.6%
distribute-rgt-out--99.7%
metadata-eval99.7%
fma-def99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in b around 0 88.5%
Taylor expanded in x around 0 71.6%
Final simplification89.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ z (+ x y)) (* b (- a 0.5)))) (t_2 (* z (log t))))
(if (<= z -1.45e+243)
(- z t_2)
(if (<= z -6.8e+109)
t_1
(if (<= z -1.9e+79)
(- (+ z x) t_2)
(if (<= z 5.3e+135) t_1 (+ (* z (- 1.0 (log t))) y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + (x + y)) + (b * (a - 0.5));
double t_2 = z * log(t);
double tmp;
if (z <= -1.45e+243) {
tmp = z - t_2;
} else if (z <= -6.8e+109) {
tmp = t_1;
} else if (z <= -1.9e+79) {
tmp = (z + x) - t_2;
} else if (z <= 5.3e+135) {
tmp = t_1;
} else {
tmp = (z * (1.0 - log(t))) + 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) :: t_2
real(8) :: tmp
t_1 = (z + (x + y)) + (b * (a - 0.5d0))
t_2 = z * log(t)
if (z <= (-1.45d+243)) then
tmp = z - t_2
else if (z <= (-6.8d+109)) then
tmp = t_1
else if (z <= (-1.9d+79)) then
tmp = (z + x) - t_2
else if (z <= 5.3d+135) then
tmp = t_1
else
tmp = (z * (1.0d0 - log(t))) + 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 = (z + (x + y)) + (b * (a - 0.5));
double t_2 = z * Math.log(t);
double tmp;
if (z <= -1.45e+243) {
tmp = z - t_2;
} else if (z <= -6.8e+109) {
tmp = t_1;
} else if (z <= -1.9e+79) {
tmp = (z + x) - t_2;
} else if (z <= 5.3e+135) {
tmp = t_1;
} else {
tmp = (z * (1.0 - Math.log(t))) + y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + (x + y)) + (b * (a - 0.5)) t_2 = z * math.log(t) tmp = 0 if z <= -1.45e+243: tmp = z - t_2 elif z <= -6.8e+109: tmp = t_1 elif z <= -1.9e+79: tmp = (z + x) - t_2 elif z <= 5.3e+135: tmp = t_1 else: tmp = (z * (1.0 - math.log(t))) + y return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + Float64(x + y)) + Float64(b * Float64(a - 0.5))) t_2 = Float64(z * log(t)) tmp = 0.0 if (z <= -1.45e+243) tmp = Float64(z - t_2); elseif (z <= -6.8e+109) tmp = t_1; elseif (z <= -1.9e+79) tmp = Float64(Float64(z + x) - t_2); elseif (z <= 5.3e+135) tmp = t_1; else tmp = Float64(Float64(z * Float64(1.0 - log(t))) + y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + (x + y)) + (b * (a - 0.5)); t_2 = z * log(t); tmp = 0.0; if (z <= -1.45e+243) tmp = z - t_2; elseif (z <= -6.8e+109) tmp = t_1; elseif (z <= -1.9e+79) tmp = (z + x) - t_2; elseif (z <= 5.3e+135) tmp = t_1; else tmp = (z * (1.0 - log(t))) + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.45e+243], N[(z - t$95$2), $MachinePrecision], If[LessEqual[z, -6.8e+109], t$95$1, If[LessEqual[z, -1.9e+79], N[(N[(z + x), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[z, 5.3e+135], t$95$1, N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + \left(x + y\right)\right) + b \cdot \left(a - 0.5\right)\\
t_2 := z \cdot \log t\\
\mathbf{if}\;z \leq -1.45 \cdot 10^{+243}:\\
\;\;\;\;z - t_2\\
\mathbf{elif}\;z \leq -6.8 \cdot 10^{+109}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{+79}:\\
\;\;\;\;\left(z + x\right) - t_2\\
\mathbf{elif}\;z \leq 5.3 \cdot 10^{+135}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(1 - \log t\right) + y\\
\end{array}
\end{array}
if z < -1.45000000000000003e243Initial program 100.0%
Taylor expanded in a around 0 99.9%
Taylor expanded in b around 0 95.9%
Taylor expanded in y around 0 95.9%
Taylor expanded in x around 0 95.9%
if -1.45000000000000003e243 < z < -6.80000000000000013e109 or -1.9000000000000001e79 < z < 5.30000000000000017e135Initial program 99.9%
add-sqr-sqrt52.3%
pow252.3%
Applied egg-rr52.3%
Taylor expanded in z around 0 93.1%
associate-+r+93.1%
+-commutative93.1%
Simplified93.1%
if -6.80000000000000013e109 < z < -1.9000000000000001e79Initial program 99.4%
Taylor expanded in a around 0 99.4%
Taylor expanded in b around 0 99.4%
Taylor expanded in y around 0 85.9%
if 5.30000000000000017e135 < z Initial program 99.6%
+-commutative99.6%
associate--l+99.6%
associate-+r+99.6%
+-commutative99.6%
*-lft-identity99.6%
metadata-eval99.6%
*-commutative99.6%
distribute-rgt-out--99.7%
metadata-eval99.7%
fma-def99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in b around 0 88.5%
Taylor expanded in x around 0 71.6%
Final simplification89.5%
(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(Float64(z + 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[(N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(z + \left(x + y\right)\right) - z \cdot \log t\right) + b \cdot \left(a - 0.5\right)
\end{array}
Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.45e+243) (not (<= z 2.6e+136))) (* z (- 1.0 (log t))) (+ (+ z (+ x y)) (* b (- a 0.5)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.45e+243) || !(z <= 2.6e+136)) {
tmp = z * (1.0 - log(t));
} else {
tmp = (z + (x + y)) + (b * (a - 0.5));
}
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.45d+243)) .or. (.not. (z <= 2.6d+136))) then
tmp = z * (1.0d0 - log(t))
else
tmp = (z + (x + y)) + (b * (a - 0.5d0))
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.45e+243) || !(z <= 2.6e+136)) {
tmp = z * (1.0 - Math.log(t));
} else {
tmp = (z + (x + y)) + (b * (a - 0.5));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.45e+243) or not (z <= 2.6e+136): tmp = z * (1.0 - math.log(t)) else: tmp = (z + (x + y)) + (b * (a - 0.5)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.45e+243) || !(z <= 2.6e+136)) tmp = Float64(z * Float64(1.0 - log(t))); else tmp = Float64(Float64(z + Float64(x + y)) + Float64(b * Float64(a - 0.5))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.45e+243) || ~((z <= 2.6e+136))) tmp = z * (1.0 - log(t)); else tmp = (z + (x + y)) + (b * (a - 0.5)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.45e+243], N[Not[LessEqual[z, 2.6e+136]], $MachinePrecision]], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+243} \lor \neg \left(z \leq 2.6 \cdot 10^{+136}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z + \left(x + y\right)\right) + b \cdot \left(a - 0.5\right)\\
\end{array}
\end{array}
if z < -1.45000000000000003e243 or 2.6000000000000001e136 < z Initial program 99.7%
Taylor expanded in a around 0 99.7%
Taylor expanded in z around inf 74.0%
if -1.45000000000000003e243 < z < 2.6000000000000001e136Initial program 99.9%
add-sqr-sqrt51.4%
pow251.4%
Applied egg-rr51.4%
Taylor expanded in z around 0 90.6%
associate-+r+90.6%
+-commutative90.6%
Simplified90.6%
Final simplification86.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -5.2e+243)
(- z (* z (log t)))
(if (<= z 3.5e+136)
(+ (+ z (+ x y)) (* b (- a 0.5)))
(* z (- 1.0 (log t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -5.2e+243) {
tmp = z - (z * log(t));
} else if (z <= 3.5e+136) {
tmp = (z + (x + y)) + (b * (a - 0.5));
} else {
tmp = z * (1.0 - log(t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-5.2d+243)) then
tmp = z - (z * log(t))
else if (z <= 3.5d+136) then
tmp = (z + (x + y)) + (b * (a - 0.5d0))
else
tmp = z * (1.0d0 - log(t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -5.2e+243) {
tmp = z - (z * Math.log(t));
} else if (z <= 3.5e+136) {
tmp = (z + (x + y)) + (b * (a - 0.5));
} else {
tmp = z * (1.0 - Math.log(t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -5.2e+243: tmp = z - (z * math.log(t)) elif z <= 3.5e+136: tmp = (z + (x + y)) + (b * (a - 0.5)) else: tmp = z * (1.0 - math.log(t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -5.2e+243) tmp = Float64(z - Float64(z * log(t))); elseif (z <= 3.5e+136) tmp = Float64(Float64(z + Float64(x + y)) + Float64(b * Float64(a - 0.5))); else tmp = Float64(z * Float64(1.0 - log(t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -5.2e+243) tmp = z - (z * log(t)); elseif (z <= 3.5e+136) tmp = (z + (x + y)) + (b * (a - 0.5)); else tmp = z * (1.0 - log(t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -5.2e+243], N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.5e+136], N[(N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{+243}:\\
\;\;\;\;z - z \cdot \log t\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+136}:\\
\;\;\;\;\left(z + \left(x + y\right)\right) + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\
\end{array}
\end{array}
if z < -5.19999999999999993e243Initial program 100.0%
Taylor expanded in a around 0 99.9%
Taylor expanded in b around 0 95.9%
Taylor expanded in y around 0 95.9%
Taylor expanded in x around 0 95.9%
if -5.19999999999999993e243 < z < 3.50000000000000001e136Initial program 99.9%
add-sqr-sqrt51.4%
pow251.4%
Applied egg-rr51.4%
Taylor expanded in z around 0 90.6%
associate-+r+90.6%
+-commutative90.6%
Simplified90.6%
if 3.50000000000000001e136 < z Initial program 99.6%
Taylor expanded in a around 0 99.6%
Taylor expanded in z around inf 66.8%
Final simplification87.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -2.7e+28) (not (<= b 4.2e+98))) (+ x (* b (- a 0.5))) (+ x y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -2.7e+28) || !(b <= 4.2e+98)) {
tmp = x + (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 <= (-2.7d+28)) .or. (.not. (b <= 4.2d+98))) then
tmp = x + (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 <= -2.7e+28) || !(b <= 4.2e+98)) {
tmp = x + (b * (a - 0.5));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -2.7e+28) or not (b <= 4.2e+98): tmp = x + (b * (a - 0.5)) else: tmp = x + y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -2.7e+28) || !(b <= 4.2e+98)) tmp = Float64(x + 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 <= -2.7e+28) || ~((b <= 4.2e+98))) tmp = x + (b * (a - 0.5)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -2.7e+28], N[Not[LessEqual[b, 4.2e+98]], $MachinePrecision]], N[(x + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.7 \cdot 10^{+28} \lor \neg \left(b \leq 4.2 \cdot 10^{+98}\right):\\
\;\;\;\;x + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if b < -2.7000000000000002e28 or 4.20000000000000008e98 < 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-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around 0 93.6%
associate-+r+93.6%
sub-neg93.6%
metadata-eval93.6%
distribute-rgt-out93.6%
distribute-rgt-out93.6%
*-commutative93.6%
associate-+r+93.6%
+-commutative93.6%
fma-def93.6%
*-commutative93.6%
Simplified93.6%
Taylor expanded in z around 0 83.7%
if -2.7000000000000002e28 < b < 4.20000000000000008e98Initial program 99.8%
+-commutative99.8%
associate--l+99.8%
associate-+r+99.8%
+-commutative99.8%
*-lft-identity99.8%
metadata-eval99.8%
*-commutative99.8%
distribute-rgt-out--99.8%
metadata-eval99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in b around 0 91.7%
Taylor expanded in z around 0 57.3%
+-commutative57.3%
Simplified57.3%
Final simplification68.2%
(FPCore (x y z t a b) :precision binary64 (+ (+ z (+ x y)) (* b (- a 0.5))))
double code(double x, double y, double z, double t, double a, double b) {
return (z + (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 = (z + (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 (z + (x + y)) + (b * (a - 0.5));
}
def code(x, y, z, t, a, b): return (z + (x + y)) + (b * (a - 0.5))
function code(x, y, z, t, a, b) return Float64(Float64(z + Float64(x + y)) + Float64(b * Float64(a - 0.5))) end
function tmp = code(x, y, z, t, a, b) tmp = (z + (x + y)) + (b * (a - 0.5)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(z + \left(x + y\right)\right) + b \cdot \left(a - 0.5\right)
\end{array}
Initial program 99.9%
add-sqr-sqrt50.6%
pow250.6%
Applied egg-rr50.6%
Taylor expanded in z around 0 76.4%
associate-+r+76.4%
+-commutative76.4%
Simplified76.4%
Final simplification76.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.1e+92) (not (<= b 2.1e+99))) (* b (- a 0.5)) (+ x y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.1e+92) || !(b <= 2.1e+99)) {
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 <= (-1.1d+92)) .or. (.not. (b <= 2.1d+99))) 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 <= -1.1e+92) || !(b <= 2.1e+99)) {
tmp = b * (a - 0.5);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.1e+92) or not (b <= 2.1e+99): tmp = b * (a - 0.5) else: tmp = x + y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.1e+92) || !(b <= 2.1e+99)) 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 <= -1.1e+92) || ~((b <= 2.1e+99))) 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, -1.1e+92], N[Not[LessEqual[b, 2.1e+99]], $MachinePrecision]], N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.1 \cdot 10^{+92} \lor \neg \left(b \leq 2.1 \cdot 10^{+99}\right):\\
\;\;\;\;b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if b < -1.09999999999999996e92 or 2.1000000000000001e99 < 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-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in b around inf 73.6%
if -1.09999999999999996e92 < b < 2.1000000000000001e99Initial program 99.8%
+-commutative99.8%
associate--l+99.8%
associate-+r+99.8%
+-commutative99.8%
*-lft-identity99.8%
metadata-eval99.8%
*-commutative99.8%
distribute-rgt-out--99.8%
metadata-eval99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in b around 0 90.0%
Taylor expanded in z around 0 56.3%
+-commutative56.3%
Simplified56.3%
Final simplification62.5%
(FPCore (x y z t a b) :precision binary64 (if (<= y 9e+50) (+ x (* b (- a 0.5))) (+ x (+ y (* -0.5 b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 9e+50) {
tmp = x + (b * (a - 0.5));
} else {
tmp = x + (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 <= 9d+50) then
tmp = x + (b * (a - 0.5d0))
else
tmp = x + (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 <= 9e+50) {
tmp = x + (b * (a - 0.5));
} else {
tmp = x + (y + (-0.5 * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 9e+50: tmp = x + (b * (a - 0.5)) else: tmp = x + (y + (-0.5 * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 9e+50) tmp = Float64(x + Float64(b * Float64(a - 0.5))); else tmp = Float64(x + 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 <= 9e+50) tmp = x + (b * (a - 0.5)); else tmp = x + (y + (-0.5 * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 9e+50], N[(x + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 9 \cdot 10^{+50}:\\
\;\;\;\;x + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y + -0.5 \cdot b\right)\\
\end{array}
\end{array}
if y < 9.00000000000000027e50Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around 0 86.8%
associate-+r+86.8%
sub-neg86.8%
metadata-eval86.8%
distribute-rgt-out86.8%
distribute-rgt-out86.8%
*-commutative86.8%
associate-+r+86.8%
+-commutative86.8%
fma-def86.8%
*-commutative86.8%
Simplified86.8%
Taylor expanded in z around 0 62.0%
if 9.00000000000000027e50 < y Initial program 99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in z around 0 78.5%
Taylor expanded in a around 0 58.0%
Final simplification61.3%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5)))) (if (<= y 4.6e+43) (+ 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 <= 4.6e+43) {
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 <= 4.6d+43) 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 <= 4.6e+43) {
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 <= 4.6e+43: 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 (y <= 4.6e+43) 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 <= 4.6e+43) 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[y, 4.6e+43], 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 \leq 4.6 \cdot 10^{+43}:\\
\;\;\;\;x + t_1\\
\mathbf{else}:\\
\;\;\;\;y + t_1\\
\end{array}
\end{array}
if y < 4.6000000000000005e43Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around 0 86.8%
associate-+r+86.8%
sub-neg86.8%
metadata-eval86.8%
distribute-rgt-out86.8%
distribute-rgt-out86.8%
*-commutative86.8%
associate-+r+86.8%
+-commutative86.8%
fma-def86.8%
*-commutative86.8%
Simplified86.8%
Taylor expanded in z around 0 62.0%
if 4.6000000000000005e43 < y Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 88.1%
associate-+r+88.1%
+-commutative88.1%
sub-neg88.1%
metadata-eval88.1%
+-commutative88.1%
distribute-rgt-out88.1%
+-commutative88.1%
distribute-rgt-out88.1%
*-commutative88.1%
associate-+r+88.1%
fma-def88.1%
Simplified88.1%
Taylor expanded in z around 0 67.7%
Final simplification63.1%
(FPCore (x y z t a b) :precision binary64 (+ x (+ y (* b (- a 0.5)))))
double code(double x, double y, double z, double t, double a, double b) {
return x + (y + (b * (a - 0.5)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x + (y + (b * (a - 0.5d0)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x + (y + (b * (a - 0.5)));
}
def code(x, y, z, t, a, b): return x + (y + (b * (a - 0.5)))
function code(x, y, z, t, a, b) return Float64(x + Float64(y + Float64(b * Float64(a - 0.5)))) end
function tmp = code(x, y, z, t, a, b) tmp = x + (y + (b * (a - 0.5))); end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(y + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y + b \cdot \left(a - 0.5\right)\right)
\end{array}
Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 75.4%
Final simplification75.4%
(FPCore (x y z t a b) :precision binary64 (if (<= y 1.7e-69) x (if (<= y 5e+26) (* -0.5 b) (if (<= y 2.3e+57) x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 1.7e-69) {
tmp = x;
} else if (y <= 5e+26) {
tmp = -0.5 * b;
} else if (y <= 2.3e+57) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= 1.7d-69) then
tmp = x
else if (y <= 5d+26) then
tmp = (-0.5d0) * b
else if (y <= 2.3d+57) then
tmp = x
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 1.7e-69) {
tmp = x;
} else if (y <= 5e+26) {
tmp = -0.5 * b;
} else if (y <= 2.3e+57) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 1.7e-69: tmp = x elif y <= 5e+26: tmp = -0.5 * b elif y <= 2.3e+57: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 1.7e-69) tmp = x; elseif (y <= 5e+26) tmp = Float64(-0.5 * b); elseif (y <= 2.3e+57) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 1.7e-69) tmp = x; elseif (y <= 5e+26) tmp = -0.5 * b; elseif (y <= 2.3e+57) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 1.7e-69], x, If[LessEqual[y, 5e+26], N[(-0.5 * b), $MachinePrecision], If[LessEqual[y, 2.3e+57], x, y]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.7 \cdot 10^{-69}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 5 \cdot 10^{+26}:\\
\;\;\;\;-0.5 \cdot b\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{+57}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < 1.70000000000000004e-69 or 5.0000000000000001e26 < y < 2.2999999999999999e57Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 29.0%
if 1.70000000000000004e-69 < y < 5.0000000000000001e26Initial 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--100.0%
metadata-eval100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in b around inf 20.7%
Taylor expanded in a around 0 20.5%
*-commutative20.5%
Simplified20.5%
if 2.2999999999999999e57 < y Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 36.4%
Final simplification29.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -2.8e+94) (not (<= b 1.2e+109))) (* a b) (+ x y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -2.8e+94) || !(b <= 1.2e+109)) {
tmp = a * b;
} 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 <= (-2.8d+94)) .or. (.not. (b <= 1.2d+109))) then
tmp = a * b
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 <= -2.8e+94) || !(b <= 1.2e+109)) {
tmp = a * b;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -2.8e+94) or not (b <= 1.2e+109): tmp = a * b else: tmp = x + y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -2.8e+94) || !(b <= 1.2e+109)) tmp = Float64(a * b); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -2.8e+94) || ~((b <= 1.2e+109))) tmp = a * b; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -2.8e+94], N[Not[LessEqual[b, 1.2e+109]], $MachinePrecision]], N[(a * b), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.8 \cdot 10^{+94} \lor \neg \left(b \leq 1.2 \cdot 10^{+109}\right):\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if b < -2.79999999999999998e94 or 1.19999999999999994e109 < 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--100.0%
metadata-eval100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in a around inf 43.9%
*-commutative43.9%
Simplified43.9%
if -2.79999999999999998e94 < b < 1.19999999999999994e109Initial program 99.8%
+-commutative99.8%
associate--l+99.8%
associate-+r+99.8%
+-commutative99.8%
*-lft-identity99.8%
metadata-eval99.8%
*-commutative99.8%
distribute-rgt-out--99.8%
metadata-eval99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in b around 0 89.0%
Taylor expanded in z around 0 55.6%
+-commutative55.6%
Simplified55.6%
Final simplification51.6%
(FPCore (x y z t a b) :precision binary64 (if (<= x -1.65e+81) x (if (<= x -4.3e-279) (* a b) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.65e+81) {
tmp = x;
} else if (x <= -4.3e-279) {
tmp = a * b;
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= (-1.65d+81)) then
tmp = x
else if (x <= (-4.3d-279)) then
tmp = a * b
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.65e+81) {
tmp = x;
} else if (x <= -4.3e-279) {
tmp = a * b;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -1.65e+81: tmp = x elif x <= -4.3e-279: tmp = a * b else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -1.65e+81) tmp = x; elseif (x <= -4.3e-279) tmp = Float64(a * b); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -1.65e+81) tmp = x; elseif (x <= -4.3e-279) tmp = a * b; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1.65e+81], x, If[LessEqual[x, -4.3e-279], N[(a * b), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.65 \cdot 10^{+81}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -4.3 \cdot 10^{-279}:\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if x < -1.65e81Initial program 100.0%
+-commutative100.0%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--100.0%
metadata-eval100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf 53.4%
if -1.65e81 < x < -4.30000000000000006e-279Initial program 99.9%
+-commutative99.9%
associate--l+99.8%
associate-+r+99.8%
+-commutative99.8%
*-lft-identity99.8%
metadata-eval99.8%
*-commutative99.8%
distribute-rgt-out--99.8%
metadata-eval99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around inf 31.6%
*-commutative31.6%
Simplified31.6%
if -4.30000000000000006e-279 < x Initial program 99.8%
+-commutative99.8%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 15.4%
Final simplification27.6%
(FPCore (x y z t a b) :precision binary64 (if (<= y 1.42e+54) x y))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 1.42e+54) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= 1.42d+54) then
tmp = x
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 1.42e+54) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 1.42e+54: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 1.42e+54) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 1.42e+54) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 1.42e+54], x, y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.42 \cdot 10^{+54}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < 1.41999999999999995e54Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 30.1%
if 1.41999999999999995e54 < y Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 36.4%
Final simplification31.2%
(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-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 26.5%
Final simplification26.5%
(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 2024010
(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)))