
(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 16 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 y (- (log z) t) (* a (- (log1p (- z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(fma(y, (log(z) - t), (a * (log1p(-z) - b))));
}
function code(x, y, z, t, a, b) return Float64(x * exp(fma(y, Float64(log(z) - t), Float64(a * Float64(log1p(Float64(-z)) - b))))) end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(a * N[(N[Log[1 + (-z)], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)\right)}
\end{array}
Initial program 96.6%
fma-def97.0%
sub-neg97.0%
log1p-def99.6%
Simplified99.6%
Final simplification99.6%
(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 96.6%
Final simplification96.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (pow (exp (- y)) t))))
(if (<= y -1.6e+19)
t_1
(if (<= y 1.15e-38)
(* x (exp (* (- a) (+ z b))))
(if (<= y 1.8e+225)
t_1
(if (<= y 1.85e+265)
(* x (pow (exp y) t))
(* x (exp (* t (- y))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * pow(exp(-y), t);
double tmp;
if (y <= -1.6e+19) {
tmp = t_1;
} else if (y <= 1.15e-38) {
tmp = x * exp((-a * (z + b)));
} else if (y <= 1.8e+225) {
tmp = t_1;
} else if (y <= 1.85e+265) {
tmp = x * pow(exp(y), t);
} else {
tmp = x * exp((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) :: tmp
t_1 = x * (exp(-y) ** t)
if (y <= (-1.6d+19)) then
tmp = t_1
else if (y <= 1.15d-38) then
tmp = x * exp((-a * (z + b)))
else if (y <= 1.8d+225) then
tmp = t_1
else if (y <= 1.85d+265) then
tmp = x * (exp(y) ** t)
else
tmp = x * exp((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 = x * Math.pow(Math.exp(-y), t);
double tmp;
if (y <= -1.6e+19) {
tmp = t_1;
} else if (y <= 1.15e-38) {
tmp = x * Math.exp((-a * (z + b)));
} else if (y <= 1.8e+225) {
tmp = t_1;
} else if (y <= 1.85e+265) {
tmp = x * Math.pow(Math.exp(y), t);
} else {
tmp = x * Math.exp((t * -y));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.pow(math.exp(-y), t) tmp = 0 if y <= -1.6e+19: tmp = t_1 elif y <= 1.15e-38: tmp = x * math.exp((-a * (z + b))) elif y <= 1.8e+225: tmp = t_1 elif y <= 1.85e+265: tmp = x * math.pow(math.exp(y), t) else: tmp = x * math.exp((t * -y)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * (exp(Float64(-y)) ^ t)) tmp = 0.0 if (y <= -1.6e+19) tmp = t_1; elseif (y <= 1.15e-38) tmp = Float64(x * exp(Float64(Float64(-a) * Float64(z + b)))); elseif (y <= 1.8e+225) tmp = t_1; elseif (y <= 1.85e+265) tmp = Float64(x * (exp(y) ^ t)); else tmp = Float64(x * exp(Float64(t * Float64(-y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * (exp(-y) ^ t); tmp = 0.0; if (y <= -1.6e+19) tmp = t_1; elseif (y <= 1.15e-38) tmp = x * exp((-a * (z + b))); elseif (y <= 1.8e+225) tmp = t_1; elseif (y <= 1.85e+265) tmp = x * (exp(y) ^ t); else tmp = x * exp((t * -y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Power[N[Exp[(-y)], $MachinePrecision], t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.6e+19], t$95$1, If[LessEqual[y, 1.15e-38], N[(x * N[Exp[N[((-a) * N[(z + b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.8e+225], t$95$1, If[LessEqual[y, 1.85e+265], N[(x * N[Power[N[Exp[y], $MachinePrecision], t], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(t * (-y)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot {\left(e^{-y}\right)}^{t}\\
\mathbf{if}\;y \leq -1.6 \cdot 10^{+19}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-38}:\\
\;\;\;\;x \cdot e^{\left(-a\right) \cdot \left(z + b\right)}\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{+225}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{+265}:\\
\;\;\;\;x \cdot {\left(e^{y}\right)}^{t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\
\end{array}
\end{array}
if y < -1.6e19 or 1.15000000000000001e-38 < y < 1.7999999999999999e225Initial program 100.0%
Taylor expanded in t around inf 59.9%
mul-1-neg59.9%
distribute-lft-neg-out59.9%
*-commutative59.9%
Simplified59.9%
exp-prod75.6%
neg-mul-175.6%
pow-unpow75.6%
Applied egg-rr75.6%
unpow-175.6%
rec-exp75.6%
Simplified75.6%
if -1.6e19 < y < 1.15000000000000001e-38Initial program 94.5%
Taylor expanded in y around 0 79.4%
sub-neg79.4%
neg-mul-179.4%
log1p-def84.0%
neg-mul-184.0%
Simplified84.0%
Taylor expanded in z around 0 84.0%
associate-*r*84.0%
associate-*r*84.0%
distribute-lft-out84.0%
neg-mul-184.0%
Simplified84.0%
if 1.7999999999999999e225 < y < 1.85e265Initial program 85.7%
Taylor expanded in t around inf 16.6%
mul-1-neg16.6%
distribute-lft-neg-out16.6%
*-commutative16.6%
Simplified16.6%
expm1-log1p-u16.6%
expm1-udef16.6%
exp-prod15.6%
add-sqr-sqrt15.4%
sqrt-unprod31.0%
sqr-neg31.0%
sqrt-unprod14.3%
add-sqr-sqrt85.9%
Applied egg-rr85.9%
expm1-def85.9%
expm1-log1p85.9%
Simplified85.9%
if 1.85e265 < y Initial program 83.3%
Taylor expanded in t around inf 100.0%
mul-1-neg100.0%
distribute-lft-neg-out100.0%
*-commutative100.0%
Simplified100.0%
Final simplification80.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.6e-57) (not (<= y 9.6e-39))) (* x (exp (* y (- (log z) t)))) (* x (exp (* (- a) (+ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.6e-57) || !(y <= 9.6e-39)) {
tmp = x * exp((y * (log(z) - t)));
} 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 <= (-3.6d-57)) .or. (.not. (y <= 9.6d-39))) then
tmp = x * exp((y * (log(z) - t)))
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 <= -3.6e-57) || !(y <= 9.6e-39)) {
tmp = x * Math.exp((y * (Math.log(z) - t)));
} else {
tmp = x * Math.exp((-a * (z + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.6e-57) or not (y <= 9.6e-39): tmp = x * math.exp((y * (math.log(z) - t))) else: tmp = x * math.exp((-a * (z + b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.6e-57) || !(y <= 9.6e-39)) tmp = Float64(x * exp(Float64(y * Float64(log(z) - t)))); else tmp = Float64(x * exp(Float64(Float64(-a) * Float64(z + b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3.6e-57) || ~((y <= 9.6e-39))) tmp = x * exp((y * (log(z) - t))); else tmp = x * exp((-a * (z + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.6e-57], N[Not[LessEqual[y, 9.6e-39]], $MachinePrecision]], N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $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 -3.6 \cdot 10^{-57} \lor \neg \left(y \leq 9.6 \cdot 10^{-39}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{\left(-a\right) \cdot \left(z + b\right)}\\
\end{array}
\end{array}
if y < -3.6000000000000002e-57 or 9.60000000000000063e-39 < y Initial program 98.7%
Taylor expanded in y around inf 90.3%
if -3.6000000000000002e-57 < y < 9.60000000000000063e-39Initial program 93.6%
Taylor expanded in y around 0 81.3%
sub-neg81.3%
neg-mul-181.3%
log1p-def87.7%
neg-mul-187.7%
Simplified87.7%
Taylor expanded in z around 0 87.7%
associate-*r*87.7%
associate-*r*87.7%
distribute-lft-out87.7%
neg-mul-187.7%
Simplified87.7%
Final simplification89.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (exp (* t (- y))))))
(if (<= t -200.0)
t_1
(if (<= t -1.35e-183)
(* x (pow (exp y) t))
(if (<= t 1.75e+28) (* x (exp (* (- a) (+ z b)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * exp((t * -y));
double tmp;
if (t <= -200.0) {
tmp = t_1;
} else if (t <= -1.35e-183) {
tmp = x * pow(exp(y), t);
} else if (t <= 1.75e+28) {
tmp = x * exp((-a * (z + b)));
} else {
tmp = 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 = x * exp((t * -y))
if (t <= (-200.0d0)) then
tmp = t_1
else if (t <= (-1.35d-183)) then
tmp = x * (exp(y) ** t)
else if (t <= 1.75d+28) then
tmp = x * exp((-a * (z + b)))
else
tmp = 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 = x * Math.exp((t * -y));
double tmp;
if (t <= -200.0) {
tmp = t_1;
} else if (t <= -1.35e-183) {
tmp = x * Math.pow(Math.exp(y), t);
} else if (t <= 1.75e+28) {
tmp = x * Math.exp((-a * (z + b)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.exp((t * -y)) tmp = 0 if t <= -200.0: tmp = t_1 elif t <= -1.35e-183: tmp = x * math.pow(math.exp(y), t) elif t <= 1.75e+28: tmp = x * math.exp((-a * (z + b))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * exp(Float64(t * Float64(-y)))) tmp = 0.0 if (t <= -200.0) tmp = t_1; elseif (t <= -1.35e-183) tmp = Float64(x * (exp(y) ^ t)); elseif (t <= 1.75e+28) tmp = Float64(x * exp(Float64(Float64(-a) * Float64(z + b)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * exp((t * -y)); tmp = 0.0; if (t <= -200.0) tmp = t_1; elseif (t <= -1.35e-183) tmp = x * (exp(y) ^ t); elseif (t <= 1.75e+28) tmp = x * exp((-a * (z + b))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[N[(t * (-y)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -200.0], t$95$1, If[LessEqual[t, -1.35e-183], N[(x * N[Power[N[Exp[y], $MachinePrecision], t], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.75e+28], N[(x * N[Exp[N[((-a) * N[(z + b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot e^{t \cdot \left(-y\right)}\\
\mathbf{if}\;t \leq -200:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.35 \cdot 10^{-183}:\\
\;\;\;\;x \cdot {\left(e^{y}\right)}^{t}\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{+28}:\\
\;\;\;\;x \cdot e^{\left(-a\right) \cdot \left(z + b\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -200 or 1.75e28 < t Initial program 96.4%
Taylor expanded in t around inf 77.9%
mul-1-neg77.9%
distribute-lft-neg-out77.9%
*-commutative77.9%
Simplified77.9%
if -200 < t < -1.35000000000000004e-183Initial program 97.3%
Taylor expanded in t around inf 24.0%
mul-1-neg24.0%
distribute-lft-neg-out24.0%
*-commutative24.0%
Simplified24.0%
expm1-log1p-u24.0%
expm1-udef24.0%
exp-prod23.8%
add-sqr-sqrt23.8%
sqrt-unprod23.9%
sqr-neg23.9%
sqrt-unprod20.3%
add-sqr-sqrt74.4%
Applied egg-rr74.4%
expm1-def74.4%
expm1-log1p74.4%
Simplified74.4%
if -1.35000000000000004e-183 < t < 1.75e28Initial program 96.7%
Taylor expanded in y around 0 64.9%
sub-neg64.9%
neg-mul-164.9%
log1p-def69.3%
neg-mul-169.3%
Simplified69.3%
Taylor expanded in z around 0 69.3%
associate-*r*69.3%
associate-*r*69.3%
distribute-lft-out69.3%
neg-mul-169.3%
Simplified69.3%
Final simplification74.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (exp (* a (- b))))))
(if (<= b -3e-218)
t_1
(if (<= b 4.3e-302)
(/ 1.0 (/ 1.0 (* a (* x b))))
(if (<= b 4.2e-121) (* x (- 1.0 (* y t))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * exp((a * -b));
double tmp;
if (b <= -3e-218) {
tmp = t_1;
} else if (b <= 4.3e-302) {
tmp = 1.0 / (1.0 / (a * (x * b)));
} else if (b <= 4.2e-121) {
tmp = x * (1.0 - (y * t));
} else {
tmp = 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 = x * exp((a * -b))
if (b <= (-3d-218)) then
tmp = t_1
else if (b <= 4.3d-302) then
tmp = 1.0d0 / (1.0d0 / (a * (x * b)))
else if (b <= 4.2d-121) then
tmp = x * (1.0d0 - (y * t))
else
tmp = 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 = x * Math.exp((a * -b));
double tmp;
if (b <= -3e-218) {
tmp = t_1;
} else if (b <= 4.3e-302) {
tmp = 1.0 / (1.0 / (a * (x * b)));
} else if (b <= 4.2e-121) {
tmp = x * (1.0 - (y * t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.exp((a * -b)) tmp = 0 if b <= -3e-218: tmp = t_1 elif b <= 4.3e-302: tmp = 1.0 / (1.0 / (a * (x * b))) elif b <= 4.2e-121: tmp = x * (1.0 - (y * t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * exp(Float64(a * Float64(-b)))) tmp = 0.0 if (b <= -3e-218) tmp = t_1; elseif (b <= 4.3e-302) tmp = Float64(1.0 / Float64(1.0 / Float64(a * Float64(x * b)))); elseif (b <= 4.2e-121) tmp = Float64(x * Float64(1.0 - Float64(y * t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * exp((a * -b)); tmp = 0.0; if (b <= -3e-218) tmp = t_1; elseif (b <= 4.3e-302) tmp = 1.0 / (1.0 / (a * (x * b))); elseif (b <= 4.2e-121) tmp = x * (1.0 - (y * t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3e-218], t$95$1, If[LessEqual[b, 4.3e-302], N[(1.0 / N[(1.0 / N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.2e-121], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot e^{a \cdot \left(-b\right)}\\
\mathbf{if}\;b \leq -3 \cdot 10^{-218}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 4.3 \cdot 10^{-302}:\\
\;\;\;\;\frac{1}{\frac{1}{a \cdot \left(x \cdot b\right)}}\\
\mathbf{elif}\;b \leq 4.2 \cdot 10^{-121}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if b < -2.9999999999999998e-218 or 4.1999999999999997e-121 < b Initial program 98.0%
Taylor expanded in b around inf 62.1%
mul-1-neg62.1%
distribute-rgt-neg-out62.1%
Simplified62.1%
if -2.9999999999999998e-218 < b < 4.3000000000000002e-302Initial program 78.5%
Taylor expanded in b around inf 17.3%
mul-1-neg17.3%
distribute-rgt-neg-out17.3%
Simplified17.3%
Taylor expanded in a around 0 17.4%
mul-1-neg17.4%
unsub-neg17.4%
Simplified17.4%
distribute-rgt-out--17.4%
*-un-lft-identity17.4%
associate-*r*17.4%
flip--42.7%
clear-num42.7%
*-un-lft-identity42.7%
associate-*r*42.7%
distribute-rgt-out42.7%
difference-of-squares42.7%
add-sqr-sqrt28.2%
sqrt-unprod33.1%
sqr-neg33.1%
sqrt-unprod14.5%
add-sqr-sqrt42.7%
cancel-sign-sub-inv42.7%
pow242.7%
Applied egg-rr42.6%
Taylor expanded in a around inf 47.4%
if 4.3000000000000002e-302 < b < 4.1999999999999997e-121Initial program 100.0%
Taylor expanded in t around inf 74.3%
mul-1-neg74.3%
distribute-lft-neg-out74.3%
*-commutative74.3%
Simplified74.3%
Taylor expanded in y around 0 34.1%
mul-1-neg34.1%
unsub-neg34.1%
*-commutative34.1%
Simplified34.1%
Final simplification57.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -3.65e+62) (not (<= t 1.62e+28))) (* x (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 ((t <= -3.65e+62) || !(t <= 1.62e+28)) {
tmp = x * 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 ((t <= (-3.65d+62)) .or. (.not. (t <= 1.62d+28))) then
tmp = x * 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 ((t <= -3.65e+62) || !(t <= 1.62e+28)) {
tmp = x * 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 (t <= -3.65e+62) or not (t <= 1.62e+28): tmp = x * 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 ((t <= -3.65e+62) || !(t <= 1.62e+28)) tmp = Float64(x * exp(Float64(t * Float64(-y)))); else tmp = Float64(x * exp(Float64(Float64(-a) * Float64(z + b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -3.65e+62) || ~((t <= 1.62e+28))) tmp = x * 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[t, -3.65e+62], N[Not[LessEqual[t, 1.62e+28]], $MachinePrecision]], N[(x * N[Exp[N[(t * (-y)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[((-a) * N[(z + b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.65 \cdot 10^{+62} \lor \neg \left(t \leq 1.62 \cdot 10^{+28}\right):\\
\;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{\left(-a\right) \cdot \left(z + b\right)}\\
\end{array}
\end{array}
if t < -3.6499999999999998e62 or 1.62000000000000006e28 < t Initial program 96.7%
Taylor expanded in t around inf 80.1%
mul-1-neg80.1%
distribute-lft-neg-out80.1%
*-commutative80.1%
Simplified80.1%
if -3.6499999999999998e62 < t < 1.62000000000000006e28Initial program 96.5%
Taylor expanded in y around 0 59.3%
sub-neg59.3%
neg-mul-159.3%
log1p-def64.8%
neg-mul-164.8%
Simplified64.8%
Taylor expanded in z around 0 64.8%
associate-*r*64.8%
associate-*r*64.8%
distribute-lft-out64.8%
neg-mul-164.8%
Simplified64.8%
Final simplification71.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -4e+27) (not (<= t 1.7e+28))) (* x (exp (* t (- y)))) (* x (exp (* a (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -4e+27) || !(t <= 1.7e+28)) {
tmp = x * exp((t * -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 ((t <= (-4d+27)) .or. (.not. (t <= 1.7d+28))) then
tmp = x * exp((t * -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 ((t <= -4e+27) || !(t <= 1.7e+28)) {
tmp = x * Math.exp((t * -y));
} else {
tmp = x * Math.exp((a * -b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -4e+27) or not (t <= 1.7e+28): tmp = x * math.exp((t * -y)) else: tmp = x * math.exp((a * -b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -4e+27) || !(t <= 1.7e+28)) tmp = Float64(x * exp(Float64(t * Float64(-y)))); else tmp = Float64(x * exp(Float64(a * Float64(-b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -4e+27) || ~((t <= 1.7e+28))) tmp = x * exp((t * -y)); else tmp = x * exp((a * -b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -4e+27], N[Not[LessEqual[t, 1.7e+28]], $MachinePrecision]], N[(x * N[Exp[N[(t * (-y)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4 \cdot 10^{+27} \lor \neg \left(t \leq 1.7 \cdot 10^{+28}\right):\\
\;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\end{array}
\end{array}
if t < -4.0000000000000001e27 or 1.7e28 < t Initial program 96.1%
Taylor expanded in t around inf 78.9%
mul-1-neg78.9%
distribute-lft-neg-out78.9%
*-commutative78.9%
Simplified78.9%
if -4.0000000000000001e27 < t < 1.7e28Initial program 97.1%
Taylor expanded in b around inf 60.0%
mul-1-neg60.0%
distribute-rgt-neg-out60.0%
Simplified60.0%
Final simplification69.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- 1.0 (* a b))))
(if (<= t -4.1e+27)
(* x (exp (* a b)))
(if (<= t -3.1e-258)
(* x (exp (* y t)))
(if (<= t 2.45e-288)
(* (- b) (* x a))
(if (<= t 4.2e-121)
(/ 1.0 (/ t_1 x))
(if (<= t 3800000.0) (* x t_1) (* x (- 1.0 (* y t))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 - (a * b);
double tmp;
if (t <= -4.1e+27) {
tmp = x * exp((a * b));
} else if (t <= -3.1e-258) {
tmp = x * exp((y * t));
} else if (t <= 2.45e-288) {
tmp = -b * (x * a);
} else if (t <= 4.2e-121) {
tmp = 1.0 / (t_1 / x);
} else if (t <= 3800000.0) {
tmp = x * t_1;
} else {
tmp = x * (1.0 - (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) :: t_1
real(8) :: tmp
t_1 = 1.0d0 - (a * b)
if (t <= (-4.1d+27)) then
tmp = x * exp((a * b))
else if (t <= (-3.1d-258)) then
tmp = x * exp((y * t))
else if (t <= 2.45d-288) then
tmp = -b * (x * a)
else if (t <= 4.2d-121) then
tmp = 1.0d0 / (t_1 / x)
else if (t <= 3800000.0d0) then
tmp = x * t_1
else
tmp = x * (1.0d0 - (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 t_1 = 1.0 - (a * b);
double tmp;
if (t <= -4.1e+27) {
tmp = x * Math.exp((a * b));
} else if (t <= -3.1e-258) {
tmp = x * Math.exp((y * t));
} else if (t <= 2.45e-288) {
tmp = -b * (x * a);
} else if (t <= 4.2e-121) {
tmp = 1.0 / (t_1 / x);
} else if (t <= 3800000.0) {
tmp = x * t_1;
} else {
tmp = x * (1.0 - (y * t));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 1.0 - (a * b) tmp = 0 if t <= -4.1e+27: tmp = x * math.exp((a * b)) elif t <= -3.1e-258: tmp = x * math.exp((y * t)) elif t <= 2.45e-288: tmp = -b * (x * a) elif t <= 4.2e-121: tmp = 1.0 / (t_1 / x) elif t <= 3800000.0: tmp = x * t_1 else: tmp = x * (1.0 - (y * t)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(1.0 - Float64(a * b)) tmp = 0.0 if (t <= -4.1e+27) tmp = Float64(x * exp(Float64(a * b))); elseif (t <= -3.1e-258) tmp = Float64(x * exp(Float64(y * t))); elseif (t <= 2.45e-288) tmp = Float64(Float64(-b) * Float64(x * a)); elseif (t <= 4.2e-121) tmp = Float64(1.0 / Float64(t_1 / x)); elseif (t <= 3800000.0) tmp = Float64(x * t_1); else tmp = Float64(x * Float64(1.0 - Float64(y * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 1.0 - (a * b); tmp = 0.0; if (t <= -4.1e+27) tmp = x * exp((a * b)); elseif (t <= -3.1e-258) tmp = x * exp((y * t)); elseif (t <= 2.45e-288) tmp = -b * (x * a); elseif (t <= 4.2e-121) tmp = 1.0 / (t_1 / x); elseif (t <= 3800000.0) tmp = x * t_1; else tmp = x * (1.0 - (y * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.1e+27], N[(x * N[Exp[N[(a * b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.1e-258], N[(x * N[Exp[N[(y * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.45e-288], N[((-b) * N[(x * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.2e-121], N[(1.0 / N[(t$95$1 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3800000.0], N[(x * t$95$1), $MachinePrecision], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 - a \cdot b\\
\mathbf{if}\;t \leq -4.1 \cdot 10^{+27}:\\
\;\;\;\;x \cdot e^{a \cdot b}\\
\mathbf{elif}\;t \leq -3.1 \cdot 10^{-258}:\\
\;\;\;\;x \cdot e^{y \cdot t}\\
\mathbf{elif}\;t \leq 2.45 \cdot 10^{-288}:\\
\;\;\;\;\left(-b\right) \cdot \left(x \cdot a\right)\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{-121}:\\
\;\;\;\;\frac{1}{\frac{t_1}{x}}\\
\mathbf{elif}\;t \leq 3800000:\\
\;\;\;\;x \cdot t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\end{array}
\end{array}
if t < -4.1000000000000002e27Initial program 95.3%
Taylor expanded in b around inf 40.3%
mul-1-neg40.3%
distribute-rgt-neg-out40.3%
Simplified40.3%
expm1-log1p-u40.3%
expm1-udef40.3%
*-commutative40.3%
exp-prod38.7%
add-sqr-sqrt14.5%
sqrt-unprod24.0%
sqr-neg24.0%
sqrt-unprod9.4%
add-sqr-sqrt15.8%
Applied egg-rr15.8%
expm1-def15.8%
expm1-log1p15.8%
exp-prod20.6%
*-commutative20.6%
exp-prod20.6%
Simplified20.6%
Taylor expanded in a around inf 20.6%
if -4.1000000000000002e27 < t < -3.09999999999999999e-258Initial program 96.6%
Taylor expanded in t around inf 28.1%
mul-1-neg28.1%
distribute-lft-neg-out28.1%
*-commutative28.1%
Simplified28.1%
exp-prod29.6%
neg-mul-129.6%
pow-unpow29.6%
Applied egg-rr29.6%
unpow-129.6%
rec-exp29.6%
Simplified29.6%
add-sqr-sqrt11.6%
sqrt-unprod39.7%
sqr-neg39.7%
sqrt-unprod28.1%
add-sqr-sqrt66.9%
exp-prod51.9%
Applied egg-rr51.9%
if -3.09999999999999999e-258 < t < 2.45000000000000013e-288Initial program 100.0%
Taylor expanded in b around inf 38.8%
mul-1-neg38.8%
distribute-rgt-neg-out38.8%
Simplified38.8%
Taylor expanded in a around 0 12.4%
mul-1-neg12.4%
unsub-neg12.4%
Simplified12.4%
Taylor expanded in a around inf 38.2%
mul-1-neg38.2%
*-commutative38.2%
associate-*r*46.9%
distribute-lft-neg-in46.9%
*-commutative46.9%
Simplified46.9%
if 2.45000000000000013e-288 < t < 4.1999999999999997e-121Initial program 94.7%
Taylor expanded in b around inf 67.8%
mul-1-neg67.8%
distribute-rgt-neg-out67.8%
Simplified67.8%
Taylor expanded in a around 0 30.2%
mul-1-neg30.2%
unsub-neg30.2%
Simplified30.2%
distribute-rgt-out--30.2%
*-un-lft-identity30.2%
associate-*r*30.3%
flip--29.7%
clear-num29.6%
*-un-lft-identity29.6%
associate-*r*29.5%
distribute-rgt-out29.5%
difference-of-squares29.5%
add-sqr-sqrt12.2%
sqrt-unprod26.6%
sqr-neg26.6%
sqrt-unprod14.4%
add-sqr-sqrt21.1%
cancel-sign-sub-inv21.1%
pow221.1%
Applied egg-rr21.1%
Taylor expanded in a around 0 38.3%
+-commutative38.3%
mul-1-neg38.3%
unsub-neg38.3%
div-sub38.3%
Simplified38.3%
if 4.1999999999999997e-121 < t < 3.8e6Initial program 100.0%
Taylor expanded in b around inf 58.6%
mul-1-neg58.6%
distribute-rgt-neg-out58.6%
Simplified58.6%
Taylor expanded in a around 0 40.1%
mul-1-neg40.1%
unsub-neg40.1%
Simplified40.1%
if 3.8e6 < t Initial program 97.2%
Taylor expanded in t around inf 83.5%
mul-1-neg83.5%
distribute-lft-neg-out83.5%
*-commutative83.5%
Simplified83.5%
Taylor expanded in y around 0 40.2%
mul-1-neg40.2%
unsub-neg40.2%
*-commutative40.2%
Simplified40.2%
Final simplification38.3%
(FPCore (x y z t a b) :precision binary64 (if (<= t -3.7e-188) (* x (exp (* a b))) (if (<= t 3900000.0) (- x (* (+ z b) (* x a))) (* x (- 1.0 (* y t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -3.7e-188) {
tmp = x * exp((a * b));
} else if (t <= 3900000.0) {
tmp = x - ((z + b) * (x * a));
} else {
tmp = x * (1.0 - (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 (t <= (-3.7d-188)) then
tmp = x * exp((a * b))
else if (t <= 3900000.0d0) then
tmp = x - ((z + b) * (x * a))
else
tmp = x * (1.0d0 - (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 (t <= -3.7e-188) {
tmp = x * Math.exp((a * b));
} else if (t <= 3900000.0) {
tmp = x - ((z + b) * (x * a));
} else {
tmp = x * (1.0 - (y * t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -3.7e-188: tmp = x * math.exp((a * b)) elif t <= 3900000.0: tmp = x - ((z + b) * (x * a)) else: tmp = x * (1.0 - (y * t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -3.7e-188) tmp = Float64(x * exp(Float64(a * b))); elseif (t <= 3900000.0) tmp = Float64(x - Float64(Float64(z + b) * Float64(x * a))); else tmp = Float64(x * Float64(1.0 - Float64(y * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -3.7e-188) tmp = x * exp((a * b)); elseif (t <= 3900000.0) tmp = x - ((z + b) * (x * a)); else tmp = x * (1.0 - (y * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -3.7e-188], N[(x * N[Exp[N[(a * b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3900000.0], N[(x - N[(N[(z + b), $MachinePrecision] * N[(x * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.7 \cdot 10^{-188}:\\
\;\;\;\;x \cdot e^{a \cdot b}\\
\mathbf{elif}\;t \leq 3900000:\\
\;\;\;\;x - \left(z + b\right) \cdot \left(x \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\end{array}
\end{array}
if t < -3.69999999999999972e-188Initial program 95.5%
Taylor expanded in b around inf 45.2%
mul-1-neg45.2%
distribute-rgt-neg-out45.2%
Simplified45.2%
expm1-log1p-u45.2%
expm1-udef45.2%
*-commutative45.2%
exp-prod37.2%
add-sqr-sqrt17.2%
sqrt-unprod26.0%
sqr-neg26.0%
sqrt-unprod8.7%
add-sqr-sqrt18.5%
Applied egg-rr18.5%
expm1-def18.5%
expm1-log1p18.5%
exp-prod27.7%
*-commutative27.7%
exp-prod24.1%
Simplified24.1%
Taylor expanded in a around inf 27.7%
if -3.69999999999999972e-188 < t < 3.9e6Initial program 97.6%
Taylor expanded in y around 0 62.6%
sub-neg62.6%
neg-mul-162.6%
log1p-def66.2%
neg-mul-166.2%
Simplified66.2%
Taylor expanded in z around 0 66.2%
associate-*r*66.2%
associate-*r*66.2%
distribute-lft-out66.2%
neg-mul-166.2%
Simplified66.2%
Taylor expanded in a around 0 30.0%
mul-1-neg30.0%
unsub-neg30.0%
*-commutative30.0%
*-commutative30.0%
associate-*l*31.2%
*-commutative31.2%
Simplified31.2%
if 3.9e6 < t Initial program 97.2%
Taylor expanded in t around inf 83.5%
mul-1-neg83.5%
distribute-lft-neg-out83.5%
*-commutative83.5%
Simplified83.5%
Taylor expanded in y around 0 40.2%
mul-1-neg40.2%
unsub-neg40.2%
*-commutative40.2%
Simplified40.2%
Final simplification32.2%
(FPCore (x y z t a b) :precision binary64 (if (<= y -8.2e-83) (* x (- 1.0 (* y t))) (if (<= y 155000000000.0) (/ 1.0 (/ (- 1.0 (* a b)) x)) (* a (* x (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -8.2e-83) {
tmp = x * (1.0 - (y * t));
} else if (y <= 155000000000.0) {
tmp = 1.0 / ((1.0 - (a * b)) / x);
} 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 <= (-8.2d-83)) then
tmp = x * (1.0d0 - (y * t))
else if (y <= 155000000000.0d0) then
tmp = 1.0d0 / ((1.0d0 - (a * b)) / x)
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 <= -8.2e-83) {
tmp = x * (1.0 - (y * t));
} else if (y <= 155000000000.0) {
tmp = 1.0 / ((1.0 - (a * b)) / x);
} else {
tmp = a * (x * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -8.2e-83: tmp = x * (1.0 - (y * t)) elif y <= 155000000000.0: tmp = 1.0 / ((1.0 - (a * b)) / x) else: tmp = a * (x * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -8.2e-83) tmp = Float64(x * Float64(1.0 - Float64(y * t))); elseif (y <= 155000000000.0) tmp = Float64(1.0 / Float64(Float64(1.0 - Float64(a * b)) / x)); 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 <= -8.2e-83) tmp = x * (1.0 - (y * t)); elseif (y <= 155000000000.0) tmp = 1.0 / ((1.0 - (a * b)) / x); else tmp = a * (x * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -8.2e-83], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 155000000000.0], N[(1.0 / N[(N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{-83}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{elif}\;y \leq 155000000000:\\
\;\;\;\;\frac{1}{\frac{1 - a \cdot b}{x}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if y < -8.1999999999999999e-83Initial program 100.0%
Taylor expanded in t around inf 63.3%
mul-1-neg63.3%
distribute-lft-neg-out63.3%
*-commutative63.3%
Simplified63.3%
Taylor expanded in y around 0 26.4%
mul-1-neg26.4%
unsub-neg26.4%
*-commutative26.4%
Simplified26.4%
if -8.1999999999999999e-83 < y < 1.55e11Initial program 93.5%
Taylor expanded in b around inf 79.1%
mul-1-neg79.1%
distribute-rgt-neg-out79.1%
Simplified79.1%
Taylor expanded in a around 0 34.9%
mul-1-neg34.9%
unsub-neg34.9%
Simplified34.9%
distribute-rgt-out--34.9%
*-un-lft-identity34.9%
associate-*r*31.4%
flip--28.8%
clear-num28.7%
*-un-lft-identity28.7%
associate-*r*27.7%
distribute-rgt-out27.7%
difference-of-squares28.7%
add-sqr-sqrt15.4%
sqrt-unprod26.4%
sqr-neg26.4%
sqrt-unprod12.2%
add-sqr-sqrt25.4%
cancel-sign-sub-inv25.4%
pow225.4%
Applied egg-rr21.6%
Taylor expanded in a around 0 40.5%
+-commutative40.5%
mul-1-neg40.5%
unsub-neg40.5%
div-sub40.5%
Simplified40.5%
if 1.55e11 < y Initial program 96.7%
Taylor expanded in b around inf 29.0%
mul-1-neg29.0%
distribute-rgt-neg-out29.0%
Simplified29.0%
Taylor expanded in a around 0 13.0%
mul-1-neg13.0%
unsub-neg13.0%
Simplified13.0%
Taylor expanded in a around inf 27.5%
mul-1-neg27.5%
distribute-rgt-neg-in27.5%
distribute-rgt-neg-in27.5%
Simplified27.5%
Final simplification32.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -3.6e+172) (not (<= a 2.8e+138))) (* a (* x (- b))) (* x (- 1.0 (* y t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -3.6e+172) || !(a <= 2.8e+138)) {
tmp = a * (x * -b);
} else {
tmp = x * (1.0 - (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 <= (-3.6d+172)) .or. (.not. (a <= 2.8d+138))) then
tmp = a * (x * -b)
else
tmp = x * (1.0d0 - (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 <= -3.6e+172) || !(a <= 2.8e+138)) {
tmp = a * (x * -b);
} else {
tmp = x * (1.0 - (y * t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -3.6e+172) or not (a <= 2.8e+138): tmp = a * (x * -b) else: tmp = x * (1.0 - (y * t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -3.6e+172) || !(a <= 2.8e+138)) tmp = Float64(a * Float64(x * Float64(-b))); else tmp = Float64(x * Float64(1.0 - Float64(y * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -3.6e+172) || ~((a <= 2.8e+138))) tmp = a * (x * -b); else tmp = x * (1.0 - (y * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -3.6e+172], N[Not[LessEqual[a, 2.8e+138]], $MachinePrecision]], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.6 \cdot 10^{+172} \lor \neg \left(a \leq 2.8 \cdot 10^{+138}\right):\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\end{array}
\end{array}
if a < -3.59999999999999975e172 or 2.8000000000000001e138 < a Initial program 94.4%
Taylor expanded in b around inf 72.1%
mul-1-neg72.1%
distribute-rgt-neg-out72.1%
Simplified72.1%
Taylor expanded in a around 0 29.1%
mul-1-neg29.1%
unsub-neg29.1%
Simplified29.1%
Taylor expanded in a around inf 33.3%
mul-1-neg33.3%
distribute-rgt-neg-in33.3%
distribute-rgt-neg-in33.3%
Simplified33.3%
if -3.59999999999999975e172 < a < 2.8000000000000001e138Initial program 97.4%
Taylor expanded in t around inf 59.5%
mul-1-neg59.5%
distribute-lft-neg-out59.5%
*-commutative59.5%
Simplified59.5%
Taylor expanded in y around 0 30.7%
mul-1-neg30.7%
unsub-neg30.7%
*-commutative30.7%
Simplified30.7%
Final simplification31.4%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.6e+19) (* (- b) (* x a)) (if (<= y 0.32) (* x (- 1.0 (* a b))) (* a (* x (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.6e+19) {
tmp = -b * (x * a);
} else if (y <= 0.32) {
tmp = x * (1.0 - (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.6d+19)) then
tmp = -b * (x * a)
else if (y <= 0.32d0) then
tmp = x * (1.0d0 - (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.6e+19) {
tmp = -b * (x * a);
} else if (y <= 0.32) {
tmp = x * (1.0 - (a * b));
} else {
tmp = a * (x * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.6e+19: tmp = -b * (x * a) elif y <= 0.32: tmp = x * (1.0 - (a * b)) else: tmp = a * (x * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.6e+19) tmp = Float64(Float64(-b) * Float64(x * a)); elseif (y <= 0.32) tmp = Float64(x * Float64(1.0 - 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.6e+19) tmp = -b * (x * a); elseif (y <= 0.32) tmp = x * (1.0 - (a * b)); else tmp = a * (x * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.6e+19], N[((-b) * N[(x * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.32], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{+19}:\\
\;\;\;\;\left(-b\right) \cdot \left(x \cdot a\right)\\
\mathbf{elif}\;y \leq 0.32:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if y < -1.6e19Initial program 100.0%
Taylor expanded in b around inf 28.4%
mul-1-neg28.4%
distribute-rgt-neg-out28.4%
Simplified28.4%
Taylor expanded in a around 0 11.6%
mul-1-neg11.6%
unsub-neg11.6%
Simplified11.6%
Taylor expanded in a around inf 14.0%
mul-1-neg14.0%
*-commutative14.0%
associate-*r*17.9%
distribute-lft-neg-in17.9%
*-commutative17.9%
Simplified17.9%
if -1.6e19 < y < 0.320000000000000007Initial program 94.6%
Taylor expanded in b around inf 77.3%
mul-1-neg77.3%
distribute-rgt-neg-out77.3%
Simplified77.3%
Taylor expanded in a around 0 35.8%
mul-1-neg35.8%
unsub-neg35.8%
Simplified35.8%
if 0.320000000000000007 < y Initial program 96.8%
Taylor expanded in b around inf 29.3%
mul-1-neg29.3%
distribute-rgt-neg-out29.3%
Simplified29.3%
Taylor expanded in a around 0 12.5%
mul-1-neg12.5%
unsub-neg12.5%
Simplified12.5%
Taylor expanded in a around inf 26.3%
mul-1-neg26.3%
distribute-rgt-neg-in26.3%
distribute-rgt-neg-in26.3%
Simplified26.3%
Final simplification28.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.75e+172) (not (<= a 1.5e+107))) (* a (* x (- b))) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.75e+172) || !(a <= 1.5e+107)) {
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 ((a <= (-1.75d+172)) .or. (.not. (a <= 1.5d+107))) 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 ((a <= -1.75e+172) || !(a <= 1.5e+107)) {
tmp = a * (x * -b);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.75e+172) or not (a <= 1.5e+107): tmp = a * (x * -b) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.75e+172) || !(a <= 1.5e+107)) 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 ((a <= -1.75e+172) || ~((a <= 1.5e+107))) tmp = a * (x * -b); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.75e+172], N[Not[LessEqual[a, 1.5e+107]], $MachinePrecision]], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.75 \cdot 10^{+172} \lor \neg \left(a \leq 1.5 \cdot 10^{+107}\right):\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.74999999999999989e172 or 1.50000000000000012e107 < a Initial program 93.8%
Taylor expanded in b around inf 71.0%
mul-1-neg71.0%
distribute-rgt-neg-out71.0%
Simplified71.0%
Taylor expanded in a around 0 28.1%
mul-1-neg28.1%
unsub-neg28.1%
Simplified28.1%
Taylor expanded in a around inf 31.9%
mul-1-neg31.9%
distribute-rgt-neg-in31.9%
distribute-rgt-neg-in31.9%
Simplified31.9%
if -1.74999999999999989e172 < a < 1.50000000000000012e107Initial program 97.8%
Taylor expanded in b around inf 44.3%
mul-1-neg44.3%
distribute-rgt-neg-out44.3%
Simplified44.3%
Taylor expanded in a around 0 20.9%
Final simplification24.2%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.6e+19) (* (- b) (* x a)) (if (<= y 155000000000.0) x (* a (* x (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.6e+19) {
tmp = -b * (x * a);
} else if (y <= 155000000000.0) {
tmp = x;
} 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.6d+19)) then
tmp = -b * (x * a)
else if (y <= 155000000000.0d0) then
tmp = x
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.6e+19) {
tmp = -b * (x * a);
} else if (y <= 155000000000.0) {
tmp = x;
} else {
tmp = a * (x * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.6e+19: tmp = -b * (x * a) elif y <= 155000000000.0: tmp = x else: tmp = a * (x * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.6e+19) tmp = Float64(Float64(-b) * Float64(x * a)); elseif (y <= 155000000000.0) tmp = x; 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.6e+19) tmp = -b * (x * a); elseif (y <= 155000000000.0) tmp = x; else tmp = a * (x * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.6e+19], N[((-b) * N[(x * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 155000000000.0], x, N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{+19}:\\
\;\;\;\;\left(-b\right) \cdot \left(x \cdot a\right)\\
\mathbf{elif}\;y \leq 155000000000:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if y < -1.6e19Initial program 100.0%
Taylor expanded in b around inf 28.4%
mul-1-neg28.4%
distribute-rgt-neg-out28.4%
Simplified28.4%
Taylor expanded in a around 0 11.6%
mul-1-neg11.6%
unsub-neg11.6%
Simplified11.6%
Taylor expanded in a around inf 14.0%
mul-1-neg14.0%
*-commutative14.0%
associate-*r*17.9%
distribute-lft-neg-in17.9%
*-commutative17.9%
Simplified17.9%
if -1.6e19 < y < 1.55e11Initial program 94.7%
Taylor expanded in b around inf 76.3%
mul-1-neg76.3%
distribute-rgt-neg-out76.3%
Simplified76.3%
Taylor expanded in a around 0 27.9%
if 1.55e11 < y Initial program 96.7%
Taylor expanded in b around inf 29.0%
mul-1-neg29.0%
distribute-rgt-neg-out29.0%
Simplified29.0%
Taylor expanded in a around 0 13.0%
mul-1-neg13.0%
unsub-neg13.0%
Simplified13.0%
Taylor expanded in a around inf 27.5%
mul-1-neg27.5%
distribute-rgt-neg-in27.5%
distribute-rgt-neg-in27.5%
Simplified27.5%
Final simplification25.1%
(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 96.6%
Taylor expanded in b around inf 52.3%
mul-1-neg52.3%
distribute-rgt-neg-out52.3%
Simplified52.3%
Taylor expanded in a around 0 15.7%
Final simplification15.7%
herbie shell --seed 2024017
(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))))))