
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
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 - 1.0d0) * log(a))) - b))) / y
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 - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
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 - 1.0d0) * log(a))) - b))) / y
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 - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (log a) (+ t -1.0))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + (log(a) * (t + -1.0))) - b))) / y;
}
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)) + (log(a) * (t + (-1.0d0)))) - b))) / y
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)) + (Math.log(a) * (t + -1.0))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + (math.log(a) * (t + -1.0))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(log(a) * Float64(t + -1.0))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + (log(a) * (t + -1.0))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[Log[a], $MachinePrecision] * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \log a \cdot \left(t + -1\right)\right) - b}}{y}
\end{array}
Initial program 99.2%
Final simplification99.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.35e+27) (not (<= y 1e+45))) (/ (* x (exp (- (- (* y (log z)) (log a)) b))) y) (/ (* x (exp (- (* (log a) (+ t -1.0)) b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.35e+27) || !(y <= 1e+45)) {
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y;
} else {
tmp = (x * exp(((log(a) * (t + -1.0)) - b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.35d+27)) .or. (.not. (y <= 1d+45))) then
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y
else
tmp = (x * exp(((log(a) * (t + (-1.0d0))) - b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.35e+27) || !(y <= 1e+45)) {
tmp = (x * Math.exp((((y * Math.log(z)) - Math.log(a)) - b))) / y;
} else {
tmp = (x * Math.exp(((Math.log(a) * (t + -1.0)) - b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.35e+27) or not (y <= 1e+45): tmp = (x * math.exp((((y * math.log(z)) - math.log(a)) - b))) / y else: tmp = (x * math.exp(((math.log(a) * (t + -1.0)) - b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.35e+27) || !(y <= 1e+45)) tmp = Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) - log(a)) - b))) / y); else tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * Float64(t + -1.0)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.35e+27) || ~((y <= 1e+45))) tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y; else tmp = (x * exp(((log(a) * (t + -1.0)) - b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.35e+27], N[Not[LessEqual[y, 1e+45]], $MachinePrecision]], N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] - N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * N[(t + -1.0), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.35 \cdot 10^{+27} \lor \neg \left(y \leq 10^{+45}\right):\\
\;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z - \log a\right) - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot \left(t + -1\right) - b}}{y}\\
\end{array}
\end{array}
if y < -1.3499999999999999e27 or 9.9999999999999993e44 < y Initial program 100.0%
Taylor expanded in t around 0 91.7%
+-commutative91.7%
mul-1-neg91.7%
unsub-neg91.7%
Simplified91.7%
if -1.3499999999999999e27 < y < 9.9999999999999993e44Initial program 98.5%
associate-/l*97.8%
fma-def97.8%
sub-neg97.8%
metadata-eval97.8%
Simplified97.8%
Taylor expanded in y around 0 96.9%
Final simplification94.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (/ y (/ (pow z y) a))))
(t_2 (* (/ (pow z y) (* a (exp b))) (/ x y)))
(t_3 (pow a (+ t -1.0)))
(t_4 (/ x (/ y t_3)))
(t_5 (* y (exp b))))
(if (<= t -3.9e+31)
t_4
(if (<= t -7.8e-177)
t_2
(if (<= t -2e-299)
t_1
(if (<= t 4.6e-127)
t_2
(if (<= t 1.3e-47)
t_1
(if (<= t 6.5e+43)
(/ x (* a t_5))
(if (<= t 3.3e+66)
(* (/ x y) t_3)
(if (<= t 2.12e+89)
(* (/ x a) (/ (pow z y) t_5))
t_4))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (y / (pow(z, y) / a));
double t_2 = (pow(z, y) / (a * exp(b))) * (x / y);
double t_3 = pow(a, (t + -1.0));
double t_4 = x / (y / t_3);
double t_5 = y * exp(b);
double tmp;
if (t <= -3.9e+31) {
tmp = t_4;
} else if (t <= -7.8e-177) {
tmp = t_2;
} else if (t <= -2e-299) {
tmp = t_1;
} else if (t <= 4.6e-127) {
tmp = t_2;
} else if (t <= 1.3e-47) {
tmp = t_1;
} else if (t <= 6.5e+43) {
tmp = x / (a * t_5);
} else if (t <= 3.3e+66) {
tmp = (x / y) * t_3;
} else if (t <= 2.12e+89) {
tmp = (x / a) * (pow(z, y) / t_5);
} else {
tmp = t_4;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_1 = x / (y / ((z ** y) / a))
t_2 = ((z ** y) / (a * exp(b))) * (x / y)
t_3 = a ** (t + (-1.0d0))
t_4 = x / (y / t_3)
t_5 = y * exp(b)
if (t <= (-3.9d+31)) then
tmp = t_4
else if (t <= (-7.8d-177)) then
tmp = t_2
else if (t <= (-2d-299)) then
tmp = t_1
else if (t <= 4.6d-127) then
tmp = t_2
else if (t <= 1.3d-47) then
tmp = t_1
else if (t <= 6.5d+43) then
tmp = x / (a * t_5)
else if (t <= 3.3d+66) then
tmp = (x / y) * t_3
else if (t <= 2.12d+89) then
tmp = (x / a) * ((z ** y) / t_5)
else
tmp = t_4
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 / (y / (Math.pow(z, y) / a));
double t_2 = (Math.pow(z, y) / (a * Math.exp(b))) * (x / y);
double t_3 = Math.pow(a, (t + -1.0));
double t_4 = x / (y / t_3);
double t_5 = y * Math.exp(b);
double tmp;
if (t <= -3.9e+31) {
tmp = t_4;
} else if (t <= -7.8e-177) {
tmp = t_2;
} else if (t <= -2e-299) {
tmp = t_1;
} else if (t <= 4.6e-127) {
tmp = t_2;
} else if (t <= 1.3e-47) {
tmp = t_1;
} else if (t <= 6.5e+43) {
tmp = x / (a * t_5);
} else if (t <= 3.3e+66) {
tmp = (x / y) * t_3;
} else if (t <= 2.12e+89) {
tmp = (x / a) * (Math.pow(z, y) / t_5);
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (y / (math.pow(z, y) / a)) t_2 = (math.pow(z, y) / (a * math.exp(b))) * (x / y) t_3 = math.pow(a, (t + -1.0)) t_4 = x / (y / t_3) t_5 = y * math.exp(b) tmp = 0 if t <= -3.9e+31: tmp = t_4 elif t <= -7.8e-177: tmp = t_2 elif t <= -2e-299: tmp = t_1 elif t <= 4.6e-127: tmp = t_2 elif t <= 1.3e-47: tmp = t_1 elif t <= 6.5e+43: tmp = x / (a * t_5) elif t <= 3.3e+66: tmp = (x / y) * t_3 elif t <= 2.12e+89: tmp = (x / a) * (math.pow(z, y) / t_5) else: tmp = t_4 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(y / Float64((z ^ y) / a))) t_2 = Float64(Float64((z ^ y) / Float64(a * exp(b))) * Float64(x / y)) t_3 = a ^ Float64(t + -1.0) t_4 = Float64(x / Float64(y / t_3)) t_5 = Float64(y * exp(b)) tmp = 0.0 if (t <= -3.9e+31) tmp = t_4; elseif (t <= -7.8e-177) tmp = t_2; elseif (t <= -2e-299) tmp = t_1; elseif (t <= 4.6e-127) tmp = t_2; elseif (t <= 1.3e-47) tmp = t_1; elseif (t <= 6.5e+43) tmp = Float64(x / Float64(a * t_5)); elseif (t <= 3.3e+66) tmp = Float64(Float64(x / y) * t_3); elseif (t <= 2.12e+89) tmp = Float64(Float64(x / a) * Float64((z ^ y) / t_5)); else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (y / ((z ^ y) / a)); t_2 = ((z ^ y) / (a * exp(b))) * (x / y); t_3 = a ^ (t + -1.0); t_4 = x / (y / t_3); t_5 = y * exp(b); tmp = 0.0; if (t <= -3.9e+31) tmp = t_4; elseif (t <= -7.8e-177) tmp = t_2; elseif (t <= -2e-299) tmp = t_1; elseif (t <= 4.6e-127) tmp = t_2; elseif (t <= 1.3e-47) tmp = t_1; elseif (t <= 6.5e+43) tmp = x / (a * t_5); elseif (t <= 3.3e+66) tmp = (x / y) * t_3; elseif (t <= 2.12e+89) tmp = (x / a) * ((z ^ y) / t_5); else tmp = t_4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(y / N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Power[z, y], $MachinePrecision] / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(x / N[(y / t$95$3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.9e+31], t$95$4, If[LessEqual[t, -7.8e-177], t$95$2, If[LessEqual[t, -2e-299], t$95$1, If[LessEqual[t, 4.6e-127], t$95$2, If[LessEqual[t, 1.3e-47], t$95$1, If[LessEqual[t, 6.5e+43], N[(x / N[(a * t$95$5), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.3e+66], N[(N[(x / y), $MachinePrecision] * t$95$3), $MachinePrecision], If[LessEqual[t, 2.12e+89], N[(N[(x / a), $MachinePrecision] * N[(N[Power[z, y], $MachinePrecision] / t$95$5), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{y}{\frac{{z}^{y}}{a}}}\\
t_2 := \frac{{z}^{y}}{a \cdot e^{b}} \cdot \frac{x}{y}\\
t_3 := {a}^{\left(t + -1\right)}\\
t_4 := \frac{x}{\frac{y}{t_3}}\\
t_5 := y \cdot e^{b}\\
\mathbf{if}\;t \leq -3.9 \cdot 10^{+31}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t \leq -7.8 \cdot 10^{-177}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -2 \cdot 10^{-299}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{-127}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{-47}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{+43}:\\
\;\;\;\;\frac{x}{a \cdot t_5}\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{+66}:\\
\;\;\;\;\frac{x}{y} \cdot t_3\\
\mathbf{elif}\;t \leq 2.12 \cdot 10^{+89}:\\
\;\;\;\;\frac{x}{a} \cdot \frac{{z}^{y}}{t_5}\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\end{array}
\end{array}
if t < -3.89999999999999999e31 or 2.11999999999999995e89 < t Initial program 100.0%
associate-/l*100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0 91.3%
Taylor expanded in b around 0 88.4%
associate-/l*88.4%
exp-to-pow88.4%
sub-neg88.4%
metadata-eval88.4%
+-commutative88.4%
Simplified88.4%
if -3.89999999999999999e31 < t < -7.80000000000000028e-177 or -1.99999999999999998e-299 < t < 4.60000000000000038e-127Initial program 98.0%
associate-*l/94.1%
*-commutative94.1%
exp-diff83.7%
exp-sum82.4%
*-commutative82.4%
exp-to-pow82.4%
*-commutative82.4%
exp-to-pow82.9%
sub-neg82.9%
metadata-eval82.9%
Simplified82.9%
Taylor expanded in t around 0 84.9%
if -7.80000000000000028e-177 < t < -1.99999999999999998e-299 or 4.60000000000000038e-127 < t < 1.3e-47Initial program 98.5%
Taylor expanded in t around 0 98.5%
+-commutative98.5%
mul-1-neg98.5%
unsub-neg98.5%
Simplified98.5%
Taylor expanded in b around 0 82.2%
associate-/l*82.6%
div-exp82.8%
*-commutative82.8%
exp-to-pow82.8%
rem-exp-log83.8%
Simplified83.8%
if 1.3e-47 < t < 6.4999999999999998e43Initial program 100.0%
associate-*l/84.6%
*-commutative84.6%
exp-diff61.5%
exp-sum50.0%
*-commutative50.0%
exp-to-pow50.0%
*-commutative50.0%
exp-to-pow50.0%
sub-neg50.0%
metadata-eval50.0%
Simplified50.0%
Taylor expanded in t around 0 76.9%
times-frac69.2%
Simplified69.2%
Taylor expanded in y around 0 77.4%
if 6.4999999999999998e43 < t < 3.3000000000000001e66Initial program 100.0%
associate-/l*100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0 82.1%
Taylor expanded in b around 0 73.2%
associate-/l*73.2%
exp-to-pow73.2%
sub-neg73.2%
metadata-eval73.2%
+-commutative73.2%
Simplified73.2%
Taylor expanded in x around 0 73.2%
*-commutative73.2%
exp-to-pow73.2%
sub-neg73.2%
metadata-eval73.2%
associate-*r/73.2%
Simplified73.2%
if 3.3000000000000001e66 < t < 2.11999999999999995e89Initial program 100.0%
associate-*l/90.0%
*-commutative90.0%
exp-diff70.0%
exp-sum30.0%
*-commutative30.0%
exp-to-pow30.0%
*-commutative30.0%
exp-to-pow30.0%
sub-neg30.0%
metadata-eval30.0%
Simplified30.0%
Taylor expanded in t around 0 80.2%
times-frac90.2%
Simplified90.2%
Final simplification85.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (/ y (pow a (+ t -1.0)))))
(t_2 (* y (exp b)))
(t_3 (* (/ x a) (/ (pow z y) t_2))))
(if (<= t -5e+30)
t_1
(if (<= t -1.4e-106)
t_3
(if (<= t -2.4e-301)
(/ x (/ y (/ (pow z y) a)))
(if (<= t 1.05e-112)
t_3
(if (<= t 7.8e+52) (/ x (* a t_2)) (if (<= t 9e+88) t_3 t_1))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (y / pow(a, (t + -1.0)));
double t_2 = y * exp(b);
double t_3 = (x / a) * (pow(z, y) / t_2);
double tmp;
if (t <= -5e+30) {
tmp = t_1;
} else if (t <= -1.4e-106) {
tmp = t_3;
} else if (t <= -2.4e-301) {
tmp = x / (y / (pow(z, y) / a));
} else if (t <= 1.05e-112) {
tmp = t_3;
} else if (t <= 7.8e+52) {
tmp = x / (a * t_2);
} else if (t <= 9e+88) {
tmp = t_3;
} 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) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = x / (y / (a ** (t + (-1.0d0))))
t_2 = y * exp(b)
t_3 = (x / a) * ((z ** y) / t_2)
if (t <= (-5d+30)) then
tmp = t_1
else if (t <= (-1.4d-106)) then
tmp = t_3
else if (t <= (-2.4d-301)) then
tmp = x / (y / ((z ** y) / a))
else if (t <= 1.05d-112) then
tmp = t_3
else if (t <= 7.8d+52) then
tmp = x / (a * t_2)
else if (t <= 9d+88) then
tmp = t_3
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 / (y / Math.pow(a, (t + -1.0)));
double t_2 = y * Math.exp(b);
double t_3 = (x / a) * (Math.pow(z, y) / t_2);
double tmp;
if (t <= -5e+30) {
tmp = t_1;
} else if (t <= -1.4e-106) {
tmp = t_3;
} else if (t <= -2.4e-301) {
tmp = x / (y / (Math.pow(z, y) / a));
} else if (t <= 1.05e-112) {
tmp = t_3;
} else if (t <= 7.8e+52) {
tmp = x / (a * t_2);
} else if (t <= 9e+88) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (y / math.pow(a, (t + -1.0))) t_2 = y * math.exp(b) t_3 = (x / a) * (math.pow(z, y) / t_2) tmp = 0 if t <= -5e+30: tmp = t_1 elif t <= -1.4e-106: tmp = t_3 elif t <= -2.4e-301: tmp = x / (y / (math.pow(z, y) / a)) elif t <= 1.05e-112: tmp = t_3 elif t <= 7.8e+52: tmp = x / (a * t_2) elif t <= 9e+88: tmp = t_3 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(y / (a ^ Float64(t + -1.0)))) t_2 = Float64(y * exp(b)) t_3 = Float64(Float64(x / a) * Float64((z ^ y) / t_2)) tmp = 0.0 if (t <= -5e+30) tmp = t_1; elseif (t <= -1.4e-106) tmp = t_3; elseif (t <= -2.4e-301) tmp = Float64(x / Float64(y / Float64((z ^ y) / a))); elseif (t <= 1.05e-112) tmp = t_3; elseif (t <= 7.8e+52) tmp = Float64(x / Float64(a * t_2)); elseif (t <= 9e+88) tmp = t_3; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (y / (a ^ (t + -1.0))); t_2 = y * exp(b); t_3 = (x / a) * ((z ^ y) / t_2); tmp = 0.0; if (t <= -5e+30) tmp = t_1; elseif (t <= -1.4e-106) tmp = t_3; elseif (t <= -2.4e-301) tmp = x / (y / ((z ^ y) / a)); elseif (t <= 1.05e-112) tmp = t_3; elseif (t <= 7.8e+52) tmp = x / (a * t_2); elseif (t <= 9e+88) tmp = t_3; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(y / N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x / a), $MachinePrecision] * N[(N[Power[z, y], $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5e+30], t$95$1, If[LessEqual[t, -1.4e-106], t$95$3, If[LessEqual[t, -2.4e-301], N[(x / N[(y / N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.05e-112], t$95$3, If[LessEqual[t, 7.8e+52], N[(x / N[(a * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9e+88], t$95$3, t$95$1]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{y}{{a}^{\left(t + -1\right)}}}\\
t_2 := y \cdot e^{b}\\
t_3 := \frac{x}{a} \cdot \frac{{z}^{y}}{t_2}\\
\mathbf{if}\;t \leq -5 \cdot 10^{+30}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.4 \cdot 10^{-106}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -2.4 \cdot 10^{-301}:\\
\;\;\;\;\frac{x}{\frac{y}{\frac{{z}^{y}}{a}}}\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-112}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{+52}:\\
\;\;\;\;\frac{x}{a \cdot t_2}\\
\mathbf{elif}\;t \leq 9 \cdot 10^{+88}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -4.9999999999999998e30 or 9e88 < t Initial program 100.0%
associate-/l*100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0 91.3%
Taylor expanded in b around 0 88.4%
associate-/l*88.4%
exp-to-pow88.4%
sub-neg88.4%
metadata-eval88.4%
+-commutative88.4%
Simplified88.4%
if -4.9999999999999998e30 < t < -1.39999999999999994e-106 or -2.39999999999999991e-301 < t < 1.05e-112 or 7.7999999999999999e52 < t < 9e88Initial program 98.4%
associate-*l/90.5%
*-commutative90.5%
exp-diff81.4%
exp-sum74.6%
*-commutative74.6%
exp-to-pow74.6%
*-commutative74.6%
exp-to-pow74.9%
sub-neg74.9%
metadata-eval74.9%
Simplified74.9%
Taylor expanded in t around 0 83.5%
times-frac82.4%
Simplified82.4%
if -1.39999999999999994e-106 < t < -2.39999999999999991e-301Initial program 97.9%
Taylor expanded in t around 0 97.9%
+-commutative97.9%
mul-1-neg97.9%
unsub-neg97.9%
Simplified97.9%
Taylor expanded in b around 0 79.1%
associate-/l*76.6%
div-exp76.8%
*-commutative76.8%
exp-to-pow76.8%
rem-exp-log78.2%
Simplified78.2%
if 1.05e-112 < t < 7.7999999999999999e52Initial program 100.0%
associate-*l/85.7%
*-commutative85.7%
exp-diff57.1%
exp-sum48.6%
*-commutative48.6%
exp-to-pow48.6%
*-commutative48.6%
exp-to-pow48.6%
sub-neg48.6%
metadata-eval48.6%
Simplified48.6%
Taylor expanded in t around 0 68.7%
times-frac60.1%
Simplified60.1%
Taylor expanded in y around 0 72.0%
Final simplification82.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -4e+130) (not (<= y 2.3e+44))) (/ x (/ y (/ (pow z y) a))) (/ (* x (exp (- (* (log a) (+ t -1.0)) b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4e+130) || !(y <= 2.3e+44)) {
tmp = x / (y / (pow(z, y) / a));
} else {
tmp = (x * exp(((log(a) * (t + -1.0)) - b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-4d+130)) .or. (.not. (y <= 2.3d+44))) then
tmp = x / (y / ((z ** y) / a))
else
tmp = (x * exp(((log(a) * (t + (-1.0d0))) - b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4e+130) || !(y <= 2.3e+44)) {
tmp = x / (y / (Math.pow(z, y) / a));
} else {
tmp = (x * Math.exp(((Math.log(a) * (t + -1.0)) - b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -4e+130) or not (y <= 2.3e+44): tmp = x / (y / (math.pow(z, y) / a)) else: tmp = (x * math.exp(((math.log(a) * (t + -1.0)) - b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -4e+130) || !(y <= 2.3e+44)) tmp = Float64(x / Float64(y / Float64((z ^ y) / a))); else tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * Float64(t + -1.0)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -4e+130) || ~((y <= 2.3e+44))) tmp = x / (y / ((z ^ y) / a)); else tmp = (x * exp(((log(a) * (t + -1.0)) - b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -4e+130], N[Not[LessEqual[y, 2.3e+44]], $MachinePrecision]], N[(x / N[(y / N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * N[(t + -1.0), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4 \cdot 10^{+130} \lor \neg \left(y \leq 2.3 \cdot 10^{+44}\right):\\
\;\;\;\;\frac{x}{\frac{y}{\frac{{z}^{y}}{a}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot \left(t + -1\right) - b}}{y}\\
\end{array}
\end{array}
if y < -4.0000000000000002e130 or 2.30000000000000004e44 < y Initial program 100.0%
Taylor expanded in t around 0 92.7%
+-commutative92.7%
mul-1-neg92.7%
unsub-neg92.7%
Simplified92.7%
Taylor expanded in b around 0 85.5%
associate-/l*85.5%
div-exp85.5%
*-commutative85.5%
exp-to-pow85.5%
rem-exp-log85.5%
Simplified85.5%
if -4.0000000000000002e130 < y < 2.30000000000000004e44Initial program 98.7%
associate-/l*98.1%
fma-def98.1%
sub-neg98.1%
metadata-eval98.1%
Simplified98.1%
Taylor expanded in y around 0 93.7%
Final simplification90.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -7.2e+22) (not (<= y 1.45e+37))) (/ x (/ y (/ (pow z y) a))) (/ (* x (/ (/ (pow a t) a) (exp b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -7.2e+22) || !(y <= 1.45e+37)) {
tmp = x / (y / (pow(z, y) / a));
} else {
tmp = (x * ((pow(a, t) / a) / exp(b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-7.2d+22)) .or. (.not. (y <= 1.45d+37))) then
tmp = x / (y / ((z ** y) / a))
else
tmp = (x * (((a ** t) / a) / exp(b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -7.2e+22) || !(y <= 1.45e+37)) {
tmp = x / (y / (Math.pow(z, y) / a));
} else {
tmp = (x * ((Math.pow(a, t) / a) / Math.exp(b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -7.2e+22) or not (y <= 1.45e+37): tmp = x / (y / (math.pow(z, y) / a)) else: tmp = (x * ((math.pow(a, t) / a) / math.exp(b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -7.2e+22) || !(y <= 1.45e+37)) tmp = Float64(x / Float64(y / Float64((z ^ y) / a))); else tmp = Float64(Float64(x * Float64(Float64((a ^ t) / a) / exp(b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -7.2e+22) || ~((y <= 1.45e+37))) tmp = x / (y / ((z ^ y) / a)); else tmp = (x * (((a ^ t) / a) / exp(b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -7.2e+22], N[Not[LessEqual[y, 1.45e+37]], $MachinePrecision]], N[(x / N[(y / N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[(N[Power[a, t], $MachinePrecision] / a), $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.2 \cdot 10^{+22} \lor \neg \left(y \leq 1.45 \cdot 10^{+37}\right):\\
\;\;\;\;\frac{x}{\frac{y}{\frac{{z}^{y}}{a}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \frac{\frac{{a}^{t}}{a}}{e^{b}}}{y}\\
\end{array}
\end{array}
if y < -7.2e22 or 1.44999999999999989e37 < y Initial program 100.0%
Taylor expanded in t around 0 90.5%
+-commutative90.5%
mul-1-neg90.5%
unsub-neg90.5%
Simplified90.5%
Taylor expanded in b around 0 81.7%
associate-/l*81.7%
div-exp81.7%
*-commutative81.7%
exp-to-pow81.7%
rem-exp-log81.7%
Simplified81.7%
if -7.2e22 < y < 1.44999999999999989e37Initial program 98.5%
Taylor expanded in y around 0 97.5%
div-exp84.6%
exp-to-pow85.1%
sub-neg85.1%
metadata-eval85.1%
Simplified85.1%
unpow-prod-up85.2%
unpow-185.2%
Applied egg-rr85.2%
associate-*r/85.2%
*-rgt-identity85.2%
Simplified85.2%
Final simplification83.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (/ x (* a (exp b))) y)) (t_2 (/ x (/ y (/ (pow z y) a)))))
(if (<= y -2e+87)
t_2
(if (<= y 2.5e-60)
t_1
(if (<= y 5.5e-12)
(* (/ x y) (pow a (+ t -1.0)))
(if (<= y 1.2e+37) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / (a * exp(b))) / y;
double t_2 = x / (y / (pow(z, y) / a));
double tmp;
if (y <= -2e+87) {
tmp = t_2;
} else if (y <= 2.5e-60) {
tmp = t_1;
} else if (y <= 5.5e-12) {
tmp = (x / y) * pow(a, (t + -1.0));
} else if (y <= 1.2e+37) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x / (a * exp(b))) / y
t_2 = x / (y / ((z ** y) / a))
if (y <= (-2d+87)) then
tmp = t_2
else if (y <= 2.5d-60) then
tmp = t_1
else if (y <= 5.5d-12) then
tmp = (x / y) * (a ** (t + (-1.0d0)))
else if (y <= 1.2d+37) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / (a * Math.exp(b))) / y;
double t_2 = x / (y / (Math.pow(z, y) / a));
double tmp;
if (y <= -2e+87) {
tmp = t_2;
} else if (y <= 2.5e-60) {
tmp = t_1;
} else if (y <= 5.5e-12) {
tmp = (x / y) * Math.pow(a, (t + -1.0));
} else if (y <= 1.2e+37) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x / (a * math.exp(b))) / y t_2 = x / (y / (math.pow(z, y) / a)) tmp = 0 if y <= -2e+87: tmp = t_2 elif y <= 2.5e-60: tmp = t_1 elif y <= 5.5e-12: tmp = (x / y) * math.pow(a, (t + -1.0)) elif y <= 1.2e+37: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x / Float64(a * exp(b))) / y) t_2 = Float64(x / Float64(y / Float64((z ^ y) / a))) tmp = 0.0 if (y <= -2e+87) tmp = t_2; elseif (y <= 2.5e-60) tmp = t_1; elseif (y <= 5.5e-12) tmp = Float64(Float64(x / y) * (a ^ Float64(t + -1.0))); elseif (y <= 1.2e+37) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x / (a * exp(b))) / y; t_2 = x / (y / ((z ^ y) / a)); tmp = 0.0; if (y <= -2e+87) tmp = t_2; elseif (y <= 2.5e-60) tmp = t_1; elseif (y <= 5.5e-12) tmp = (x / y) * (a ^ (t + -1.0)); elseif (y <= 1.2e+37) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(y / N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2e+87], t$95$2, If[LessEqual[y, 2.5e-60], t$95$1, If[LessEqual[y, 5.5e-12], N[(N[(x / y), $MachinePrecision] * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.2e+37], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{a \cdot e^{b}}}{y}\\
t_2 := \frac{x}{\frac{y}{\frac{{z}^{y}}{a}}}\\
\mathbf{if}\;y \leq -2 \cdot 10^{+87}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{-60}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{-12}:\\
\;\;\;\;\frac{x}{y} \cdot {a}^{\left(t + -1\right)}\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{+37}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -1.9999999999999999e87 or 1.2e37 < y Initial program 100.0%
Taylor expanded in t around 0 89.1%
+-commutative89.1%
mul-1-neg89.1%
unsub-neg89.1%
Simplified89.1%
Taylor expanded in b around 0 82.7%
associate-/l*82.7%
div-exp82.7%
*-commutative82.7%
exp-to-pow82.7%
rem-exp-log82.7%
Simplified82.7%
if -1.9999999999999999e87 < y < 2.5000000000000001e-60 or 5.5000000000000004e-12 < y < 1.2e37Initial program 98.6%
Taylor expanded in y around 0 95.0%
div-exp80.1%
exp-to-pow80.6%
sub-neg80.6%
metadata-eval80.6%
Simplified80.6%
Taylor expanded in t around 0 71.7%
if 2.5000000000000001e-60 < y < 5.5000000000000004e-12Initial program 99.0%
associate-/l*99.0%
fma-def99.0%
sub-neg99.0%
metadata-eval99.0%
Simplified99.0%
Taylor expanded in y around 0 97.6%
Taylor expanded in b around 0 97.6%
associate-/l*97.6%
exp-to-pow97.6%
sub-neg97.6%
metadata-eval97.6%
+-commutative97.6%
Simplified97.6%
Taylor expanded in x around 0 97.6%
*-commutative97.6%
exp-to-pow97.6%
sub-neg97.6%
metadata-eval97.6%
associate-*r/97.6%
Simplified97.6%
Final simplification77.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (/ y (pow a (+ t -1.0))))))
(if (<= t -2.55e+39)
t_1
(if (<= t 1.85e-22)
(/ x (/ y (/ (pow z y) a)))
(if (<= t 1.55e+80) (/ (/ x (* a (exp b))) y) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (y / pow(a, (t + -1.0)));
double tmp;
if (t <= -2.55e+39) {
tmp = t_1;
} else if (t <= 1.85e-22) {
tmp = x / (y / (pow(z, y) / a));
} else if (t <= 1.55e+80) {
tmp = (x / (a * exp(b))) / y;
} 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 / (y / (a ** (t + (-1.0d0))))
if (t <= (-2.55d+39)) then
tmp = t_1
else if (t <= 1.85d-22) then
tmp = x / (y / ((z ** y) / a))
else if (t <= 1.55d+80) then
tmp = (x / (a * exp(b))) / y
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 / (y / Math.pow(a, (t + -1.0)));
double tmp;
if (t <= -2.55e+39) {
tmp = t_1;
} else if (t <= 1.85e-22) {
tmp = x / (y / (Math.pow(z, y) / a));
} else if (t <= 1.55e+80) {
tmp = (x / (a * Math.exp(b))) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (y / math.pow(a, (t + -1.0))) tmp = 0 if t <= -2.55e+39: tmp = t_1 elif t <= 1.85e-22: tmp = x / (y / (math.pow(z, y) / a)) elif t <= 1.55e+80: tmp = (x / (a * math.exp(b))) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(y / (a ^ Float64(t + -1.0)))) tmp = 0.0 if (t <= -2.55e+39) tmp = t_1; elseif (t <= 1.85e-22) tmp = Float64(x / Float64(y / Float64((z ^ y) / a))); elseif (t <= 1.55e+80) tmp = Float64(Float64(x / Float64(a * exp(b))) / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (y / (a ^ (t + -1.0))); tmp = 0.0; if (t <= -2.55e+39) tmp = t_1; elseif (t <= 1.85e-22) tmp = x / (y / ((z ^ y) / a)); elseif (t <= 1.55e+80) tmp = (x / (a * exp(b))) / y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(y / N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.55e+39], t$95$1, If[LessEqual[t, 1.85e-22], N[(x / N[(y / N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.55e+80], N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{y}{{a}^{\left(t + -1\right)}}}\\
\mathbf{if}\;t \leq -2.55 \cdot 10^{+39}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{-22}:\\
\;\;\;\;\frac{x}{\frac{y}{\frac{{z}^{y}}{a}}}\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{+80}:\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -2.5499999999999999e39 or 1.54999999999999994e80 < t Initial program 100.0%
associate-/l*100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0 91.6%
Taylor expanded in b around 0 87.8%
associate-/l*87.8%
exp-to-pow87.8%
sub-neg87.8%
metadata-eval87.8%
+-commutative87.8%
Simplified87.8%
if -2.5499999999999999e39 < t < 1.85e-22Initial program 98.3%
Taylor expanded in t around 0 97.0%
+-commutative97.0%
mul-1-neg97.0%
unsub-neg97.0%
Simplified97.0%
Taylor expanded in b around 0 73.8%
associate-/l*73.0%
div-exp73.1%
*-commutative73.1%
exp-to-pow73.1%
rem-exp-log73.7%
Simplified73.7%
if 1.85e-22 < t < 1.54999999999999994e80Initial program 100.0%
Taylor expanded in y around 0 83.1%
div-exp60.3%
exp-to-pow60.3%
sub-neg60.3%
metadata-eval60.3%
Simplified60.3%
Taylor expanded in t around 0 69.3%
Final simplification78.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.8e+71) (not (<= t 4.9e+95))) (* (/ x y) (pow a (+ t -1.0))) (/ (/ x (* a (exp b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.8e+71) || !(t <= 4.9e+95)) {
tmp = (x / y) * pow(a, (t + -1.0));
} else {
tmp = (x / (a * exp(b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-1.8d+71)) .or. (.not. (t <= 4.9d+95))) then
tmp = (x / y) * (a ** (t + (-1.0d0)))
else
tmp = (x / (a * exp(b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.8e+71) || !(t <= 4.9e+95)) {
tmp = (x / y) * Math.pow(a, (t + -1.0));
} else {
tmp = (x / (a * Math.exp(b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.8e+71) or not (t <= 4.9e+95): tmp = (x / y) * math.pow(a, (t + -1.0)) else: tmp = (x / (a * math.exp(b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.8e+71) || !(t <= 4.9e+95)) tmp = Float64(Float64(x / y) * (a ^ Float64(t + -1.0))); else tmp = Float64(Float64(x / Float64(a * exp(b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.8e+71) || ~((t <= 4.9e+95))) tmp = (x / y) * (a ^ (t + -1.0)); else tmp = (x / (a * exp(b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.8e+71], N[Not[LessEqual[t, 4.9e+95]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.8 \cdot 10^{+71} \lor \neg \left(t \leq 4.9 \cdot 10^{+95}\right):\\
\;\;\;\;\frac{x}{y} \cdot {a}^{\left(t + -1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\
\end{array}
\end{array}
if t < -1.8e71 or 4.8999999999999999e95 < t Initial program 100.0%
associate-/l*100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0 92.5%
Taylor expanded in b around 0 89.3%
associate-/l*89.3%
exp-to-pow89.3%
sub-neg89.3%
metadata-eval89.3%
+-commutative89.3%
Simplified89.3%
Taylor expanded in x around 0 89.3%
*-commutative89.3%
exp-to-pow89.3%
sub-neg89.3%
metadata-eval89.3%
associate-*r/79.5%
Simplified79.5%
if -1.8e71 < t < 4.8999999999999999e95Initial program 98.8%
Taylor expanded in y around 0 72.4%
div-exp65.1%
exp-to-pow65.5%
sub-neg65.5%
metadata-eval65.5%
Simplified65.5%
Taylor expanded in t around 0 65.5%
Final simplification70.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -2.9e-153) (not (<= b 3.3e-256))) (/ x (* a (* y (exp b)))) (/ x (/ (* y a) (- b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -2.9e-153) || !(b <= 3.3e-256)) {
tmp = x / (a * (y * exp(b)));
} else {
tmp = x / ((y * a) / -b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-2.9d-153)) .or. (.not. (b <= 3.3d-256))) then
tmp = x / (a * (y * exp(b)))
else
tmp = x / ((y * a) / -b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -2.9e-153) || !(b <= 3.3e-256)) {
tmp = x / (a * (y * Math.exp(b)));
} else {
tmp = x / ((y * a) / -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -2.9e-153) or not (b <= 3.3e-256): tmp = x / (a * (y * math.exp(b))) else: tmp = x / ((y * a) / -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -2.9e-153) || !(b <= 3.3e-256)) tmp = Float64(x / Float64(a * Float64(y * exp(b)))); else tmp = Float64(x / Float64(Float64(y * a) / Float64(-b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -2.9e-153) || ~((b <= 3.3e-256))) tmp = x / (a * (y * exp(b))); else tmp = x / ((y * a) / -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -2.9e-153], N[Not[LessEqual[b, 3.3e-256]], $MachinePrecision]], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y * a), $MachinePrecision] / (-b)), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.9 \cdot 10^{-153} \lor \neg \left(b \leq 3.3 \cdot 10^{-256}\right):\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{y \cdot a}{-b}}\\
\end{array}
\end{array}
if b < -2.90000000000000002e-153 or 3.3e-256 < b Initial program 99.6%
associate-*l/87.6%
*-commutative87.6%
exp-diff63.7%
exp-sum55.3%
*-commutative55.3%
exp-to-pow55.3%
*-commutative55.3%
exp-to-pow55.6%
sub-neg55.6%
metadata-eval55.6%
Simplified55.6%
Taylor expanded in t around 0 60.9%
times-frac59.8%
Simplified59.8%
Taylor expanded in y around 0 59.0%
if -2.90000000000000002e-153 < b < 3.3e-256Initial program 97.3%
associate-*l/92.2%
*-commutative92.2%
exp-diff92.2%
exp-sum75.6%
*-commutative75.6%
exp-to-pow75.6%
*-commutative75.6%
exp-to-pow76.1%
sub-neg76.1%
metadata-eval76.1%
Simplified76.1%
Taylor expanded in t around 0 65.2%
times-frac55.8%
Simplified55.8%
Taylor expanded in y around 0 26.1%
Taylor expanded in b around 0 26.1%
+-commutative26.1%
mul-1-neg26.1%
unsub-neg26.1%
times-frac26.1%
Simplified26.1%
Taylor expanded in b around inf 44.6%
mul-1-neg44.6%
associate-*r/42.1%
*-commutative42.1%
distribute-rgt-neg-in42.1%
associate-/r/51.1%
Simplified51.1%
Final simplification57.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.75e-161) (not (<= b 3e-253))) (/ (/ x (* a (exp b))) y) (/ x (/ (* y a) (- b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.75e-161) || !(b <= 3e-253)) {
tmp = (x / (a * exp(b))) / y;
} else {
tmp = x / ((y * a) / -b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-1.75d-161)) .or. (.not. (b <= 3d-253))) then
tmp = (x / (a * exp(b))) / y
else
tmp = x / ((y * a) / -b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.75e-161) || !(b <= 3e-253)) {
tmp = (x / (a * Math.exp(b))) / y;
} else {
tmp = x / ((y * a) / -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.75e-161) or not (b <= 3e-253): tmp = (x / (a * math.exp(b))) / y else: tmp = x / ((y * a) / -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.75e-161) || !(b <= 3e-253)) tmp = Float64(Float64(x / Float64(a * exp(b))) / y); else tmp = Float64(x / Float64(Float64(y * a) / Float64(-b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -1.75e-161) || ~((b <= 3e-253))) tmp = (x / (a * exp(b))) / y; else tmp = x / ((y * a) / -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.75e-161], N[Not[LessEqual[b, 3e-253]], $MachinePrecision]], N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(N[(y * a), $MachinePrecision] / (-b)), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.75 \cdot 10^{-161} \lor \neg \left(b \leq 3 \cdot 10^{-253}\right):\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{y \cdot a}{-b}}\\
\end{array}
\end{array}
if b < -1.7500000000000001e-161 or 3.0000000000000002e-253 < b Initial program 99.6%
Taylor expanded in y around 0 82.6%
div-exp66.3%
exp-to-pow66.6%
sub-neg66.6%
metadata-eval66.6%
Simplified66.6%
Taylor expanded in t around 0 60.5%
if -1.7500000000000001e-161 < b < 3.0000000000000002e-253Initial program 97.2%
associate-*l/92.0%
*-commutative92.0%
exp-diff92.0%
exp-sum75.0%
*-commutative75.0%
exp-to-pow75.0%
*-commutative75.0%
exp-to-pow75.5%
sub-neg75.5%
metadata-eval75.5%
Simplified75.5%
Taylor expanded in t around 0 66.7%
times-frac54.7%
Simplified54.7%
Taylor expanded in y around 0 26.7%
Taylor expanded in b around 0 26.7%
+-commutative26.7%
mul-1-neg26.7%
unsub-neg26.7%
times-frac26.6%
Simplified26.6%
Taylor expanded in b around inf 43.2%
mul-1-neg43.2%
associate-*r/40.8%
*-commutative40.8%
distribute-rgt-neg-in40.8%
associate-/r/50.1%
Simplified50.1%
Final simplification58.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -85.0) (and (not (<= b -4.2e-159)) (<= b 1.85e-256))) (/ x (/ (* y a) (- b))) (/ (/ x a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -85.0) || (!(b <= -4.2e-159) && (b <= 1.85e-256))) {
tmp = x / ((y * a) / -b);
} else {
tmp = (x / a) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-85.0d0)) .or. (.not. (b <= (-4.2d-159))) .and. (b <= 1.85d-256)) then
tmp = x / ((y * a) / -b)
else
tmp = (x / a) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -85.0) || (!(b <= -4.2e-159) && (b <= 1.85e-256))) {
tmp = x / ((y * a) / -b);
} else {
tmp = (x / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -85.0) or (not (b <= -4.2e-159) and (b <= 1.85e-256)): tmp = x / ((y * a) / -b) else: tmp = (x / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -85.0) || (!(b <= -4.2e-159) && (b <= 1.85e-256))) tmp = Float64(x / Float64(Float64(y * a) / Float64(-b))); else tmp = Float64(Float64(x / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -85.0) || (~((b <= -4.2e-159)) && (b <= 1.85e-256))) tmp = x / ((y * a) / -b); else tmp = (x / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -85.0], And[N[Not[LessEqual[b, -4.2e-159]], $MachinePrecision], LessEqual[b, 1.85e-256]]], N[(x / N[(N[(y * a), $MachinePrecision] / (-b)), $MachinePrecision]), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -85 \lor \neg \left(b \leq -4.2 \cdot 10^{-159}\right) \land b \leq 1.85 \cdot 10^{-256}:\\
\;\;\;\;\frac{x}{\frac{y \cdot a}{-b}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if b < -85 or -4.1999999999999998e-159 < b < 1.85000000000000014e-256Initial program 98.9%
associate-*l/94.1%
*-commutative94.1%
exp-diff67.0%
exp-sum56.8%
*-commutative56.8%
exp-to-pow56.8%
*-commutative56.8%
exp-to-pow57.0%
sub-neg57.0%
metadata-eval57.0%
Simplified57.0%
Taylor expanded in t around 0 62.1%
times-frac52.8%
Simplified52.8%
Taylor expanded in y around 0 58.1%
Taylor expanded in b around 0 32.1%
+-commutative32.1%
mul-1-neg32.1%
unsub-neg32.1%
times-frac31.2%
Simplified31.2%
Taylor expanded in b around inf 38.4%
mul-1-neg38.4%
associate-*r/36.8%
*-commutative36.8%
distribute-rgt-neg-in36.8%
associate-/r/43.7%
Simplified43.7%
if -85 < b < -4.1999999999999998e-159 or 1.85000000000000014e-256 < b Initial program 99.4%
Taylor expanded in y around 0 80.2%
div-exp68.1%
exp-to-pow68.5%
sub-neg68.5%
metadata-eval68.5%
Simplified68.5%
unpow-prod-up68.6%
unpow-168.6%
Applied egg-rr68.6%
associate-*r/68.6%
*-rgt-identity68.6%
Simplified68.6%
Taylor expanded in t around 0 52.9%
associate-/r*50.2%
Simplified50.2%
Taylor expanded in b around 0 29.4%
Final simplification35.4%
(FPCore (x y z t a b) :precision binary64 (if (<= b -3.7e-157) (* x (/ (- 1.0 b) (* y a))) (if (<= b 3.3e-255) (/ x (/ (* y a) (- b))) (/ (/ x a) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -3.7e-157) {
tmp = x * ((1.0 - b) / (y * a));
} else if (b <= 3.3e-255) {
tmp = x / ((y * a) / -b);
} else {
tmp = (x / a) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-3.7d-157)) then
tmp = x * ((1.0d0 - b) / (y * a))
else if (b <= 3.3d-255) then
tmp = x / ((y * a) / -b)
else
tmp = (x / a) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -3.7e-157) {
tmp = x * ((1.0 - b) / (y * a));
} else if (b <= 3.3e-255) {
tmp = x / ((y * a) / -b);
} else {
tmp = (x / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -3.7e-157: tmp = x * ((1.0 - b) / (y * a)) elif b <= 3.3e-255: tmp = x / ((y * a) / -b) else: tmp = (x / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -3.7e-157) tmp = Float64(x * Float64(Float64(1.0 - b) / Float64(y * a))); elseif (b <= 3.3e-255) tmp = Float64(x / Float64(Float64(y * a) / Float64(-b))); else tmp = Float64(Float64(x / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -3.7e-157) tmp = x * ((1.0 - b) / (y * a)); elseif (b <= 3.3e-255) tmp = x / ((y * a) / -b); else tmp = (x / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -3.7e-157], N[(x * N[(N[(1.0 - b), $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.3e-255], N[(x / N[(N[(y * a), $MachinePrecision] / (-b)), $MachinePrecision]), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.7 \cdot 10^{-157}:\\
\;\;\;\;x \cdot \frac{1 - b}{y \cdot a}\\
\mathbf{elif}\;b \leq 3.3 \cdot 10^{-255}:\\
\;\;\;\;\frac{x}{\frac{y \cdot a}{-b}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if b < -3.6999999999999998e-157Initial program 99.3%
associate-*l/90.6%
*-commutative90.6%
exp-diff61.6%
exp-sum51.6%
*-commutative51.6%
exp-to-pow51.6%
*-commutative51.6%
exp-to-pow51.9%
sub-neg51.9%
metadata-eval51.9%
Simplified51.9%
Taylor expanded in t around 0 62.7%
times-frac59.6%
Simplified59.6%
Taylor expanded in y around 0 64.9%
Taylor expanded in b around 0 36.6%
+-commutative36.6%
mul-1-neg36.6%
unsub-neg36.6%
times-frac33.8%
Simplified33.8%
Taylor expanded in x around 0 40.2%
div-sub40.2%
Simplified40.2%
if -3.6999999999999998e-157 < b < 3.29999999999999988e-255Initial program 97.3%
associate-*l/92.2%
*-commutative92.2%
exp-diff92.2%
exp-sum75.6%
*-commutative75.6%
exp-to-pow75.6%
*-commutative75.6%
exp-to-pow76.1%
sub-neg76.1%
metadata-eval76.1%
Simplified76.1%
Taylor expanded in t around 0 65.2%
times-frac55.8%
Simplified55.8%
Taylor expanded in y around 0 26.1%
Taylor expanded in b around 0 26.1%
+-commutative26.1%
mul-1-neg26.1%
unsub-neg26.1%
times-frac26.1%
Simplified26.1%
Taylor expanded in b around inf 44.6%
mul-1-neg44.6%
associate-*r/42.1%
*-commutative42.1%
distribute-rgt-neg-in42.1%
associate-/r/51.1%
Simplified51.1%
if 3.29999999999999988e-255 < b Initial program 99.8%
Taylor expanded in y around 0 83.6%
div-exp67.8%
exp-to-pow67.9%
sub-neg67.9%
metadata-eval67.9%
Simplified67.9%
unpow-prod-up67.9%
unpow-167.9%
Applied egg-rr67.9%
associate-*r/67.9%
*-rgt-identity67.9%
Simplified67.9%
Taylor expanded in t around 0 55.5%
associate-/r*52.0%
Simplified52.0%
Taylor expanded in b around 0 25.5%
Final simplification35.5%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.3e-158) (/ (/ (* x (- 1.0 b)) a) y) (if (<= b 1.58e-254) (/ x (/ (* y a) (- b))) (/ (/ x a) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.3e-158) {
tmp = ((x * (1.0 - b)) / a) / y;
} else if (b <= 1.58e-254) {
tmp = x / ((y * a) / -b);
} else {
tmp = (x / a) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-1.3d-158)) then
tmp = ((x * (1.0d0 - b)) / a) / y
else if (b <= 1.58d-254) then
tmp = x / ((y * a) / -b)
else
tmp = (x / a) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.3e-158) {
tmp = ((x * (1.0 - b)) / a) / y;
} else if (b <= 1.58e-254) {
tmp = x / ((y * a) / -b);
} else {
tmp = (x / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.3e-158: tmp = ((x * (1.0 - b)) / a) / y elif b <= 1.58e-254: tmp = x / ((y * a) / -b) else: tmp = (x / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.3e-158) tmp = Float64(Float64(Float64(x * Float64(1.0 - b)) / a) / y); elseif (b <= 1.58e-254) tmp = Float64(x / Float64(Float64(y * a) / Float64(-b))); else tmp = Float64(Float64(x / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.3e-158) tmp = ((x * (1.0 - b)) / a) / y; elseif (b <= 1.58e-254) tmp = x / ((y * a) / -b); else tmp = (x / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.3e-158], N[(N[(N[(x * N[(1.0 - b), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 1.58e-254], N[(x / N[(N[(y * a), $MachinePrecision] / (-b)), $MachinePrecision]), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.3 \cdot 10^{-158}:\\
\;\;\;\;\frac{\frac{x \cdot \left(1 - b\right)}{a}}{y}\\
\mathbf{elif}\;b \leq 1.58 \cdot 10^{-254}:\\
\;\;\;\;\frac{x}{\frac{y \cdot a}{-b}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if b < -1.3e-158Initial program 99.3%
Taylor expanded in y around 0 81.5%
div-exp64.7%
exp-to-pow65.1%
sub-neg65.1%
metadata-eval65.1%
Simplified65.1%
unpow-prod-up65.2%
unpow-165.2%
Applied egg-rr65.2%
associate-*r/65.2%
*-rgt-identity65.2%
Simplified65.2%
Taylor expanded in t around 0 66.1%
associate-/r*59.2%
Simplified59.2%
Taylor expanded in b around 0 42.1%
+-commutative42.1%
mul-1-neg42.1%
sub-neg42.1%
*-commutative42.1%
div-sub42.1%
*-rgt-identity42.1%
distribute-lft-out--42.1%
Simplified42.1%
if -1.3e-158 < b < 1.58000000000000002e-254Initial program 97.2%
associate-*l/92.0%
*-commutative92.0%
exp-diff92.0%
exp-sum75.0%
*-commutative75.0%
exp-to-pow75.0%
*-commutative75.0%
exp-to-pow75.5%
sub-neg75.5%
metadata-eval75.5%
Simplified75.5%
Taylor expanded in t around 0 66.7%
times-frac54.7%
Simplified54.7%
Taylor expanded in y around 0 26.7%
Taylor expanded in b around 0 26.7%
+-commutative26.7%
mul-1-neg26.7%
unsub-neg26.7%
times-frac26.6%
Simplified26.6%
Taylor expanded in b around inf 43.2%
mul-1-neg43.2%
associate-*r/40.8%
*-commutative40.8%
distribute-rgt-neg-in40.8%
associate-/r/50.1%
Simplified50.1%
if 1.58000000000000002e-254 < b Initial program 99.8%
Taylor expanded in y around 0 83.6%
div-exp67.8%
exp-to-pow67.9%
sub-neg67.9%
metadata-eval67.9%
Simplified67.9%
unpow-prod-up67.9%
unpow-167.9%
Applied egg-rr67.9%
associate-*r/67.9%
*-rgt-identity67.9%
Simplified67.9%
Taylor expanded in t around 0 55.5%
associate-/r*52.0%
Simplified52.0%
Taylor expanded in b around 0 25.5%
Final simplification36.0%
(FPCore (x y z t a b) :precision binary64 (if (<= a 4.4e-82) (/ (/ x a) y) (* b (/ (- x) (* y a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 4.4e-82) {
tmp = (x / a) / y;
} else {
tmp = b * (-x / (y * a));
}
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 <= 4.4d-82) then
tmp = (x / a) / y
else
tmp = b * (-x / (y * a))
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 <= 4.4e-82) {
tmp = (x / a) / y;
} else {
tmp = b * (-x / (y * a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= 4.4e-82: tmp = (x / a) / y else: tmp = b * (-x / (y * a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= 4.4e-82) tmp = Float64(Float64(x / a) / y); else tmp = Float64(b * Float64(Float64(-x) / Float64(y * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= 4.4e-82) tmp = (x / a) / y; else tmp = b * (-x / (y * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, 4.4e-82], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(b * N[((-x) / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 4.4 \cdot 10^{-82}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;b \cdot \frac{-x}{y \cdot a}\\
\end{array}
\end{array}
if a < 4.39999999999999971e-82Initial program 99.5%
Taylor expanded in y around 0 76.9%
div-exp68.1%
exp-to-pow68.3%
sub-neg68.3%
metadata-eval68.3%
Simplified68.3%
unpow-prod-up68.5%
unpow-168.5%
Applied egg-rr68.5%
associate-*r/68.5%
*-rgt-identity68.5%
Simplified68.5%
Taylor expanded in t around 0 60.7%
associate-/r*56.3%
Simplified56.3%
Taylor expanded in b around 0 36.1%
if 4.39999999999999971e-82 < a Initial program 99.0%
associate-*l/87.0%
*-commutative87.0%
exp-diff65.2%
exp-sum57.3%
*-commutative57.3%
exp-to-pow57.3%
*-commutative57.3%
exp-to-pow57.6%
sub-neg57.6%
metadata-eval57.6%
Simplified57.6%
Taylor expanded in t around 0 57.5%
times-frac58.6%
Simplified58.6%
Taylor expanded in y around 0 52.0%
Taylor expanded in b around 0 21.9%
+-commutative21.9%
mul-1-neg21.9%
unsub-neg21.9%
times-frac18.0%
Simplified18.0%
Taylor expanded in b around inf 23.7%
mul-1-neg23.7%
associate-*r/27.2%
*-commutative27.2%
distribute-rgt-neg-in27.2%
Simplified27.2%
Final simplification30.4%
(FPCore (x y z t a b) :precision binary64 (/ x (* y a)))
double code(double x, double y, double z, double t, double a, double b) {
return x / (y * a);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x / (y * a)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / (y * a);
}
def code(x, y, z, t, a, b): return x / (y * a)
function code(x, y, z, t, a, b) return Float64(x / Float64(y * a)) end
function tmp = code(x, y, z, t, a, b) tmp = x / (y * a); end
code[x_, y_, z_, t_, a_, b_] := N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y \cdot a}
\end{array}
Initial program 99.2%
associate-*l/88.3%
*-commutative88.3%
exp-diff68.4%
exp-sum58.7%
*-commutative58.7%
exp-to-pow58.7%
*-commutative58.7%
exp-to-pow58.9%
sub-neg58.9%
metadata-eval58.9%
Simplified58.9%
Taylor expanded in t around 0 61.6%
times-frac59.2%
Simplified59.2%
Taylor expanded in y around 0 53.6%
Taylor expanded in b around 0 26.0%
Final simplification26.0%
(FPCore (x y z t a b) :precision binary64 (/ (/ x a) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x / a) / y;
}
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 / a) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x / a) / y;
}
def code(x, y, z, t, a, b): return (x / a) / y
function code(x, y, z, t, a, b) return Float64(Float64(x / a) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x / a) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{x}{a}}{y}
\end{array}
Initial program 99.2%
Taylor expanded in y around 0 79.6%
div-exp66.0%
exp-to-pow66.2%
sub-neg66.2%
metadata-eval66.2%
Simplified66.2%
unpow-prod-up66.3%
unpow-166.3%
Applied egg-rr66.3%
associate-*r/66.3%
*-rgt-identity66.3%
Simplified66.3%
Taylor expanded in t around 0 55.1%
associate-/r*50.8%
Simplified50.8%
Taylor expanded in b around 0 27.1%
Final simplification27.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (pow a (- t 1.0)))
(t_2 (/ (* x (/ t_1 y)) (- (+ b 1.0) (* y (log z))))))
(if (< t -0.8845848504127471)
t_2
(if (< t 852031.2288374073)
(/ (* (/ x y) t_1) (exp (- b (* (log z) y))))
t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = pow(a, (t - 1.0));
double t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * log(z)));
double tmp;
if (t < -0.8845848504127471) {
tmp = t_2;
} else if (t < 852031.2288374073) {
tmp = ((x / y) * t_1) / exp((b - (log(z) * y)));
} 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 = a ** (t - 1.0d0)
t_2 = (x * (t_1 / y)) / ((b + 1.0d0) - (y * log(z)))
if (t < (-0.8845848504127471d0)) then
tmp = t_2
else if (t < 852031.2288374073d0) then
tmp = ((x / y) * t_1) / exp((b - (log(z) * y)))
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 = Math.pow(a, (t - 1.0));
double t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * Math.log(z)));
double tmp;
if (t < -0.8845848504127471) {
tmp = t_2;
} else if (t < 852031.2288374073) {
tmp = ((x / y) * t_1) / Math.exp((b - (Math.log(z) * y)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = math.pow(a, (t - 1.0)) t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * math.log(z))) tmp = 0 if t < -0.8845848504127471: tmp = t_2 elif t < 852031.2288374073: tmp = ((x / y) * t_1) / math.exp((b - (math.log(z) * y))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = a ^ Float64(t - 1.0) t_2 = Float64(Float64(x * Float64(t_1 / y)) / Float64(Float64(b + 1.0) - Float64(y * log(z)))) tmp = 0.0 if (t < -0.8845848504127471) tmp = t_2; elseif (t < 852031.2288374073) tmp = Float64(Float64(Float64(x / y) * t_1) / exp(Float64(b - Float64(log(z) * y)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a ^ (t - 1.0); t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * log(z))); tmp = 0.0; if (t < -0.8845848504127471) tmp = t_2; elseif (t < 852031.2288374073) tmp = ((x / y) * t_1) / exp((b - (log(z) * y))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision] / N[(N[(b + 1.0), $MachinePrecision] - N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -0.8845848504127471], t$95$2, If[Less[t, 852031.2288374073], N[(N[(N[(x / y), $MachinePrecision] * t$95$1), $MachinePrecision] / N[Exp[N[(b - N[(N[Log[z], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {a}^{\left(t - 1\right)}\\
t_2 := \frac{x \cdot \frac{t_1}{y}}{\left(b + 1\right) - y \cdot \log z}\\
\mathbf{if}\;t < -0.8845848504127471:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t < 852031.2288374073:\\
\;\;\;\;\frac{\frac{x}{y} \cdot t_1}{e^{b - \log z \cdot y}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
herbie shell --seed 2023310
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2, A"
:precision binary64
:herbie-target
(if (< t -0.8845848504127471) (/ (* x (/ (pow a (- t 1.0)) y)) (- (+ b 1.0) (* y (log z)))) (if (< t 852031.2288374073) (/ (* (/ x y) (pow a (- t 1.0))) (exp (- b (* (log z) y)))) (/ (* x (/ (pow a (- t 1.0)) y)) (- (+ b 1.0) (* y (log z))))))
(/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))