
(FPCore (x y z t a b) :precision binary64 (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - 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 * exp(((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x * Math.exp(((y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b))));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - 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 * exp(((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x * Math.exp(((y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b))));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
\end{array}
(FPCore (x y z t a b) :precision binary64 (* x (exp (fma a (- (log1p (- z)) b) (* y (- (log z) t))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(fma(a, (log1p(-z) - b), (y * (log(z) - t))));
}
function code(x, y, z, t, a, b) return Float64(x * exp(fma(a, Float64(log1p(Float64(-z)) - b), Float64(y * Float64(log(z) - t))))) end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(a * N[(N[Log[1 + (-z)], $MachinePrecision] - b), $MachinePrecision] + N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{\mathsf{fma}\left(a, \mathsf{log1p}\left(-z\right) - b, y \cdot \left(\log z - t\right)\right)}
\end{array}
Initial program 95.8%
+-commutative95.8%
fma-def96.6%
sub-neg96.6%
log1p-def99.2%
Simplified99.2%
Final simplification99.2%
(FPCore (x y z t a b) :precision binary64 (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - 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 * exp(((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x * Math.exp(((y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b))));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
\end{array}
Initial program 95.8%
Final simplification95.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -8.4e-29) (not (<= y 2.6e-36))) (* x (pow (/ z (exp t)) y)) (* x (exp (* a (- (- z) b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -8.4e-29) || !(y <= 2.6e-36)) {
tmp = x * pow((z / exp(t)), y);
} else {
tmp = x * exp((a * (-z - 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 <= (-8.4d-29)) .or. (.not. (y <= 2.6d-36))) then
tmp = x * ((z / exp(t)) ** y)
else
tmp = x * exp((a * (-z - 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 <= -8.4e-29) || !(y <= 2.6e-36)) {
tmp = x * Math.pow((z / Math.exp(t)), y);
} else {
tmp = x * Math.exp((a * (-z - b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -8.4e-29) or not (y <= 2.6e-36): tmp = x * math.pow((z / math.exp(t)), y) else: tmp = x * math.exp((a * (-z - b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -8.4e-29) || !(y <= 2.6e-36)) tmp = Float64(x * (Float64(z / exp(t)) ^ y)); else tmp = Float64(x * exp(Float64(a * Float64(Float64(-z) - b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -8.4e-29) || ~((y <= 2.6e-36))) tmp = x * ((z / exp(t)) ^ y); else tmp = x * exp((a * (-z - b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -8.4e-29], N[Not[LessEqual[y, 2.6e-36]], $MachinePrecision]], N[(x * N[Power[N[(z / N[Exp[t], $MachinePrecision]), $MachinePrecision], y], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * N[((-z) - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.4 \cdot 10^{-29} \lor \neg \left(y \leq 2.6 \cdot 10^{-36}\right):\\
\;\;\;\;x \cdot {\left(\frac{z}{e^{t}}\right)}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\
\end{array}
\end{array}
if y < -8.39999999999999958e-29 or 2.6e-36 < y Initial program 96.4%
+-commutative96.4%
fma-def97.9%
sub-neg97.9%
log1p-def98.6%
Simplified98.6%
Taylor expanded in a around 0 88.7%
*-commutative88.7%
exp-prod89.4%
exp-diff89.4%
rem-exp-log89.4%
Simplified89.4%
if -8.39999999999999958e-29 < y < 2.6e-36Initial program 95.0%
Taylor expanded in y around 0 85.6%
sub-neg85.6%
log1p-def91.5%
Simplified91.5%
Taylor expanded in z around 0 91.5%
distribute-lft-out91.5%
mul-1-neg91.5%
+-commutative91.5%
Simplified91.5%
Final simplification90.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (exp (* a (- (- z) b))))) (t_2 (* x (exp (- (* y t))))))
(if (<= t -1e+45)
t_2
(if (<= t 6.8e-211)
t_1
(if (<= t 5.6e-12) (* x (pow z y)) (if (<= t 1.65e+42) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * exp((a * (-z - b)));
double t_2 = x * exp(-(y * t));
double tmp;
if (t <= -1e+45) {
tmp = t_2;
} else if (t <= 6.8e-211) {
tmp = t_1;
} else if (t <= 5.6e-12) {
tmp = x * pow(z, y);
} else if (t <= 1.65e+42) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * exp((a * (-z - b)))
t_2 = x * exp(-(y * t))
if (t <= (-1d+45)) then
tmp = t_2
else if (t <= 6.8d-211) then
tmp = t_1
else if (t <= 5.6d-12) then
tmp = x * (z ** y)
else if (t <= 1.65d+42) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * Math.exp((a * (-z - b)));
double t_2 = x * Math.exp(-(y * t));
double tmp;
if (t <= -1e+45) {
tmp = t_2;
} else if (t <= 6.8e-211) {
tmp = t_1;
} else if (t <= 5.6e-12) {
tmp = x * Math.pow(z, y);
} else if (t <= 1.65e+42) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.exp((a * (-z - b))) t_2 = x * math.exp(-(y * t)) tmp = 0 if t <= -1e+45: tmp = t_2 elif t <= 6.8e-211: tmp = t_1 elif t <= 5.6e-12: tmp = x * math.pow(z, y) elif t <= 1.65e+42: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * exp(Float64(a * Float64(Float64(-z) - b)))) t_2 = Float64(x * exp(Float64(-Float64(y * t)))) tmp = 0.0 if (t <= -1e+45) tmp = t_2; elseif (t <= 6.8e-211) tmp = t_1; elseif (t <= 5.6e-12) tmp = Float64(x * (z ^ y)); elseif (t <= 1.65e+42) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * exp((a * (-z - b))); t_2 = x * exp(-(y * t)); tmp = 0.0; if (t <= -1e+45) tmp = t_2; elseif (t <= 6.8e-211) tmp = t_1; elseif (t <= 5.6e-12) tmp = x * (z ^ y); elseif (t <= 1.65e+42) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[N[(a * N[((-z) - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[Exp[(-N[(y * t), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1e+45], t$95$2, If[LessEqual[t, 6.8e-211], t$95$1, If[LessEqual[t, 5.6e-12], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.65e+42], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\
t_2 := x \cdot e^{-y \cdot t}\\
\mathbf{if}\;t \leq -1 \cdot 10^{+45}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{-211}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 5.6 \cdot 10^{-12}:\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{+42}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -9.9999999999999993e44 or 1.6499999999999999e42 < t Initial program 96.5%
Taylor expanded in t around inf 86.4%
associate-*r*86.4%
mul-1-neg86.4%
*-commutative86.4%
Simplified86.4%
if -9.9999999999999993e44 < t < 6.8000000000000002e-211 or 5.6000000000000004e-12 < t < 1.6499999999999999e42Initial program 94.8%
Taylor expanded in y around 0 72.6%
sub-neg72.6%
log1p-def77.7%
Simplified77.7%
Taylor expanded in z around 0 77.7%
distribute-lft-out77.7%
mul-1-neg77.7%
+-commutative77.7%
Simplified77.7%
if 6.8000000000000002e-211 < t < 5.6000000000000004e-12Initial program 95.8%
+-commutative95.8%
fma-def95.8%
sub-neg95.8%
log1p-def100.0%
Simplified100.0%
Taylor expanded in a around 0 73.4%
*-commutative73.4%
exp-prod73.4%
exp-diff73.4%
rem-exp-log73.4%
Simplified73.4%
Taylor expanded in t around 0 73.4%
*-commutative73.4%
Simplified73.4%
Final simplification80.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -2.1e+92) (not (<= b 5.6e+41))) (/ x (exp (* a b))) (* x (exp (- (* y t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -2.1e+92) || !(b <= 5.6e+41)) {
tmp = x / exp((a * b));
} else {
tmp = x * exp(-(y * 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 ((b <= (-2.1d+92)) .or. (.not. (b <= 5.6d+41))) then
tmp = x / exp((a * b))
else
tmp = x * exp(-(y * 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 ((b <= -2.1e+92) || !(b <= 5.6e+41)) {
tmp = x / Math.exp((a * b));
} else {
tmp = x * Math.exp(-(y * t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -2.1e+92) or not (b <= 5.6e+41): tmp = x / math.exp((a * b)) else: tmp = x * math.exp(-(y * t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -2.1e+92) || !(b <= 5.6e+41)) tmp = Float64(x / exp(Float64(a * b))); else tmp = Float64(x * exp(Float64(-Float64(y * t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -2.1e+92) || ~((b <= 5.6e+41))) tmp = x / exp((a * b)); else tmp = x * exp(-(y * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -2.1e+92], N[Not[LessEqual[b, 5.6e+41]], $MachinePrecision]], N[(x / N[Exp[N[(a * b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[(-N[(y * t), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.1 \cdot 10^{+92} \lor \neg \left(b \leq 5.6 \cdot 10^{+41}\right):\\
\;\;\;\;\frac{x}{e^{a \cdot b}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{-y \cdot t}\\
\end{array}
\end{array}
if b < -2.09999999999999986e92 or 5.5999999999999999e41 < b Initial program 96.2%
Taylor expanded in b around inf 82.4%
associate-*r*82.4%
mul-1-neg82.4%
Simplified82.4%
distribute-lft-neg-out82.4%
exp-neg82.4%
exp-prod62.0%
un-div-inv62.0%
exp-prod82.4%
Applied egg-rr82.4%
if -2.09999999999999986e92 < b < 5.5999999999999999e41Initial program 95.5%
Taylor expanded in t around inf 73.6%
associate-*r*73.6%
mul-1-neg73.6%
*-commutative73.6%
Simplified73.6%
Final simplification77.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.4e+16) (not (<= y 9.2e-26))) (* x (pow z y)) (/ x (exp (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.4e+16) || !(y <= 9.2e-26)) {
tmp = x * pow(z, y);
} else {
tmp = x / exp((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 <= (-3.4d+16)) .or. (.not. (y <= 9.2d-26))) then
tmp = x * (z ** y)
else
tmp = x / exp((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 <= -3.4e+16) || !(y <= 9.2e-26)) {
tmp = x * Math.pow(z, y);
} else {
tmp = x / Math.exp((a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.4e+16) or not (y <= 9.2e-26): tmp = x * math.pow(z, y) else: tmp = x / math.exp((a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.4e+16) || !(y <= 9.2e-26)) tmp = Float64(x * (z ^ y)); else tmp = Float64(x / exp(Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3.4e+16) || ~((y <= 9.2e-26))) tmp = x * (z ^ y); else tmp = x / exp((a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.4e+16], N[Not[LessEqual[y, 9.2e-26]], $MachinePrecision]], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(x / N[Exp[N[(a * b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.4 \cdot 10^{+16} \lor \neg \left(y \leq 9.2 \cdot 10^{-26}\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{e^{a \cdot b}}\\
\end{array}
\end{array}
if y < -3.4e16 or 9.20000000000000035e-26 < y Initial program 96.1%
+-commutative96.1%
fma-def97.7%
sub-neg97.7%
log1p-def98.4%
Simplified98.4%
Taylor expanded in a around 0 89.9%
*-commutative89.9%
exp-prod89.9%
exp-diff89.9%
rem-exp-log89.9%
Simplified89.9%
Taylor expanded in t around 0 63.7%
*-commutative63.7%
Simplified63.7%
if -3.4e16 < y < 9.20000000000000035e-26Initial program 95.4%
Taylor expanded in b around inf 83.6%
associate-*r*83.6%
mul-1-neg83.6%
Simplified83.6%
distribute-lft-neg-out83.6%
exp-neg83.6%
exp-prod71.6%
un-div-inv71.6%
exp-prod83.6%
Applied egg-rr83.6%
Final simplification73.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* x (* a b)))))
(if (<= t -1.18e+83)
(+ x (/ (* x y) (/ t (- (* t t)))))
(if (<= t -0.007)
(/ (/ (* x x) b) (* t_1 (/ t_1 (* x b))))
(* x (pow z y))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (x * (a * b));
double tmp;
if (t <= -1.18e+83) {
tmp = x + ((x * y) / (t / -(t * t)));
} else if (t <= -0.007) {
tmp = ((x * x) / b) / (t_1 * (t_1 / (x * b)));
} else {
tmp = x * pow(z, 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 = x + (x * (a * b))
if (t <= (-1.18d+83)) then
tmp = x + ((x * y) / (t / -(t * t)))
else if (t <= (-0.007d0)) then
tmp = ((x * x) / b) / (t_1 * (t_1 / (x * b)))
else
tmp = x * (z ** 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 = x + (x * (a * b));
double tmp;
if (t <= -1.18e+83) {
tmp = x + ((x * y) / (t / -(t * t)));
} else if (t <= -0.007) {
tmp = ((x * x) / b) / (t_1 * (t_1 / (x * b)));
} else {
tmp = x * Math.pow(z, y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (x * (a * b)) tmp = 0 if t <= -1.18e+83: tmp = x + ((x * y) / (t / -(t * t))) elif t <= -0.007: tmp = ((x * x) / b) / (t_1 * (t_1 / (x * b))) else: tmp = x * math.pow(z, y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(x * Float64(a * b))) tmp = 0.0 if (t <= -1.18e+83) tmp = Float64(x + Float64(Float64(x * y) / Float64(t / Float64(-Float64(t * t))))); elseif (t <= -0.007) tmp = Float64(Float64(Float64(x * x) / b) / Float64(t_1 * Float64(t_1 / Float64(x * b)))); else tmp = Float64(x * (z ^ y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (x * (a * b)); tmp = 0.0; if (t <= -1.18e+83) tmp = x + ((x * y) / (t / -(t * t))); elseif (t <= -0.007) tmp = ((x * x) / b) / (t_1 * (t_1 / (x * b))); else tmp = x * (z ^ y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.18e+83], N[(x + N[(N[(x * y), $MachinePrecision] / N[(t / (-N[(t * t), $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -0.007], N[(N[(N[(x * x), $MachinePrecision] / b), $MachinePrecision] / N[(t$95$1 * N[(t$95$1 / N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + x \cdot \left(a \cdot b\right)\\
\mathbf{if}\;t \leq -1.18 \cdot 10^{+83}:\\
\;\;\;\;x + \frac{x \cdot y}{\frac{t}{-t \cdot t}}\\
\mathbf{elif}\;t \leq -0.007:\\
\;\;\;\;\frac{\frac{x \cdot x}{b}}{t_1 \cdot \frac{t_1}{x \cdot b}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot {z}^{y}\\
\end{array}
\end{array}
if t < -1.1799999999999999e83Initial program 96.1%
Taylor expanded in t around inf 83.1%
associate-*r*83.1%
mul-1-neg83.1%
*-commutative83.1%
Simplified83.1%
Taylor expanded in y around 0 40.1%
*-commutative40.1%
associate-*r*40.1%
neg-mul-140.1%
Simplified40.1%
*-commutative40.1%
neg-sub040.1%
flip--48.8%
+-lft-identity48.8%
associate-*r/47.0%
*-commutative47.0%
metadata-eval47.0%
sub0-neg47.0%
Applied egg-rr47.0%
associate-/l*48.8%
distribute-rgt-neg-in48.8%
Simplified48.8%
if -1.1799999999999999e83 < t < -0.00700000000000000015Initial program 100.0%
Taylor expanded in b around inf 63.0%
associate-*r*63.0%
mul-1-neg63.0%
Simplified63.0%
Taylor expanded in a around 0 10.3%
associate-*r*10.3%
neg-mul-110.3%
*-commutative10.3%
Simplified10.3%
flip-+9.7%
div-sub9.7%
associate-*r*9.7%
associate-/l*9.7%
frac-sub9.4%
Applied egg-rr9.4%
Taylor expanded in a around 0 47.6%
unpow247.6%
Simplified47.6%
if -0.00700000000000000015 < t Initial program 95.4%
+-commutative95.4%
fma-def95.9%
sub-neg95.9%
log1p-def99.5%
Simplified99.5%
Taylor expanded in a around 0 73.6%
*-commutative73.6%
exp-prod70.1%
exp-diff70.1%
rem-exp-log70.1%
Simplified70.1%
Taylor expanded in t around 0 64.0%
*-commutative64.0%
Simplified64.0%
Final simplification60.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* x (* a b)))))
(if (<= y -5.6e+102)
(/ (/ (* x x) b) (* t_1 (/ t_1 (* x b))))
(if (<= y 1.75e-19)
(* x (+ (- 1.0 (* a b)) (* (* 0.5 (* a a)) (* b b))))
(if (<= y 6.4e+251)
(* 0.5 (* (* a a) (* b (* x b))))
(+ x (/ (* x y) (/ t (- (* t t))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (x * (a * b));
double tmp;
if (y <= -5.6e+102) {
tmp = ((x * x) / b) / (t_1 * (t_1 / (x * b)));
} else if (y <= 1.75e-19) {
tmp = x * ((1.0 - (a * b)) + ((0.5 * (a * a)) * (b * b)));
} else if (y <= 6.4e+251) {
tmp = 0.5 * ((a * a) * (b * (x * b)));
} else {
tmp = x + ((x * y) / (t / -(t * 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 + (x * (a * b))
if (y <= (-5.6d+102)) then
tmp = ((x * x) / b) / (t_1 * (t_1 / (x * b)))
else if (y <= 1.75d-19) then
tmp = x * ((1.0d0 - (a * b)) + ((0.5d0 * (a * a)) * (b * b)))
else if (y <= 6.4d+251) then
tmp = 0.5d0 * ((a * a) * (b * (x * b)))
else
tmp = x + ((x * y) / (t / -(t * 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 + (x * (a * b));
double tmp;
if (y <= -5.6e+102) {
tmp = ((x * x) / b) / (t_1 * (t_1 / (x * b)));
} else if (y <= 1.75e-19) {
tmp = x * ((1.0 - (a * b)) + ((0.5 * (a * a)) * (b * b)));
} else if (y <= 6.4e+251) {
tmp = 0.5 * ((a * a) * (b * (x * b)));
} else {
tmp = x + ((x * y) / (t / -(t * t)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (x * (a * b)) tmp = 0 if y <= -5.6e+102: tmp = ((x * x) / b) / (t_1 * (t_1 / (x * b))) elif y <= 1.75e-19: tmp = x * ((1.0 - (a * b)) + ((0.5 * (a * a)) * (b * b))) elif y <= 6.4e+251: tmp = 0.5 * ((a * a) * (b * (x * b))) else: tmp = x + ((x * y) / (t / -(t * t))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(x * Float64(a * b))) tmp = 0.0 if (y <= -5.6e+102) tmp = Float64(Float64(Float64(x * x) / b) / Float64(t_1 * Float64(t_1 / Float64(x * b)))); elseif (y <= 1.75e-19) tmp = Float64(x * Float64(Float64(1.0 - Float64(a * b)) + Float64(Float64(0.5 * Float64(a * a)) * Float64(b * b)))); elseif (y <= 6.4e+251) tmp = Float64(0.5 * Float64(Float64(a * a) * Float64(b * Float64(x * b)))); else tmp = Float64(x + Float64(Float64(x * y) / Float64(t / Float64(-Float64(t * t))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (x * (a * b)); tmp = 0.0; if (y <= -5.6e+102) tmp = ((x * x) / b) / (t_1 * (t_1 / (x * b))); elseif (y <= 1.75e-19) tmp = x * ((1.0 - (a * b)) + ((0.5 * (a * a)) * (b * b))); elseif (y <= 6.4e+251) tmp = 0.5 * ((a * a) * (b * (x * b))); else tmp = x + ((x * y) / (t / -(t * t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.6e+102], N[(N[(N[(x * x), $MachinePrecision] / b), $MachinePrecision] / N[(t$95$1 * N[(t$95$1 / N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.75e-19], N[(x * N[(N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(N[(0.5 * N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.4e+251], N[(0.5 * N[(N[(a * a), $MachinePrecision] * N[(b * N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(x * y), $MachinePrecision] / N[(t / (-N[(t * t), $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + x \cdot \left(a \cdot b\right)\\
\mathbf{if}\;y \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;\frac{\frac{x \cdot x}{b}}{t_1 \cdot \frac{t_1}{x \cdot b}}\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{-19}:\\
\;\;\;\;x \cdot \left(\left(1 - a \cdot b\right) + \left(0.5 \cdot \left(a \cdot a\right)\right) \cdot \left(b \cdot b\right)\right)\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{+251}:\\
\;\;\;\;0.5 \cdot \left(\left(a \cdot a\right) \cdot \left(b \cdot \left(x \cdot b\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{x \cdot y}{\frac{t}{-t \cdot t}}\\
\end{array}
\end{array}
if y < -5.60000000000000037e102Initial program 95.8%
Taylor expanded in b around inf 43.5%
associate-*r*43.5%
mul-1-neg43.5%
Simplified43.5%
Taylor expanded in a around 0 13.0%
associate-*r*13.0%
neg-mul-113.0%
*-commutative13.0%
Simplified13.0%
flip-+16.2%
div-sub16.2%
associate-*r*16.2%
associate-/l*14.3%
frac-sub11.5%
Applied egg-rr11.5%
Taylor expanded in a around 0 34.5%
unpow234.5%
Simplified34.5%
if -5.60000000000000037e102 < y < 1.75000000000000008e-19Initial program 95.9%
Taylor expanded in b around inf 77.9%
associate-*r*77.9%
mul-1-neg77.9%
Simplified77.9%
distribute-lft-neg-out77.9%
exp-neg77.9%
exp-prod67.1%
un-div-inv67.1%
exp-prod77.9%
Applied egg-rr77.9%
Taylor expanded in b around 0 34.6%
associate-+r+34.6%
mul-1-neg34.6%
associate-*r*35.8%
*-commutative35.8%
sub-neg35.8%
associate-*r*35.8%
mul-1-neg35.8%
*-commutative35.8%
distribute-rgt-out47.7%
*-commutative47.7%
unpow247.7%
metadata-eval47.7%
unpow247.7%
Simplified47.7%
Taylor expanded in x around -inf 51.8%
mul-1-neg51.8%
associate-+r+51.8%
sub-neg51.8%
associate-*r*51.8%
unpow251.8%
unpow251.8%
Simplified51.8%
if 1.75000000000000008e-19 < y < 6.3999999999999995e251Initial program 94.3%
Taylor expanded in b around inf 44.3%
associate-*r*44.3%
mul-1-neg44.3%
Simplified44.3%
distribute-lft-neg-out44.3%
exp-neg44.3%
exp-prod34.7%
un-div-inv34.7%
exp-prod44.3%
Applied egg-rr44.3%
Taylor expanded in b around 0 11.0%
associate-+r+11.0%
mul-1-neg11.0%
associate-*r*9.4%
*-commutative9.4%
sub-neg9.4%
associate-*r*9.4%
mul-1-neg9.4%
*-commutative9.4%
distribute-rgt-out19.2%
*-commutative19.2%
unpow219.2%
metadata-eval19.2%
unpow219.2%
Simplified19.2%
Taylor expanded in a around inf 43.2%
*-commutative43.2%
unpow243.2%
*-commutative43.2%
unpow243.2%
associate-*l*43.3%
*-commutative43.3%
*-commutative43.3%
Simplified43.3%
if 6.3999999999999995e251 < y Initial program 100.0%
Taylor expanded in t around inf 83.6%
associate-*r*83.6%
mul-1-neg83.6%
*-commutative83.6%
Simplified83.6%
Taylor expanded in y around 0 43.8%
*-commutative43.8%
associate-*r*43.8%
neg-mul-143.8%
Simplified43.8%
*-commutative43.8%
neg-sub043.8%
flip--51.6%
+-lft-identity51.6%
associate-*r/51.6%
*-commutative51.6%
metadata-eval51.6%
sub0-neg51.6%
Applied egg-rr51.6%
associate-/l*51.6%
distribute-rgt-neg-in51.6%
Simplified51.6%
Final simplification46.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -6.5e+108) (not (<= t 1.05e+132))) (+ x (/ (* x y) (/ t (- (* t t))))) (* x (+ (- 1.0 (* a b)) (* (* 0.5 (* a a)) (* b b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -6.5e+108) || !(t <= 1.05e+132)) {
tmp = x + ((x * y) / (t / -(t * t)));
} else {
tmp = x * ((1.0 - (a * b)) + ((0.5 * (a * a)) * (b * 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 ((t <= (-6.5d+108)) .or. (.not. (t <= 1.05d+132))) then
tmp = x + ((x * y) / (t / -(t * t)))
else
tmp = x * ((1.0d0 - (a * b)) + ((0.5d0 * (a * a)) * (b * 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 ((t <= -6.5e+108) || !(t <= 1.05e+132)) {
tmp = x + ((x * y) / (t / -(t * t)));
} else {
tmp = x * ((1.0 - (a * b)) + ((0.5 * (a * a)) * (b * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -6.5e+108) or not (t <= 1.05e+132): tmp = x + ((x * y) / (t / -(t * t))) else: tmp = x * ((1.0 - (a * b)) + ((0.5 * (a * a)) * (b * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -6.5e+108) || !(t <= 1.05e+132)) tmp = Float64(x + Float64(Float64(x * y) / Float64(t / Float64(-Float64(t * t))))); else tmp = Float64(x * Float64(Float64(1.0 - Float64(a * b)) + Float64(Float64(0.5 * Float64(a * a)) * Float64(b * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -6.5e+108) || ~((t <= 1.05e+132))) tmp = x + ((x * y) / (t / -(t * t))); else tmp = x * ((1.0 - (a * b)) + ((0.5 * (a * a)) * (b * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -6.5e+108], N[Not[LessEqual[t, 1.05e+132]], $MachinePrecision]], N[(x + N[(N[(x * y), $MachinePrecision] / N[(t / (-N[(t * t), $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(N[(0.5 * N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{+108} \lor \neg \left(t \leq 1.05 \cdot 10^{+132}\right):\\
\;\;\;\;x + \frac{x \cdot y}{\frac{t}{-t \cdot t}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\left(1 - a \cdot b\right) + \left(0.5 \cdot \left(a \cdot a\right)\right) \cdot \left(b \cdot b\right)\right)\\
\end{array}
\end{array}
if t < -6.4999999999999996e108 or 1.04999999999999997e132 < t Initial program 95.5%
Taylor expanded in t around inf 84.8%
associate-*r*84.8%
mul-1-neg84.8%
*-commutative84.8%
Simplified84.8%
Taylor expanded in y around 0 37.3%
*-commutative37.3%
associate-*r*37.3%
neg-mul-137.3%
Simplified37.3%
*-commutative37.3%
neg-sub037.3%
flip--46.2%
+-lft-identity46.2%
associate-*r/45.2%
*-commutative45.2%
metadata-eval45.2%
sub0-neg45.2%
Applied egg-rr45.2%
associate-/l*46.2%
distribute-rgt-neg-in46.2%
Simplified46.2%
if -6.4999999999999996e108 < t < 1.04999999999999997e132Initial program 95.9%
Taylor expanded in b around inf 68.2%
associate-*r*68.2%
mul-1-neg68.2%
Simplified68.2%
distribute-lft-neg-out68.2%
exp-neg68.2%
exp-prod58.2%
un-div-inv58.2%
exp-prod68.2%
Applied egg-rr68.2%
Taylor expanded in b around 0 27.4%
associate-+r+27.4%
mul-1-neg27.4%
associate-*r*28.0%
*-commutative28.0%
sub-neg28.0%
associate-*r*28.0%
mul-1-neg28.0%
*-commutative28.0%
distribute-rgt-out40.1%
*-commutative40.1%
unpow240.1%
metadata-eval40.1%
unpow240.1%
Simplified40.1%
Taylor expanded in x around -inf 43.1%
mul-1-neg43.1%
associate-+r+43.1%
sub-neg43.1%
associate-*r*43.1%
unpow243.1%
unpow243.1%
Simplified43.1%
Final simplification44.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.42e+19) (not (<= a 7.6e+124))) (* 0.5 (* (* a a) (* b (* x b)))) (+ x (/ (* x y) (/ t (- (* t t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.42e+19) || !(a <= 7.6e+124)) {
tmp = 0.5 * ((a * a) * (b * (x * b)));
} else {
tmp = x + ((x * y) / (t / -(t * 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 ((a <= (-1.42d+19)) .or. (.not. (a <= 7.6d+124))) then
tmp = 0.5d0 * ((a * a) * (b * (x * b)))
else
tmp = x + ((x * y) / (t / -(t * 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 ((a <= -1.42e+19) || !(a <= 7.6e+124)) {
tmp = 0.5 * ((a * a) * (b * (x * b)));
} else {
tmp = x + ((x * y) / (t / -(t * t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.42e+19) or not (a <= 7.6e+124): tmp = 0.5 * ((a * a) * (b * (x * b))) else: tmp = x + ((x * y) / (t / -(t * t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.42e+19) || !(a <= 7.6e+124)) tmp = Float64(0.5 * Float64(Float64(a * a) * Float64(b * Float64(x * b)))); else tmp = Float64(x + Float64(Float64(x * y) / Float64(t / Float64(-Float64(t * t))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -1.42e+19) || ~((a <= 7.6e+124))) tmp = 0.5 * ((a * a) * (b * (x * b))); else tmp = x + ((x * y) / (t / -(t * t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.42e+19], N[Not[LessEqual[a, 7.6e+124]], $MachinePrecision]], N[(0.5 * N[(N[(a * a), $MachinePrecision] * N[(b * N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(x * y), $MachinePrecision] / N[(t / (-N[(t * t), $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.42 \cdot 10^{+19} \lor \neg \left(a \leq 7.6 \cdot 10^{+124}\right):\\
\;\;\;\;0.5 \cdot \left(\left(a \cdot a\right) \cdot \left(b \cdot \left(x \cdot b\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{x \cdot y}{\frac{t}{-t \cdot t}}\\
\end{array}
\end{array}
if a < -1.42e19 or 7.5999999999999997e124 < a Initial program 90.4%
Taylor expanded in b around inf 71.4%
associate-*r*71.4%
mul-1-neg71.4%
Simplified71.4%
distribute-lft-neg-out71.4%
exp-neg71.4%
exp-prod73.0%
un-div-inv73.0%
exp-prod71.4%
Applied egg-rr71.4%
Taylor expanded in b around 0 6.6%
associate-+r+6.6%
mul-1-neg6.6%
associate-*r*6.6%
*-commutative6.6%
sub-neg6.6%
associate-*r*6.6%
mul-1-neg6.6%
*-commutative6.6%
distribute-rgt-out36.3%
*-commutative36.3%
unpow236.3%
metadata-eval36.3%
unpow236.3%
Simplified36.3%
Taylor expanded in a around inf 40.2%
*-commutative40.2%
unpow240.2%
*-commutative40.2%
unpow240.2%
associate-*l*40.2%
*-commutative40.2%
*-commutative40.2%
Simplified40.2%
if -1.42e19 < a < 7.5999999999999997e124Initial program 99.3%
Taylor expanded in t around inf 70.7%
associate-*r*70.7%
mul-1-neg70.7%
*-commutative70.7%
Simplified70.7%
Taylor expanded in y around 0 43.0%
*-commutative43.0%
associate-*r*43.0%
neg-mul-143.0%
Simplified43.0%
*-commutative43.0%
neg-sub043.0%
flip--45.9%
+-lft-identity45.9%
associate-*r/45.9%
*-commutative45.9%
metadata-eval45.9%
sub0-neg45.9%
Applied egg-rr45.9%
associate-/l*45.9%
distribute-rgt-neg-in45.9%
Simplified45.9%
Final simplification43.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.22e-58) (not (<= a 8.5e-76))) (* 0.5 (* (* a a) (* b (* x b)))) (- x (* x (* y t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.22e-58) || !(a <= 8.5e-76)) {
tmp = 0.5 * ((a * a) * (b * (x * b)));
} else {
tmp = x - (x * (y * 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 ((a <= (-1.22d-58)) .or. (.not. (a <= 8.5d-76))) then
tmp = 0.5d0 * ((a * a) * (b * (x * b)))
else
tmp = x - (x * (y * 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 ((a <= -1.22e-58) || !(a <= 8.5e-76)) {
tmp = 0.5 * ((a * a) * (b * (x * b)));
} else {
tmp = x - (x * (y * t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.22e-58) or not (a <= 8.5e-76): tmp = 0.5 * ((a * a) * (b * (x * b))) else: tmp = x - (x * (y * t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.22e-58) || !(a <= 8.5e-76)) tmp = Float64(0.5 * Float64(Float64(a * a) * Float64(b * Float64(x * b)))); else tmp = Float64(x - Float64(x * Float64(y * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -1.22e-58) || ~((a <= 8.5e-76))) tmp = 0.5 * ((a * a) * (b * (x * b))); else tmp = x - (x * (y * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.22e-58], N[Not[LessEqual[a, 8.5e-76]], $MachinePrecision]], N[(0.5 * N[(N[(a * a), $MachinePrecision] * N[(b * N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(x * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.22 \cdot 10^{-58} \lor \neg \left(a \leq 8.5 \cdot 10^{-76}\right):\\
\;\;\;\;0.5 \cdot \left(\left(a \cdot a\right) \cdot \left(b \cdot \left(x \cdot b\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x - x \cdot \left(y \cdot t\right)\\
\end{array}
\end{array}
if a < -1.2199999999999999e-58 or 8.50000000000000038e-76 < a Initial program 93.1%
Taylor expanded in b around inf 67.0%
associate-*r*67.0%
mul-1-neg67.0%
Simplified67.0%
distribute-lft-neg-out67.0%
exp-neg67.0%
exp-prod63.7%
un-div-inv63.7%
exp-prod67.0%
Applied egg-rr67.0%
Taylor expanded in b around 0 12.1%
associate-+r+12.1%
mul-1-neg12.1%
associate-*r*12.6%
*-commutative12.6%
sub-neg12.6%
associate-*r*12.7%
mul-1-neg12.7%
*-commutative12.7%
distribute-rgt-out32.0%
*-commutative32.0%
unpow232.0%
metadata-eval32.0%
unpow232.0%
Simplified32.0%
Taylor expanded in a around inf 34.8%
*-commutative34.8%
unpow234.8%
*-commutative34.8%
unpow234.8%
associate-*l*34.8%
*-commutative34.8%
*-commutative34.8%
Simplified34.8%
if -1.2199999999999999e-58 < a < 8.50000000000000038e-76Initial program 100.0%
Taylor expanded in t around inf 78.2%
associate-*r*78.2%
mul-1-neg78.2%
*-commutative78.2%
Simplified78.2%
Taylor expanded in y around 0 53.1%
*-commutative53.1%
associate-*r*53.1%
neg-mul-153.1%
Simplified53.1%
distribute-lft-neg-out53.1%
neg-sub053.1%
cancel-sign-sub-inv53.1%
associate-*r*54.1%
*-commutative54.1%
distribute-lft-neg-out54.1%
distribute-rgt-neg-in54.1%
Applied egg-rr54.1%
+-lft-identity54.1%
distribute-rgt-neg-out54.1%
Simplified54.1%
Final simplification42.4%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.85e-246) (- x (* y (* x t))) (if (<= y 1.4e-19) (- x (* x (* a b))) (* a (* x (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.85e-246) {
tmp = x - (y * (x * t));
} else if (y <= 1.4e-19) {
tmp = x - (x * (a * b));
} else {
tmp = a * (x * -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 <= (-1.85d-246)) then
tmp = x - (y * (x * t))
else if (y <= 1.4d-19) then
tmp = x - (x * (a * b))
else
tmp = a * (x * -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 <= -1.85e-246) {
tmp = x - (y * (x * t));
} else if (y <= 1.4e-19) {
tmp = x - (x * (a * b));
} else {
tmp = a * (x * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.85e-246: tmp = x - (y * (x * t)) elif y <= 1.4e-19: tmp = x - (x * (a * b)) else: tmp = a * (x * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.85e-246) tmp = Float64(x - Float64(y * Float64(x * t))); elseif (y <= 1.4e-19) tmp = Float64(x - Float64(x * Float64(a * b))); else tmp = Float64(a * Float64(x * Float64(-b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.85e-246) tmp = x - (y * (x * t)); elseif (y <= 1.4e-19) tmp = x - (x * (a * b)); else tmp = a * (x * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.85e-246], N[(x - N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.4e-19], N[(x - N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{-246}:\\
\;\;\;\;x - y \cdot \left(x \cdot t\right)\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{-19}:\\
\;\;\;\;x - x \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if y < -1.85e-246Initial program 95.8%
Taylor expanded in t around inf 64.0%
associate-*r*64.0%
mul-1-neg64.0%
*-commutative64.0%
Simplified64.0%
Taylor expanded in y around 0 30.8%
*-commutative30.8%
associate-*r*30.8%
neg-mul-130.8%
Simplified30.8%
distribute-lft-neg-out30.8%
*-commutative30.8%
associate-*l*31.0%
Applied egg-rr31.0%
if -1.85e-246 < y < 1.40000000000000001e-19Initial program 96.1%
Taylor expanded in b around inf 90.5%
associate-*r*90.5%
mul-1-neg90.5%
Simplified90.5%
Taylor expanded in a around 0 48.5%
associate-*r*48.5%
neg-mul-148.5%
*-commutative48.5%
Simplified48.5%
cancel-sign-sub-inv48.5%
*-commutative48.5%
associate-*r*54.5%
*-commutative54.5%
Applied egg-rr54.5%
if 1.40000000000000001e-19 < y Initial program 95.4%
Taylor expanded in b around inf 42.7%
associate-*r*42.7%
mul-1-neg42.7%
Simplified42.7%
Taylor expanded in a around 0 13.7%
associate-*r*13.7%
neg-mul-113.7%
*-commutative13.7%
Simplified13.7%
cancel-sign-sub-inv13.7%
*-commutative13.7%
associate-*r*12.3%
*-commutative12.3%
Applied egg-rr12.3%
Taylor expanded in a around inf 27.2%
Final simplification36.9%
(FPCore (x y z t a b) :precision binary64 (if (<= a -2.85e+125) (- x (* x (* a b))) (if (<= a 8e+129) (- x (* x (* y t))) (* a (* x (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -2.85e+125) {
tmp = x - (x * (a * b));
} else if (a <= 8e+129) {
tmp = x - (x * (y * t));
} else {
tmp = a * (x * -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 <= (-2.85d+125)) then
tmp = x - (x * (a * b))
else if (a <= 8d+129) then
tmp = x - (x * (y * t))
else
tmp = a * (x * -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 <= -2.85e+125) {
tmp = x - (x * (a * b));
} else if (a <= 8e+129) {
tmp = x - (x * (y * t));
} else {
tmp = a * (x * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -2.85e+125: tmp = x - (x * (a * b)) elif a <= 8e+129: tmp = x - (x * (y * t)) else: tmp = a * (x * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -2.85e+125) tmp = Float64(x - Float64(x * Float64(a * b))); elseif (a <= 8e+129) tmp = Float64(x - Float64(x * Float64(y * t))); else tmp = Float64(a * Float64(x * Float64(-b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -2.85e+125) tmp = x - (x * (a * b)); elseif (a <= 8e+129) tmp = x - (x * (y * t)); else tmp = a * (x * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -2.85e+125], N[(x - N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8e+129], N[(x - N[(x * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.85 \cdot 10^{+125}:\\
\;\;\;\;x - x \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;a \leq 8 \cdot 10^{+129}:\\
\;\;\;\;x - x \cdot \left(y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if a < -2.8499999999999998e125Initial program 90.6%
Taylor expanded in b around inf 74.4%
associate-*r*74.4%
mul-1-neg74.4%
Simplified74.4%
Taylor expanded in a around 0 19.1%
associate-*r*19.1%
neg-mul-119.1%
*-commutative19.1%
Simplified19.1%
cancel-sign-sub-inv19.1%
*-commutative19.1%
associate-*r*23.6%
*-commutative23.6%
Applied egg-rr23.6%
if -2.8499999999999998e125 < a < 8e129Initial program 98.9%
Taylor expanded in t around inf 70.3%
associate-*r*70.3%
mul-1-neg70.3%
*-commutative70.3%
Simplified70.3%
Taylor expanded in y around 0 39.9%
*-commutative39.9%
associate-*r*39.9%
neg-mul-139.9%
Simplified39.9%
distribute-lft-neg-out39.9%
neg-sub039.9%
cancel-sign-sub-inv39.9%
associate-*r*41.0%
*-commutative41.0%
distribute-lft-neg-out41.0%
distribute-rgt-neg-in41.0%
Applied egg-rr41.0%
+-lft-identity41.0%
distribute-rgt-neg-out41.0%
Simplified41.0%
if 8e129 < a Initial program 86.5%
Taylor expanded in b around inf 75.6%
associate-*r*75.6%
mul-1-neg75.6%
Simplified75.6%
Taylor expanded in a around 0 25.4%
associate-*r*25.4%
neg-mul-125.4%
*-commutative25.4%
Simplified25.4%
cancel-sign-sub-inv25.4%
*-commutative25.4%
associate-*r*32.5%
*-commutative32.5%
Applied egg-rr32.5%
Taylor expanded in a around inf 35.5%
Final simplification37.4%
(FPCore (x y z t a b) :precision binary64 (if (<= y -3e+104) (- x (* t (* x y))) (if (<= y 1.75e-19) (- x (* x (* a b))) (* a (* x (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3e+104) {
tmp = x - (t * (x * y));
} else if (y <= 1.75e-19) {
tmp = x - (x * (a * b));
} else {
tmp = a * (x * -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 <= (-3d+104)) then
tmp = x - (t * (x * y))
else if (y <= 1.75d-19) then
tmp = x - (x * (a * b))
else
tmp = a * (x * -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 <= -3e+104) {
tmp = x - (t * (x * y));
} else if (y <= 1.75e-19) {
tmp = x - (x * (a * b));
} else {
tmp = a * (x * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -3e+104: tmp = x - (t * (x * y)) elif y <= 1.75e-19: tmp = x - (x * (a * b)) else: tmp = a * (x * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -3e+104) tmp = Float64(x - Float64(t * Float64(x * y))); elseif (y <= 1.75e-19) tmp = Float64(x - Float64(x * Float64(a * b))); else tmp = Float64(a * Float64(x * Float64(-b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -3e+104) tmp = x - (t * (x * y)); elseif (y <= 1.75e-19) tmp = x - (x * (a * b)); else tmp = a * (x * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -3e+104], N[(x - N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.75e-19], N[(x - N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3 \cdot 10^{+104}:\\
\;\;\;\;x - t \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{-19}:\\
\;\;\;\;x - x \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if y < -2.99999999999999969e104Initial program 95.7%
Taylor expanded in t around inf 67.0%
associate-*r*67.0%
mul-1-neg67.0%
*-commutative67.0%
Simplified67.0%
Taylor expanded in y around 0 27.4%
*-commutative27.4%
associate-*r*27.4%
neg-mul-127.4%
Simplified27.4%
if -2.99999999999999969e104 < y < 1.75000000000000008e-19Initial program 95.9%
Taylor expanded in b around inf 77.4%
associate-*r*77.4%
mul-1-neg77.4%
Simplified77.4%
Taylor expanded in a around 0 40.3%
associate-*r*40.3%
neg-mul-140.3%
*-commutative40.3%
Simplified40.3%
cancel-sign-sub-inv40.3%
*-commutative40.3%
associate-*r*45.3%
*-commutative45.3%
Applied egg-rr45.3%
if 1.75000000000000008e-19 < y Initial program 95.4%
Taylor expanded in b around inf 42.7%
associate-*r*42.7%
mul-1-neg42.7%
Simplified42.7%
Taylor expanded in a around 0 13.7%
associate-*r*13.7%
neg-mul-113.7%
*-commutative13.7%
Simplified13.7%
cancel-sign-sub-inv13.7%
*-commutative13.7%
associate-*r*12.3%
*-commutative12.3%
Applied egg-rr12.3%
Taylor expanded in a around inf 27.2%
Final simplification37.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.9e+88) (not (<= y 2.6e-74))) (* b (* x (- a))) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.9e+88) || !(y <= 2.6e-74)) {
tmp = b * (x * -a);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.9d+88)) .or. (.not. (y <= 2.6d-74))) then
tmp = b * (x * -a)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.9e+88) || !(y <= 2.6e-74)) {
tmp = b * (x * -a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.9e+88) or not (y <= 2.6e-74): tmp = b * (x * -a) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.9e+88) || !(y <= 2.6e-74)) tmp = Float64(b * Float64(x * Float64(-a))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.9e+88) || ~((y <= 2.6e-74))) tmp = b * (x * -a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.9e+88], N[Not[LessEqual[y, 2.6e-74]], $MachinePrecision]], N[(b * N[(x * (-a)), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{+88} \lor \neg \left(y \leq 2.6 \cdot 10^{-74}\right):\\
\;\;\;\;b \cdot \left(x \cdot \left(-a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.8999999999999998e88 or 2.6000000000000001e-74 < y Initial program 96.2%
Taylor expanded in b around inf 49.8%
associate-*r*49.8%
mul-1-neg49.8%
Simplified49.8%
Taylor expanded in a around 0 18.7%
associate-*r*18.7%
neg-mul-118.7%
*-commutative18.7%
Simplified18.7%
cancel-sign-sub-inv18.7%
*-commutative18.7%
associate-*r*18.7%
*-commutative18.7%
Applied egg-rr18.7%
Taylor expanded in a around inf 22.7%
*-commutative22.7%
associate-*r*22.7%
metadata-eval22.7%
*-inverses22.7%
distribute-frac-neg22.7%
associate-/r/22.7%
associate-*r*21.2%
*-commutative21.2%
*-commutative21.2%
associate-/r/21.2%
distribute-frac-neg21.2%
*-inverses21.2%
metadata-eval21.2%
neg-mul-121.2%
Simplified21.2%
if -1.8999999999999998e88 < y < 2.6000000000000001e-74Initial program 95.3%
+-commutative95.3%
fma-def95.3%
sub-neg95.3%
log1p-def100.0%
Simplified100.0%
Taylor expanded in a around 0 65.9%
*-commutative65.9%
exp-prod57.6%
exp-diff57.6%
rem-exp-log57.6%
Simplified57.6%
Taylor expanded in y around 0 36.9%
Final simplification28.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.5e+87) (not (<= y 2.6e-75))) (* a (* x (- b))) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.5e+87) || !(y <= 2.6e-75)) {
tmp = a * (x * -b);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.5d+87)) .or. (.not. (y <= 2.6d-75))) then
tmp = a * (x * -b)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.5e+87) || !(y <= 2.6e-75)) {
tmp = a * (x * -b);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.5e+87) or not (y <= 2.6e-75): tmp = a * (x * -b) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.5e+87) || !(y <= 2.6e-75)) tmp = Float64(a * Float64(x * Float64(-b))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.5e+87) || ~((y <= 2.6e-75))) tmp = a * (x * -b); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.5e+87], N[Not[LessEqual[y, 2.6e-75]], $MachinePrecision]], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{+87} \lor \neg \left(y \leq 2.6 \cdot 10^{-75}\right):\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.4999999999999999e87 or 2.6e-75 < y Initial program 96.2%
Taylor expanded in b around inf 49.8%
associate-*r*49.8%
mul-1-neg49.8%
Simplified49.8%
Taylor expanded in a around 0 18.7%
associate-*r*18.7%
neg-mul-118.7%
*-commutative18.7%
Simplified18.7%
cancel-sign-sub-inv18.7%
*-commutative18.7%
associate-*r*18.7%
*-commutative18.7%
Applied egg-rr18.7%
Taylor expanded in a around inf 22.7%
if -1.4999999999999999e87 < y < 2.6e-75Initial program 95.3%
+-commutative95.3%
fma-def95.3%
sub-neg95.3%
log1p-def100.0%
Simplified100.0%
Taylor expanded in a around 0 65.9%
*-commutative65.9%
exp-prod57.6%
exp-diff57.6%
rem-exp-log57.6%
Simplified57.6%
Taylor expanded in y around 0 36.9%
Final simplification29.6%
(FPCore (x y z t a b) :precision binary64 (if (<= y 1.55e-19) (- x (* x (* a b))) (* a (* x (- b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 1.55e-19) {
tmp = x - (x * (a * b));
} else {
tmp = a * (x * -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 <= 1.55d-19) then
tmp = x - (x * (a * b))
else
tmp = a * (x * -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 <= 1.55e-19) {
tmp = x - (x * (a * b));
} else {
tmp = a * (x * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 1.55e-19: tmp = x - (x * (a * b)) else: tmp = a * (x * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 1.55e-19) tmp = Float64(x - Float64(x * Float64(a * b))); else tmp = Float64(a * Float64(x * Float64(-b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 1.55e-19) tmp = x - (x * (a * b)); else tmp = a * (x * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 1.55e-19], N[(x - N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.55 \cdot 10^{-19}:\\
\;\;\;\;x - x \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if y < 1.5499999999999999e-19Initial program 95.9%
Taylor expanded in b around inf 69.3%
associate-*r*69.3%
mul-1-neg69.3%
Simplified69.3%
Taylor expanded in a around 0 33.7%
associate-*r*33.7%
neg-mul-133.7%
*-commutative33.7%
Simplified33.7%
cancel-sign-sub-inv33.7%
*-commutative33.7%
associate-*r*37.0%
*-commutative37.0%
Applied egg-rr37.0%
if 1.5499999999999999e-19 < y Initial program 95.4%
Taylor expanded in b around inf 42.7%
associate-*r*42.7%
mul-1-neg42.7%
Simplified42.7%
Taylor expanded in a around 0 13.7%
associate-*r*13.7%
neg-mul-113.7%
*-commutative13.7%
Simplified13.7%
cancel-sign-sub-inv13.7%
*-commutative13.7%
associate-*r*12.3%
*-commutative12.3%
Applied egg-rr12.3%
Taylor expanded in a around inf 27.2%
Final simplification34.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 95.8%
+-commutative95.8%
fma-def96.6%
sub-neg96.6%
log1p-def99.2%
Simplified99.2%
Taylor expanded in a around 0 75.4%
*-commutative75.4%
exp-prod71.6%
exp-diff71.6%
rem-exp-log71.6%
Simplified71.6%
Taylor expanded in y around 0 21.9%
Final simplification21.9%
herbie shell --seed 2023297
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, B"
:precision binary64
(* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))