
(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 18 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 98.7%
Final simplification98.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -9.8e+79) (not (<= t 450000000.0))) (/ (* x (exp (- (* (log a) (+ t -1.0)) b))) y) (/ (* x (exp (- (- (* y (log z)) (log a)) b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -9.8e+79) || !(t <= 450000000.0)) {
tmp = (x * exp(((log(a) * (t + -1.0)) - b))) / y;
} else {
tmp = (x * exp((((y * log(z)) - log(a)) - 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 <= (-9.8d+79)) .or. (.not. (t <= 450000000.0d0))) then
tmp = (x * exp(((log(a) * (t + (-1.0d0))) - b))) / y
else
tmp = (x * exp((((y * log(z)) - log(a)) - 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 <= -9.8e+79) || !(t <= 450000000.0)) {
tmp = (x * Math.exp(((Math.log(a) * (t + -1.0)) - b))) / y;
} else {
tmp = (x * Math.exp((((y * Math.log(z)) - Math.log(a)) - b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -9.8e+79) or not (t <= 450000000.0): tmp = (x * math.exp(((math.log(a) * (t + -1.0)) - b))) / y else: tmp = (x * math.exp((((y * math.log(z)) - math.log(a)) - b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -9.8e+79) || !(t <= 450000000.0)) tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * Float64(t + -1.0)) - b))) / y); else tmp = Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) - log(a)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -9.8e+79) || ~((t <= 450000000.0))) tmp = (x * exp(((log(a) * (t + -1.0)) - b))) / y; else tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -9.8e+79], N[Not[LessEqual[t, 450000000.0]], $MachinePrecision]], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * N[(t + -1.0), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.8 \cdot 10^{+79} \lor \neg \left(t \leq 450000000\right):\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot \left(t + -1\right) - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z - \log a\right) - b}}{y}\\
\end{array}
\end{array}
if t < -9.7999999999999997e79 or 4.5e8 < t Initial program 100.0%
Taylor expanded in y around 0 95.1%
if -9.7999999999999997e79 < t < 4.5e8Initial program 97.8%
Taylor expanded in t around 0 94.9%
+-commutative94.9%
mul-1-neg94.9%
unsub-neg94.9%
Simplified94.9%
Final simplification95.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (pow a (+ t -1.0)))
(t_2 (/ x (/ y (* (pow z y) t_1))))
(t_3 (* y (exp b)))
(t_4 (/ x (* a t_3))))
(if (<= b -8.5e+127)
t_4
(if (<= b 5.5e-211)
t_2
(if (<= b 1.6) (/ (* x t_1) t_3) (if (<= b 1.65e+143) t_2 t_4))))))
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 / (y / (pow(z, y) * t_1));
double t_3 = y * exp(b);
double t_4 = x / (a * t_3);
double tmp;
if (b <= -8.5e+127) {
tmp = t_4;
} else if (b <= 5.5e-211) {
tmp = t_2;
} else if (b <= 1.6) {
tmp = (x * t_1) / t_3;
} else if (b <= 1.65e+143) {
tmp = t_2;
} 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) :: tmp
t_1 = a ** (t + (-1.0d0))
t_2 = x / (y / ((z ** y) * t_1))
t_3 = y * exp(b)
t_4 = x / (a * t_3)
if (b <= (-8.5d+127)) then
tmp = t_4
else if (b <= 5.5d-211) then
tmp = t_2
else if (b <= 1.6d0) then
tmp = (x * t_1) / t_3
else if (b <= 1.65d+143) then
tmp = t_2
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 = Math.pow(a, (t + -1.0));
double t_2 = x / (y / (Math.pow(z, y) * t_1));
double t_3 = y * Math.exp(b);
double t_4 = x / (a * t_3);
double tmp;
if (b <= -8.5e+127) {
tmp = t_4;
} else if (b <= 5.5e-211) {
tmp = t_2;
} else if (b <= 1.6) {
tmp = (x * t_1) / t_3;
} else if (b <= 1.65e+143) {
tmp = t_2;
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = math.pow(a, (t + -1.0)) t_2 = x / (y / (math.pow(z, y) * t_1)) t_3 = y * math.exp(b) t_4 = x / (a * t_3) tmp = 0 if b <= -8.5e+127: tmp = t_4 elif b <= 5.5e-211: tmp = t_2 elif b <= 1.6: tmp = (x * t_1) / t_3 elif b <= 1.65e+143: tmp = t_2 else: tmp = t_4 return tmp
function code(x, y, z, t, a, b) t_1 = a ^ Float64(t + -1.0) t_2 = Float64(x / Float64(y / Float64((z ^ y) * t_1))) t_3 = Float64(y * exp(b)) t_4 = Float64(x / Float64(a * t_3)) tmp = 0.0 if (b <= -8.5e+127) tmp = t_4; elseif (b <= 5.5e-211) tmp = t_2; elseif (b <= 1.6) tmp = Float64(Float64(x * t_1) / t_3); elseif (b <= 1.65e+143) tmp = t_2; else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a ^ (t + -1.0); t_2 = x / (y / ((z ^ y) * t_1)); t_3 = y * exp(b); t_4 = x / (a * t_3); tmp = 0.0; if (b <= -8.5e+127) tmp = t_4; elseif (b <= 5.5e-211) tmp = t_2; elseif (b <= 1.6) tmp = (x * t_1) / t_3; elseif (b <= 1.65e+143) tmp = t_2; else tmp = t_4; 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[(x / N[(y / N[(N[Power[z, y], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x / N[(a * t$95$3), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -8.5e+127], t$95$4, If[LessEqual[b, 5.5e-211], t$95$2, If[LessEqual[b, 1.6], N[(N[(x * t$95$1), $MachinePrecision] / t$95$3), $MachinePrecision], If[LessEqual[b, 1.65e+143], t$95$2, t$95$4]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {a}^{\left(t + -1\right)}\\
t_2 := \frac{x}{\frac{y}{{z}^{y} \cdot t_1}}\\
t_3 := y \cdot e^{b}\\
t_4 := \frac{x}{a \cdot t_3}\\
\mathbf{if}\;b \leq -8.5 \cdot 10^{+127}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;b \leq 5.5 \cdot 10^{-211}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq 1.6:\\
\;\;\;\;\frac{x \cdot t_1}{t_3}\\
\mathbf{elif}\;b \leq 1.65 \cdot 10^{+143}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\end{array}
\end{array}
if b < -8.4999999999999997e127 or 1.65e143 < b Initial program 100.0%
associate-*l/88.6%
*-commutative88.6%
exp-diff54.3%
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 64.3%
times-frac55.7%
Simplified55.7%
Taylor expanded in y around 0 93.0%
if -8.4999999999999997e127 < b < 5.49999999999999973e-211 or 1.6000000000000001 < b < 1.65e143Initial program 99.2%
associate-*l/89.5%
*-commutative89.5%
exp-diff72.6%
exp-sum63.2%
*-commutative63.2%
exp-to-pow63.2%
*-commutative63.2%
exp-to-pow63.6%
sub-neg63.6%
metadata-eval63.6%
Simplified63.6%
Taylor expanded in b around 0 78.6%
associate-/l*78.6%
*-commutative78.6%
exp-to-pow79.2%
sub-neg79.2%
metadata-eval79.2%
Simplified79.2%
if 5.49999999999999973e-211 < b < 1.6000000000000001Initial program 94.2%
associate-*l/84.0%
*-commutative84.0%
exp-diff84.0%
exp-sum70.8%
*-commutative70.8%
exp-to-pow70.8%
*-commutative70.8%
exp-to-pow73.8%
sub-neg73.8%
metadata-eval73.8%
Simplified73.8%
Taylor expanded in y around 0 88.1%
exp-to-pow91.0%
sub-neg91.0%
metadata-eval91.0%
Simplified91.0%
Final simplification84.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (exp b))) (t_2 (/ x (/ y (/ (pow a t) a)))))
(if (<= t -1.35e+66)
t_2
(if (<= t -6.6e-23)
(* (/ x a) (/ (pow z y) t_1))
(if (<= t -2.9e-63)
(/ x (* a t_1))
(if (<= t 105000000000.0)
(/ (* x (/ (/ (pow z y) y) (exp b))) a)
t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * exp(b);
double t_2 = x / (y / (pow(a, t) / a));
double tmp;
if (t <= -1.35e+66) {
tmp = t_2;
} else if (t <= -6.6e-23) {
tmp = (x / a) * (pow(z, y) / t_1);
} else if (t <= -2.9e-63) {
tmp = x / (a * t_1);
} else if (t <= 105000000000.0) {
tmp = (x * ((pow(z, y) / y) / exp(b))) / a;
} 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 = y * exp(b)
t_2 = x / (y / ((a ** t) / a))
if (t <= (-1.35d+66)) then
tmp = t_2
else if (t <= (-6.6d-23)) then
tmp = (x / a) * ((z ** y) / t_1)
else if (t <= (-2.9d-63)) then
tmp = x / (a * t_1)
else if (t <= 105000000000.0d0) then
tmp = (x * (((z ** y) / y) / exp(b))) / a
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 = y * Math.exp(b);
double t_2 = x / (y / (Math.pow(a, t) / a));
double tmp;
if (t <= -1.35e+66) {
tmp = t_2;
} else if (t <= -6.6e-23) {
tmp = (x / a) * (Math.pow(z, y) / t_1);
} else if (t <= -2.9e-63) {
tmp = x / (a * t_1);
} else if (t <= 105000000000.0) {
tmp = (x * ((Math.pow(z, y) / y) / Math.exp(b))) / a;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * math.exp(b) t_2 = x / (y / (math.pow(a, t) / a)) tmp = 0 if t <= -1.35e+66: tmp = t_2 elif t <= -6.6e-23: tmp = (x / a) * (math.pow(z, y) / t_1) elif t <= -2.9e-63: tmp = x / (a * t_1) elif t <= 105000000000.0: tmp = (x * ((math.pow(z, y) / y) / math.exp(b))) / a else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * exp(b)) t_2 = Float64(x / Float64(y / Float64((a ^ t) / a))) tmp = 0.0 if (t <= -1.35e+66) tmp = t_2; elseif (t <= -6.6e-23) tmp = Float64(Float64(x / a) * Float64((z ^ y) / t_1)); elseif (t <= -2.9e-63) tmp = Float64(x / Float64(a * t_1)); elseif (t <= 105000000000.0) tmp = Float64(Float64(x * Float64(Float64((z ^ y) / y) / exp(b))) / a); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * exp(b); t_2 = x / (y / ((a ^ t) / a)); tmp = 0.0; if (t <= -1.35e+66) tmp = t_2; elseif (t <= -6.6e-23) tmp = (x / a) * ((z ^ y) / t_1); elseif (t <= -2.9e-63) tmp = x / (a * t_1); elseif (t <= 105000000000.0) tmp = (x * (((z ^ y) / y) / exp(b))) / a; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(y / N[(N[Power[a, t], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.35e+66], t$95$2, If[LessEqual[t, -6.6e-23], N[(N[(x / a), $MachinePrecision] * N[(N[Power[z, y], $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.9e-63], N[(x / N[(a * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 105000000000.0], N[(N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / y), $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot e^{b}\\
t_2 := \frac{x}{\frac{y}{\frac{{a}^{t}}{a}}}\\
\mathbf{if}\;t \leq -1.35 \cdot 10^{+66}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -6.6 \cdot 10^{-23}:\\
\;\;\;\;\frac{x}{a} \cdot \frac{{z}^{y}}{t_1}\\
\mathbf{elif}\;t \leq -2.9 \cdot 10^{-63}:\\
\;\;\;\;\frac{x}{a \cdot t_1}\\
\mathbf{elif}\;t \leq 105000000000:\\
\;\;\;\;\frac{x \cdot \frac{\frac{{z}^{y}}{y}}{e^{b}}}{a}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -1.35e66 or 1.05e11 < t Initial program 100.0%
associate-*l/90.3%
*-commutative90.3%
exp-diff65.0%
exp-sum48.5%
*-commutative48.5%
exp-to-pow48.5%
*-commutative48.5%
exp-to-pow48.5%
sub-neg48.5%
metadata-eval48.5%
Simplified48.5%
Taylor expanded in y around 0 69.9%
exp-to-pow69.9%
sub-neg69.9%
metadata-eval69.9%
Simplified69.9%
Taylor expanded in b around 0 84.7%
Simplified84.7%
+-commutative84.7%
unpow-prod-up84.7%
unpow-184.7%
Applied egg-rr84.7%
associate-*r/84.7%
*-rgt-identity84.7%
Simplified84.7%
if -1.35e66 < t < -6.60000000000000041e-23Initial program 100.0%
associate-*l/95.0%
*-commutative95.0%
exp-diff85.0%
exp-sum65.0%
*-commutative65.0%
exp-to-pow65.0%
*-commutative65.0%
exp-to-pow65.0%
sub-neg65.0%
metadata-eval65.0%
Simplified65.0%
Taylor expanded in t around 0 80.7%
times-frac85.7%
Simplified85.7%
if -6.60000000000000041e-23 < t < -2.89999999999999975e-63Initial program 98.1%
associate-*l/91.7%
*-commutative91.7%
exp-diff37.8%
exp-sum37.8%
*-commutative37.8%
exp-to-pow37.8%
*-commutative37.8%
exp-to-pow38.8%
sub-neg38.8%
metadata-eval38.8%
Simplified38.8%
Taylor expanded in t around 0 46.2%
times-frac46.0%
Simplified46.0%
Taylor expanded in y around 0 81.2%
if -2.89999999999999975e-63 < t < 1.05e11Initial program 97.4%
associate-*l/85.4%
*-commutative85.4%
exp-diff73.8%
exp-sum72.1%
*-commutative72.1%
exp-to-pow72.1%
*-commutative72.1%
exp-to-pow73.5%
sub-neg73.5%
metadata-eval73.5%
Simplified73.5%
Taylor expanded in t around 0 79.6%
times-frac73.6%
Simplified73.6%
associate-*l/82.1%
associate-/r*82.1%
Applied egg-rr82.1%
Final simplification83.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (exp b))) (t_2 (/ x (/ y (/ (pow a t) a)))))
(if (<= t -5.2e+69)
t_2
(if (<= t -2.4e+14)
(* (/ x a) (/ (pow z y) t_1))
(if (<= t -2.6e-63)
(/ (* x (pow a t)) (* a t_1))
(if (<= t 80000000000.0)
(/ (* x (/ (/ (pow z y) y) (exp b))) a)
t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * exp(b);
double t_2 = x / (y / (pow(a, t) / a));
double tmp;
if (t <= -5.2e+69) {
tmp = t_2;
} else if (t <= -2.4e+14) {
tmp = (x / a) * (pow(z, y) / t_1);
} else if (t <= -2.6e-63) {
tmp = (x * pow(a, t)) / (a * t_1);
} else if (t <= 80000000000.0) {
tmp = (x * ((pow(z, y) / y) / exp(b))) / a;
} 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 = y * exp(b)
t_2 = x / (y / ((a ** t) / a))
if (t <= (-5.2d+69)) then
tmp = t_2
else if (t <= (-2.4d+14)) then
tmp = (x / a) * ((z ** y) / t_1)
else if (t <= (-2.6d-63)) then
tmp = (x * (a ** t)) / (a * t_1)
else if (t <= 80000000000.0d0) then
tmp = (x * (((z ** y) / y) / exp(b))) / a
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 = y * Math.exp(b);
double t_2 = x / (y / (Math.pow(a, t) / a));
double tmp;
if (t <= -5.2e+69) {
tmp = t_2;
} else if (t <= -2.4e+14) {
tmp = (x / a) * (Math.pow(z, y) / t_1);
} else if (t <= -2.6e-63) {
tmp = (x * Math.pow(a, t)) / (a * t_1);
} else if (t <= 80000000000.0) {
tmp = (x * ((Math.pow(z, y) / y) / Math.exp(b))) / a;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * math.exp(b) t_2 = x / (y / (math.pow(a, t) / a)) tmp = 0 if t <= -5.2e+69: tmp = t_2 elif t <= -2.4e+14: tmp = (x / a) * (math.pow(z, y) / t_1) elif t <= -2.6e-63: tmp = (x * math.pow(a, t)) / (a * t_1) elif t <= 80000000000.0: tmp = (x * ((math.pow(z, y) / y) / math.exp(b))) / a else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * exp(b)) t_2 = Float64(x / Float64(y / Float64((a ^ t) / a))) tmp = 0.0 if (t <= -5.2e+69) tmp = t_2; elseif (t <= -2.4e+14) tmp = Float64(Float64(x / a) * Float64((z ^ y) / t_1)); elseif (t <= -2.6e-63) tmp = Float64(Float64(x * (a ^ t)) / Float64(a * t_1)); elseif (t <= 80000000000.0) tmp = Float64(Float64(x * Float64(Float64((z ^ y) / y) / exp(b))) / a); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * exp(b); t_2 = x / (y / ((a ^ t) / a)); tmp = 0.0; if (t <= -5.2e+69) tmp = t_2; elseif (t <= -2.4e+14) tmp = (x / a) * ((z ^ y) / t_1); elseif (t <= -2.6e-63) tmp = (x * (a ^ t)) / (a * t_1); elseif (t <= 80000000000.0) tmp = (x * (((z ^ y) / y) / exp(b))) / a; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(y / N[(N[Power[a, t], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.2e+69], t$95$2, If[LessEqual[t, -2.4e+14], N[(N[(x / a), $MachinePrecision] * N[(N[Power[z, y], $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.6e-63], N[(N[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / N[(a * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 80000000000.0], N[(N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / y), $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot e^{b}\\
t_2 := \frac{x}{\frac{y}{\frac{{a}^{t}}{a}}}\\
\mathbf{if}\;t \leq -5.2 \cdot 10^{+69}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -2.4 \cdot 10^{+14}:\\
\;\;\;\;\frac{x}{a} \cdot \frac{{z}^{y}}{t_1}\\
\mathbf{elif}\;t \leq -2.6 \cdot 10^{-63}:\\
\;\;\;\;\frac{x \cdot {a}^{t}}{a \cdot t_1}\\
\mathbf{elif}\;t \leq 80000000000:\\
\;\;\;\;\frac{x \cdot \frac{\frac{{z}^{y}}{y}}{e^{b}}}{a}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -5.2000000000000004e69 or 8e10 < t Initial program 100.0%
associate-*l/90.3%
*-commutative90.3%
exp-diff65.0%
exp-sum48.5%
*-commutative48.5%
exp-to-pow48.5%
*-commutative48.5%
exp-to-pow48.5%
sub-neg48.5%
metadata-eval48.5%
Simplified48.5%
Taylor expanded in y around 0 69.9%
exp-to-pow69.9%
sub-neg69.9%
metadata-eval69.9%
Simplified69.9%
Taylor expanded in b around 0 84.7%
Simplified84.7%
+-commutative84.7%
unpow-prod-up84.7%
unpow-184.7%
Applied egg-rr84.7%
associate-*r/84.7%
*-rgt-identity84.7%
Simplified84.7%
if -5.2000000000000004e69 < t < -2.4e14Initial program 100.0%
associate-*l/100.0%
*-commutative100.0%
exp-diff81.8%
exp-sum45.5%
*-commutative45.5%
exp-to-pow45.5%
*-commutative45.5%
exp-to-pow45.5%
sub-neg45.5%
metadata-eval45.5%
Simplified45.5%
Taylor expanded in t around 0 91.6%
times-frac91.6%
Simplified91.6%
if -2.4e14 < t < -2.6000000000000001e-63Initial program 98.9%
associate-*l/90.5%
*-commutative90.5%
exp-diff58.7%
exp-sum58.7%
*-commutative58.7%
exp-to-pow58.7%
*-commutative58.7%
exp-to-pow59.3%
sub-neg59.3%
metadata-eval59.3%
Simplified59.3%
unpow-prod-up59.3%
unpow-159.3%
Applied egg-rr59.3%
associate-*r/59.3%
*-rgt-identity59.3%
Simplified59.3%
Taylor expanded in y around 0 80.1%
if -2.6000000000000001e-63 < t < 8e10Initial program 97.4%
associate-*l/85.4%
*-commutative85.4%
exp-diff73.8%
exp-sum72.1%
*-commutative72.1%
exp-to-pow72.1%
*-commutative72.1%
exp-to-pow73.5%
sub-neg73.5%
metadata-eval73.5%
Simplified73.5%
Taylor expanded in t around 0 79.6%
times-frac73.6%
Simplified73.6%
associate-*l/82.1%
associate-/r*82.1%
Applied egg-rr82.1%
Final simplification83.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (/ (pow z y) a)) y)))
(if (<= y -4.2e-10)
t_1
(if (<= y 3.42e-176)
(/ x (/ y (/ (pow a t) a)))
(if (<= y 5.5e+115) (* (/ (pow a (+ t -1.0)) (exp b)) (/ x y)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * (pow(z, y) / a)) / y;
double tmp;
if (y <= -4.2e-10) {
tmp = t_1;
} else if (y <= 3.42e-176) {
tmp = x / (y / (pow(a, t) / a));
} else if (y <= 5.5e+115) {
tmp = (pow(a, (t + -1.0)) / exp(b)) * (x / 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 * ((z ** y) / a)) / y
if (y <= (-4.2d-10)) then
tmp = t_1
else if (y <= 3.42d-176) then
tmp = x / (y / ((a ** t) / a))
else if (y <= 5.5d+115) then
tmp = ((a ** (t + (-1.0d0))) / exp(b)) * (x / 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 * (Math.pow(z, y) / a)) / y;
double tmp;
if (y <= -4.2e-10) {
tmp = t_1;
} else if (y <= 3.42e-176) {
tmp = x / (y / (Math.pow(a, t) / a));
} else if (y <= 5.5e+115) {
tmp = (Math.pow(a, (t + -1.0)) / Math.exp(b)) * (x / y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * (math.pow(z, y) / a)) / y tmp = 0 if y <= -4.2e-10: tmp = t_1 elif y <= 3.42e-176: tmp = x / (y / (math.pow(a, t) / a)) elif y <= 5.5e+115: tmp = (math.pow(a, (t + -1.0)) / math.exp(b)) * (x / y) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * Float64((z ^ y) / a)) / y) tmp = 0.0 if (y <= -4.2e-10) tmp = t_1; elseif (y <= 3.42e-176) tmp = Float64(x / Float64(y / Float64((a ^ t) / a))); elseif (y <= 5.5e+115) tmp = Float64(Float64((a ^ Float64(t + -1.0)) / exp(b)) * Float64(x / y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x * ((z ^ y) / a)) / y; tmp = 0.0; if (y <= -4.2e-10) tmp = t_1; elseif (y <= 3.42e-176) tmp = x / (y / ((a ^ t) / a)); elseif (y <= 5.5e+115) tmp = ((a ^ (t + -1.0)) / exp(b)) * (x / y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -4.2e-10], t$95$1, If[LessEqual[y, 3.42e-176], N[(x / N[(y / N[(N[Power[a, t], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.5e+115], N[(N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{if}\;y \leq -4.2 \cdot 10^{-10}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.42 \cdot 10^{-176}:\\
\;\;\;\;\frac{x}{\frac{y}{\frac{{a}^{t}}{a}}}\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{+115}:\\
\;\;\;\;\frac{{a}^{\left(t + -1\right)}}{e^{b}} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -4.2e-10 or 5.5e115 < y Initial program 99.9%
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 79.9%
*-commutative79.9%
div-exp79.9%
*-commutative79.9%
exp-to-pow79.9%
rem-exp-log80.0%
Simplified80.0%
if -4.2e-10 < y < 3.4199999999999999e-176Initial program 96.7%
associate-*l/87.2%
*-commutative87.2%
exp-diff76.8%
exp-sum76.8%
*-commutative76.8%
exp-to-pow76.8%
*-commutative76.8%
exp-to-pow78.2%
sub-neg78.2%
metadata-eval78.2%
Simplified78.2%
Taylor expanded in y around 0 81.4%
exp-to-pow83.2%
sub-neg83.2%
metadata-eval83.2%
Simplified83.2%
Taylor expanded in b around 0 81.0%
Simplified83.9%
+-commutative83.9%
unpow-prod-up84.0%
unpow-184.0%
Applied egg-rr84.0%
associate-*r/84.0%
*-rgt-identity84.0%
Simplified84.0%
if 3.4199999999999999e-176 < y < 5.5e115Initial program 98.8%
associate-*l/92.5%
*-commutative92.5%
exp-diff74.5%
exp-sum63.0%
*-commutative63.0%
exp-to-pow63.0%
*-commutative63.0%
exp-to-pow64.0%
sub-neg64.0%
metadata-eval64.0%
Simplified64.0%
Taylor expanded in y around 0 75.0%
exp-to-pow76.0%
sub-neg76.0%
metadata-eval76.0%
Simplified76.0%
Final simplification80.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -5.3e+82) (not (<= y 2.05e+214))) (/ (* x (/ (pow z y) a)) 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 <= -5.3e+82) || !(y <= 2.05e+214)) {
tmp = (x * (pow(z, y) / a)) / 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 <= (-5.3d+82)) .or. (.not. (y <= 2.05d+214))) then
tmp = (x * ((z ** y) / a)) / 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 <= -5.3e+82) || !(y <= 2.05e+214)) {
tmp = (x * (Math.pow(z, y) / a)) / 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 <= -5.3e+82) or not (y <= 2.05e+214): tmp = (x * (math.pow(z, y) / a)) / 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 <= -5.3e+82) || !(y <= 2.05e+214)) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / 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 <= -5.3e+82) || ~((y <= 2.05e+214))) tmp = (x * ((z ^ y) / a)) / 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, -5.3e+82], N[Not[LessEqual[y, 2.05e+214]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $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 -5.3 \cdot 10^{+82} \lor \neg \left(y \leq 2.05 \cdot 10^{+214}\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot \left(t + -1\right) - b}}{y}\\
\end{array}
\end{array}
if y < -5.29999999999999977e82 or 2.05e214 < y Initial program 100.0%
Taylor expanded in t around 0 94.4%
+-commutative94.4%
mul-1-neg94.4%
unsub-neg94.4%
Simplified94.4%
Taylor expanded in b around 0 90.2%
*-commutative90.2%
div-exp90.2%
*-commutative90.2%
exp-to-pow90.2%
rem-exp-log90.2%
Simplified90.2%
if -5.29999999999999977e82 < y < 2.05e214Initial program 98.2%
Taylor expanded in y around 0 89.7%
Final simplification89.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (/ (pow z y) a)) y)))
(if (<= y -4.2e-10)
t_1
(if (<= y 1.02e-169)
(/ x (/ y (/ (pow a t) a)))
(if (<= y 2.9e+113) (/ (/ 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 * (pow(z, y) / a)) / y;
double tmp;
if (y <= -4.2e-10) {
tmp = t_1;
} else if (y <= 1.02e-169) {
tmp = x / (y / (pow(a, t) / a));
} else if (y <= 2.9e+113) {
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 * ((z ** y) / a)) / y
if (y <= (-4.2d-10)) then
tmp = t_1
else if (y <= 1.02d-169) then
tmp = x / (y / ((a ** t) / a))
else if (y <= 2.9d+113) 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 * (Math.pow(z, y) / a)) / y;
double tmp;
if (y <= -4.2e-10) {
tmp = t_1;
} else if (y <= 1.02e-169) {
tmp = x / (y / (Math.pow(a, t) / a));
} else if (y <= 2.9e+113) {
tmp = (x / (a * Math.exp(b))) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * (math.pow(z, y) / a)) / y tmp = 0 if y <= -4.2e-10: tmp = t_1 elif y <= 1.02e-169: tmp = x / (y / (math.pow(a, t) / a)) elif y <= 2.9e+113: tmp = (x / (a * math.exp(b))) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * Float64((z ^ y) / a)) / y) tmp = 0.0 if (y <= -4.2e-10) tmp = t_1; elseif (y <= 1.02e-169) tmp = Float64(x / Float64(y / Float64((a ^ t) / a))); elseif (y <= 2.9e+113) 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 * ((z ^ y) / a)) / y; tmp = 0.0; if (y <= -4.2e-10) tmp = t_1; elseif (y <= 1.02e-169) tmp = x / (y / ((a ^ t) / a)); elseif (y <= 2.9e+113) 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[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -4.2e-10], t$95$1, If[LessEqual[y, 1.02e-169], N[(x / N[(y / N[(N[Power[a, t], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.9e+113], 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 \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{if}\;y \leq -4.2 \cdot 10^{-10}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.02 \cdot 10^{-169}:\\
\;\;\;\;\frac{x}{\frac{y}{\frac{{a}^{t}}{a}}}\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{+113}:\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -4.2e-10 or 2.89999999999999984e113 < y Initial program 99.9%
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 79.9%
*-commutative79.9%
div-exp79.9%
*-commutative79.9%
exp-to-pow79.9%
rem-exp-log80.0%
Simplified80.0%
if -4.2e-10 < y < 1.01999999999999996e-169Initial program 96.8%
associate-*l/87.5%
*-commutative87.5%
exp-diff77.4%
exp-sum77.4%
*-commutative77.4%
exp-to-pow77.4%
*-commutative77.4%
exp-to-pow78.7%
sub-neg78.7%
metadata-eval78.7%
Simplified78.7%
Taylor expanded in y around 0 81.9%
exp-to-pow83.6%
sub-neg83.6%
metadata-eval83.6%
Simplified83.6%
Taylor expanded in b around 0 80.3%
Simplified83.1%
+-commutative83.1%
unpow-prod-up83.1%
unpow-183.1%
Applied egg-rr83.1%
associate-*r/83.1%
*-rgt-identity83.1%
Simplified83.1%
if 1.01999999999999996e-169 < y < 2.89999999999999984e113Initial program 98.7%
Taylor expanded in t around 0 80.5%
+-commutative80.5%
mul-1-neg80.5%
unsub-neg80.5%
Simplified80.5%
Taylor expanded in y around 0 70.9%
exp-neg70.9%
associate-*r/70.9%
*-rgt-identity70.9%
+-commutative70.9%
exp-sum70.9%
rem-exp-log72.1%
Simplified72.1%
Final simplification79.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.35e+108) (not (<= b 9e+60))) (/ x (* a (* y (exp b)))) (* (pow a (+ t -1.0)) (/ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.35e+108) || !(b <= 9e+60)) {
tmp = x / (a * (y * exp(b)));
} else {
tmp = pow(a, (t + -1.0)) * (x / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-1.35d+108)) .or. (.not. (b <= 9d+60))) then
tmp = x / (a * (y * exp(b)))
else
tmp = (a ** (t + (-1.0d0))) * (x / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.35e+108) || !(b <= 9e+60)) {
tmp = x / (a * (y * Math.exp(b)));
} else {
tmp = Math.pow(a, (t + -1.0)) * (x / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.35e+108) or not (b <= 9e+60): tmp = x / (a * (y * math.exp(b))) else: tmp = math.pow(a, (t + -1.0)) * (x / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.35e+108) || !(b <= 9e+60)) tmp = Float64(x / Float64(a * Float64(y * exp(b)))); else tmp = Float64((a ^ Float64(t + -1.0)) * Float64(x / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -1.35e+108) || ~((b <= 9e+60))) tmp = x / (a * (y * exp(b))); else tmp = (a ^ (t + -1.0)) * (x / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.35e+108], N[Not[LessEqual[b, 9e+60]], $MachinePrecision]], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.35 \cdot 10^{+108} \lor \neg \left(b \leq 9 \cdot 10^{+60}\right):\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{else}:\\
\;\;\;\;{a}^{\left(t + -1\right)} \cdot \frac{x}{y}\\
\end{array}
\end{array}
if b < -1.35e108 or 9.00000000000000026e60 < b Initial program 100.0%
associate-*l/91.2%
*-commutative91.2%
exp-diff57.1%
exp-sum52.7%
*-commutative52.7%
exp-to-pow52.7%
*-commutative52.7%
exp-to-pow52.7%
sub-neg52.7%
metadata-eval52.7%
Simplified52.7%
Taylor expanded in t around 0 66.0%
times-frac53.9%
Simplified53.9%
Taylor expanded in y around 0 88.1%
if -1.35e108 < b < 9.00000000000000026e60Initial program 97.9%
associate-*l/86.9%
*-commutative86.9%
exp-diff76.0%
exp-sum64.5%
*-commutative64.5%
exp-to-pow64.5%
*-commutative64.5%
exp-to-pow65.6%
sub-neg65.6%
metadata-eval65.6%
Simplified65.6%
Taylor expanded in y around 0 62.9%
exp-to-pow64.1%
sub-neg64.1%
metadata-eval64.1%
Simplified64.1%
Taylor expanded in b around 0 68.4%
*-commutative68.4%
associate-*r/64.6%
exp-to-pow65.6%
sub-neg65.6%
metadata-eval65.6%
+-commutative65.6%
Simplified65.6%
Final simplification73.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -2e+55) (not (<= b 8.4e+60))) (/ x (* a (* y (exp b)))) (/ x (/ y (/ (pow a t) a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -2e+55) || !(b <= 8.4e+60)) {
tmp = x / (a * (y * exp(b)));
} else {
tmp = x / (y / (pow(a, t) / 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 ((b <= (-2d+55)) .or. (.not. (b <= 8.4d+60))) then
tmp = x / (a * (y * exp(b)))
else
tmp = x / (y / ((a ** t) / 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 ((b <= -2e+55) || !(b <= 8.4e+60)) {
tmp = x / (a * (y * Math.exp(b)));
} else {
tmp = x / (y / (Math.pow(a, t) / a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -2e+55) or not (b <= 8.4e+60): tmp = x / (a * (y * math.exp(b))) else: tmp = x / (y / (math.pow(a, t) / a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -2e+55) || !(b <= 8.4e+60)) tmp = Float64(x / Float64(a * Float64(y * exp(b)))); else tmp = Float64(x / Float64(y / Float64((a ^ t) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -2e+55) || ~((b <= 8.4e+60))) tmp = x / (a * (y * exp(b))); else tmp = x / (y / ((a ^ t) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -2e+55], N[Not[LessEqual[b, 8.4e+60]], $MachinePrecision]], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y / N[(N[Power[a, t], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2 \cdot 10^{+55} \lor \neg \left(b \leq 8.4 \cdot 10^{+60}\right):\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{y}{\frac{{a}^{t}}{a}}}\\
\end{array}
\end{array}
if b < -2.00000000000000002e55 or 8.4000000000000004e60 < b Initial program 100.0%
associate-*l/91.5%
*-commutative91.5%
exp-diff57.5%
exp-sum52.8%
*-commutative52.8%
exp-to-pow52.8%
*-commutative52.8%
exp-to-pow52.8%
sub-neg52.8%
metadata-eval52.8%
Simplified52.8%
Taylor expanded in t around 0 65.2%
times-frac51.9%
Simplified51.9%
Taylor expanded in y around 0 85.1%
if -2.00000000000000002e55 < b < 8.4000000000000004e60Initial program 97.7%
associate-*l/86.3%
*-commutative86.3%
exp-diff77.6%
exp-sum65.6%
*-commutative65.6%
exp-to-pow65.6%
*-commutative65.6%
exp-to-pow66.8%
sub-neg66.8%
metadata-eval66.8%
Simplified66.8%
Taylor expanded in y around 0 63.1%
exp-to-pow64.5%
sub-neg64.5%
metadata-eval64.5%
Simplified64.5%
Taylor expanded in b around 0 68.8%
Simplified70.9%
+-commutative70.9%
unpow-prod-up70.9%
unpow-170.9%
Applied egg-rr70.9%
associate-*r/70.9%
*-rgt-identity70.9%
Simplified70.9%
Final simplification76.8%
(FPCore (x y z t a b) :precision binary64 (/ x (* a (* y (exp b)))))
double code(double x, double y, double z, double t, double a, double b) {
return x / (a * (y * exp(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 / (a * (y * exp(b)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / (a * (y * Math.exp(b)));
}
def code(x, y, z, t, a, b): return x / (a * (y * math.exp(b)))
function code(x, y, z, t, a, b) return Float64(x / Float64(a * Float64(y * exp(b)))) end
function tmp = code(x, y, z, t, a, b) tmp = x / (a * (y * exp(b))); end
code[x_, y_, z_, t_, a_, b_] := N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{a \cdot \left(y \cdot e^{b}\right)}
\end{array}
Initial program 98.7%
associate-*l/88.4%
*-commutative88.4%
exp-diff69.3%
exp-sum60.3%
*-commutative60.3%
exp-to-pow60.3%
*-commutative60.3%
exp-to-pow61.0%
sub-neg61.0%
metadata-eval61.0%
Simplified61.0%
Taylor expanded in t around 0 62.7%
times-frac57.2%
Simplified57.2%
Taylor expanded in y around 0 58.7%
Final simplification58.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (/ x y) a)))
(if (<= b -27.0)
(- t_1 (* (/ x y) (/ b a)))
(if (<= b 5.5e-233)
(/ x (* a (+ y (* y b))))
(if (<= b 1.02e-209)
(/ (/ x (* a b)) y)
(if (<= b 8e+57) t_1 (/ x (* a (* y b)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / y) / a;
double tmp;
if (b <= -27.0) {
tmp = t_1 - ((x / y) * (b / a));
} else if (b <= 5.5e-233) {
tmp = x / (a * (y + (y * b)));
} else if (b <= 1.02e-209) {
tmp = (x / (a * b)) / y;
} else if (b <= 8e+57) {
tmp = t_1;
} else {
tmp = x / (a * (y * 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) :: t_1
real(8) :: tmp
t_1 = (x / y) / a
if (b <= (-27.0d0)) then
tmp = t_1 - ((x / y) * (b / a))
else if (b <= 5.5d-233) then
tmp = x / (a * (y + (y * b)))
else if (b <= 1.02d-209) then
tmp = (x / (a * b)) / y
else if (b <= 8d+57) then
tmp = t_1
else
tmp = x / (a * (y * b))
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) / a;
double tmp;
if (b <= -27.0) {
tmp = t_1 - ((x / y) * (b / a));
} else if (b <= 5.5e-233) {
tmp = x / (a * (y + (y * b)));
} else if (b <= 1.02e-209) {
tmp = (x / (a * b)) / y;
} else if (b <= 8e+57) {
tmp = t_1;
} else {
tmp = x / (a * (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x / y) / a tmp = 0 if b <= -27.0: tmp = t_1 - ((x / y) * (b / a)) elif b <= 5.5e-233: tmp = x / (a * (y + (y * b))) elif b <= 1.02e-209: tmp = (x / (a * b)) / y elif b <= 8e+57: tmp = t_1 else: tmp = x / (a * (y * b)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x / y) / a) tmp = 0.0 if (b <= -27.0) tmp = Float64(t_1 - Float64(Float64(x / y) * Float64(b / a))); elseif (b <= 5.5e-233) tmp = Float64(x / Float64(a * Float64(y + Float64(y * b)))); elseif (b <= 1.02e-209) tmp = Float64(Float64(x / Float64(a * b)) / y); elseif (b <= 8e+57) tmp = t_1; else tmp = Float64(x / Float64(a * Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x / y) / a; tmp = 0.0; if (b <= -27.0) tmp = t_1 - ((x / y) * (b / a)); elseif (b <= 5.5e-233) tmp = x / (a * (y + (y * b))); elseif (b <= 1.02e-209) tmp = (x / (a * b)) / y; elseif (b <= 8e+57) tmp = t_1; else tmp = x / (a * (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[b, -27.0], N[(t$95$1 - N[(N[(x / y), $MachinePrecision] * N[(b / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.5e-233], N[(x / N[(a * N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.02e-209], N[(N[(x / N[(a * b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 8e+57], t$95$1, N[(x / N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{y}}{a}\\
\mathbf{if}\;b \leq -27:\\
\;\;\;\;t_1 - \frac{x}{y} \cdot \frac{b}{a}\\
\mathbf{elif}\;b \leq 5.5 \cdot 10^{-233}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\mathbf{elif}\;b \leq 1.02 \cdot 10^{-209}:\\
\;\;\;\;\frac{\frac{x}{a \cdot b}}{y}\\
\mathbf{elif}\;b \leq 8 \cdot 10^{+57}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot b\right)}\\
\end{array}
\end{array}
if b < -27Initial program 99.8%
associate-*l/92.4%
*-commutative92.4%
exp-diff55.5%
exp-sum47.8%
*-commutative47.8%
exp-to-pow47.8%
*-commutative47.8%
exp-to-pow47.8%
sub-neg47.8%
metadata-eval47.8%
Simplified47.8%
Taylor expanded in t around 0 60.3%
times-frac49.5%
Simplified49.5%
Taylor expanded in y around 0 75.9%
Taylor expanded in b around 0 36.2%
+-commutative36.2%
mul-1-neg36.2%
unsub-neg36.2%
associate-/r*37.6%
*-rgt-identity37.6%
associate-*r/37.6%
associate-*l/39.1%
associate-*r/39.1%
*-rgt-identity39.1%
times-frac43.5%
Simplified43.5%
if -27 < b < 5.50000000000000005e-233Initial program 98.6%
associate-*l/86.8%
*-commutative86.8%
exp-diff86.8%
exp-sum73.0%
*-commutative73.0%
exp-to-pow73.0%
*-commutative73.0%
exp-to-pow73.9%
sub-neg73.9%
metadata-eval73.9%
Simplified73.9%
Taylor expanded in t around 0 63.5%
times-frac63.5%
Simplified63.5%
Taylor expanded in y around 0 34.4%
Taylor expanded in b around 0 34.4%
if 5.50000000000000005e-233 < b < 1.01999999999999999e-209Initial program 98.4%
Taylor expanded in t around 0 98.4%
+-commutative98.4%
mul-1-neg98.4%
unsub-neg98.4%
Simplified98.4%
Taylor expanded in y around 0 26.0%
exp-neg26.0%
associate-*r/26.0%
*-rgt-identity26.0%
+-commutative26.0%
exp-sum26.0%
rem-exp-log27.6%
Simplified27.6%
Taylor expanded in b around 0 27.6%
Taylor expanded in b around inf 51.8%
if 1.01999999999999999e-209 < b < 8.00000000000000039e57Initial program 95.4%
associate-*l/82.3%
*-commutative82.3%
exp-diff71.2%
exp-sum60.1%
*-commutative60.1%
exp-to-pow60.1%
*-commutative60.1%
exp-to-pow62.3%
sub-neg62.3%
metadata-eval62.3%
Simplified62.3%
Taylor expanded in t around 0 58.8%
times-frac56.3%
Simplified56.3%
Taylor expanded in y around 0 51.5%
Taylor expanded in b around 0 50.1%
associate-/r*49.9%
*-rgt-identity49.9%
associate-*r/49.9%
associate-*l/53.5%
associate-*r/53.6%
*-rgt-identity53.6%
Simplified53.6%
if 8.00000000000000039e57 < b Initial program 100.0%
Taylor expanded in t around 0 94.9%
+-commutative94.9%
mul-1-neg94.9%
unsub-neg94.9%
Simplified94.9%
Taylor expanded in y around 0 84.7%
exp-neg84.7%
associate-*r/84.7%
*-rgt-identity84.7%
+-commutative84.7%
exp-sum84.7%
rem-exp-log84.7%
Simplified84.7%
Taylor expanded in b around 0 44.9%
Taylor expanded in b around inf 53.1%
*-commutative53.1%
Simplified53.1%
Final simplification44.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b -7.6e-65) (/ (- (/ x a) (* x (/ b a))) y) (/ x (* a (+ y (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -7.6e-65) {
tmp = ((x / a) - (x * (b / a))) / y;
} else {
tmp = x / (a * (y + (y * 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 <= (-7.6d-65)) then
tmp = ((x / a) - (x * (b / a))) / y
else
tmp = x / (a * (y + (y * 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 <= -7.6e-65) {
tmp = ((x / a) - (x * (b / a))) / y;
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -7.6e-65: tmp = ((x / a) - (x * (b / a))) / y else: tmp = x / (a * (y + (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -7.6e-65) tmp = Float64(Float64(Float64(x / a) - Float64(x * Float64(b / a))) / y); else tmp = Float64(x / Float64(a * Float64(y + Float64(y * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -7.6e-65) tmp = ((x / a) - (x * (b / a))) / y; else tmp = x / (a * (y + (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -7.6e-65], N[(N[(N[(x / a), $MachinePrecision] - N[(x * N[(b / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(a * N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.6 \cdot 10^{-65}:\\
\;\;\;\;\frac{\frac{x}{a} - x \cdot \frac{b}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\end{array}
\end{array}
if b < -7.6000000000000003e-65Initial program 99.9%
Taylor expanded in t around 0 87.4%
+-commutative87.4%
mul-1-neg87.4%
unsub-neg87.4%
Simplified87.4%
Taylor expanded in y around 0 70.2%
exp-neg70.2%
associate-*r/70.2%
*-rgt-identity70.2%
+-commutative70.2%
exp-sum70.2%
rem-exp-log70.4%
Simplified70.4%
Taylor expanded in b around 0 17.9%
Taylor expanded in b around 0 45.0%
+-commutative45.0%
mul-1-neg45.0%
unsub-neg45.0%
associate-/l*40.1%
associate-/r/40.2%
Simplified40.2%
if -7.6000000000000003e-65 < b Initial program 98.1%
associate-*l/86.6%
*-commutative86.6%
exp-diff72.5%
exp-sum63.5%
*-commutative63.5%
exp-to-pow63.5%
*-commutative63.5%
exp-to-pow64.5%
sub-neg64.5%
metadata-eval64.5%
Simplified64.5%
Taylor expanded in t around 0 62.9%
times-frac59.4%
Simplified59.4%
Taylor expanded in y around 0 54.6%
Taylor expanded in b around 0 44.0%
Final simplification42.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.35e-62) (/ (- (/ x a) (/ (* x b) a)) y) (/ x (* a (+ y (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.35e-62) {
tmp = ((x / a) - ((x * b) / a)) / y;
} else {
tmp = x / (a * (y + (y * 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.35d-62)) then
tmp = ((x / a) - ((x * b) / a)) / y
else
tmp = x / (a * (y + (y * 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.35e-62) {
tmp = ((x / a) - ((x * b) / a)) / y;
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.35e-62: tmp = ((x / a) - ((x * b) / a)) / y else: tmp = x / (a * (y + (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.35e-62) tmp = Float64(Float64(Float64(x / a) - Float64(Float64(x * b) / a)) / y); else tmp = Float64(x / Float64(a * Float64(y + Float64(y * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.35e-62) tmp = ((x / a) - ((x * b) / a)) / y; else tmp = x / (a * (y + (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.35e-62], N[(N[(N[(x / a), $MachinePrecision] - N[(N[(x * b), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(a * N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.35 \cdot 10^{-62}:\\
\;\;\;\;\frac{\frac{x}{a} - \frac{x \cdot b}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\end{array}
\end{array}
if b < -1.3500000000000001e-62Initial program 99.9%
Taylor expanded in t around 0 87.4%
+-commutative87.4%
mul-1-neg87.4%
unsub-neg87.4%
Simplified87.4%
Taylor expanded in y around 0 70.2%
exp-neg70.2%
associate-*r/70.2%
*-rgt-identity70.2%
+-commutative70.2%
exp-sum70.2%
rem-exp-log70.4%
Simplified70.4%
Taylor expanded in b around 0 17.9%
Taylor expanded in b around 0 45.0%
if -1.3500000000000001e-62 < b Initial program 98.1%
associate-*l/86.6%
*-commutative86.6%
exp-diff72.5%
exp-sum63.5%
*-commutative63.5%
exp-to-pow63.5%
*-commutative63.5%
exp-to-pow64.5%
sub-neg64.5%
metadata-eval64.5%
Simplified64.5%
Taylor expanded in t around 0 62.9%
times-frac59.4%
Simplified59.4%
Taylor expanded in y around 0 54.6%
Taylor expanded in b around 0 44.0%
Final simplification44.3%
(FPCore (x y z t a b) :precision binary64 (if (<= b -24.5) (/ (/ x y) a) (/ x (* a (+ y (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -24.5) {
tmp = (x / y) / a;
} else {
tmp = x / (a * (y + (y * 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 <= (-24.5d0)) then
tmp = (x / y) / a
else
tmp = x / (a * (y + (y * 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 <= -24.5) {
tmp = (x / y) / a;
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -24.5: tmp = (x / y) / a else: tmp = x / (a * (y + (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -24.5) tmp = Float64(Float64(x / y) / a); else tmp = Float64(x / Float64(a * Float64(y + Float64(y * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -24.5) tmp = (x / y) / a; else tmp = x / (a * (y + (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -24.5], N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision], N[(x / N[(a * N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -24.5:\\
\;\;\;\;\frac{\frac{x}{y}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\end{array}
\end{array}
if b < -24.5Initial program 99.8%
associate-*l/92.4%
*-commutative92.4%
exp-diff55.5%
exp-sum47.8%
*-commutative47.8%
exp-to-pow47.8%
*-commutative47.8%
exp-to-pow47.8%
sub-neg47.8%
metadata-eval47.8%
Simplified47.8%
Taylor expanded in t around 0 60.3%
times-frac49.5%
Simplified49.5%
Taylor expanded in y around 0 75.9%
Taylor expanded in b around 0 29.0%
associate-/r*31.9%
*-rgt-identity31.9%
associate-*r/31.9%
associate-*l/34.4%
associate-*r/34.4%
*-rgt-identity34.4%
Simplified34.4%
if -24.5 < b Initial program 98.3%
associate-*l/87.1%
*-commutative87.1%
exp-diff74.0%
exp-sum64.6%
*-commutative64.6%
exp-to-pow64.6%
*-commutative64.6%
exp-to-pow65.5%
sub-neg65.5%
metadata-eval65.5%
Simplified65.5%
Taylor expanded in t around 0 63.6%
times-frac59.8%
Simplified59.8%
Taylor expanded in y around 0 52.9%
Taylor expanded in b around 0 43.1%
Final simplification40.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b 5.5e-42) (/ x (* y a)) (/ x (* a (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 5.5e-42) {
tmp = x / (y * a);
} else {
tmp = x / (a * (y * 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 <= 5.5d-42) then
tmp = x / (y * a)
else
tmp = x / (a * (y * 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 <= 5.5e-42) {
tmp = x / (y * a);
} else {
tmp = x / (a * (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 5.5e-42: tmp = x / (y * a) else: tmp = x / (a * (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 5.5e-42) tmp = Float64(x / Float64(y * a)); else tmp = Float64(x / Float64(a * Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 5.5e-42) tmp = x / (y * a); else tmp = x / (a * (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 5.5e-42], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 5.5 \cdot 10^{-42}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot b\right)}\\
\end{array}
\end{array}
if b < 5.5e-42Initial program 98.3%
associate-*l/88.8%
*-commutative88.8%
exp-diff75.7%
exp-sum63.6%
*-commutative63.6%
exp-to-pow63.6%
*-commutative63.6%
exp-to-pow64.6%
sub-neg64.6%
metadata-eval64.6%
Simplified64.6%
Taylor expanded in t around 0 63.5%
times-frac60.2%
Simplified60.2%
Taylor expanded in y around 0 52.4%
Taylor expanded in b around 0 35.7%
if 5.5e-42 < b Initial program 99.7%
Taylor expanded in t around 0 87.7%
+-commutative87.7%
mul-1-neg87.7%
unsub-neg87.7%
Simplified87.7%
Taylor expanded in y around 0 75.5%
exp-neg75.5%
associate-*r/75.5%
*-rgt-identity75.5%
+-commutative75.5%
exp-sum75.6%
rem-exp-log75.8%
Simplified75.8%
Taylor expanded in b around 0 43.5%
Taylor expanded in b around inf 49.8%
*-commutative49.8%
Simplified49.8%
Final simplification39.7%
(FPCore (x y z t a b) :precision binary64 (if (<= x 1e+136) (/ (/ x y) a) (/ x (* y a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 1e+136) {
tmp = (x / y) / a;
} else {
tmp = 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 (x <= 1d+136) then
tmp = (x / y) / a
else
tmp = 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 (x <= 1e+136) {
tmp = (x / y) / a;
} else {
tmp = x / (y * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= 1e+136: tmp = (x / y) / a else: tmp = x / (y * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= 1e+136) tmp = Float64(Float64(x / y) / a); else tmp = Float64(x / Float64(y * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= 1e+136) tmp = (x / y) / a; else tmp = x / (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, 1e+136], N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 10^{+136}:\\
\;\;\;\;\frac{\frac{x}{y}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\end{array}
\end{array}
if x < 1.00000000000000006e136Initial program 98.6%
associate-*l/90.5%
*-commutative90.5%
exp-diff70.9%
exp-sum62.2%
*-commutative62.2%
exp-to-pow62.2%
*-commutative62.2%
exp-to-pow63.0%
sub-neg63.0%
metadata-eval63.0%
Simplified63.0%
Taylor expanded in t around 0 61.8%
times-frac56.2%
Simplified56.2%
Taylor expanded in y around 0 58.4%
Taylor expanded in b around 0 33.6%
associate-/r*34.4%
*-rgt-identity34.4%
associate-*r/34.4%
associate-*l/36.5%
associate-*r/36.5%
*-rgt-identity36.5%
Simplified36.5%
if 1.00000000000000006e136 < x Initial program 98.8%
associate-*l/76.3%
*-commutative76.3%
exp-diff60.1%
exp-sum49.3%
*-commutative49.3%
exp-to-pow49.3%
*-commutative49.3%
exp-to-pow49.3%
sub-neg49.3%
metadata-eval49.3%
Simplified49.3%
Taylor expanded in t around 0 68.1%
times-frac62.6%
Simplified62.6%
Taylor expanded in y around 0 60.6%
Taylor expanded in b around 0 34.4%
Final simplification36.2%
(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 98.7%
associate-*l/88.4%
*-commutative88.4%
exp-diff69.3%
exp-sum60.3%
*-commutative60.3%
exp-to-pow60.3%
*-commutative60.3%
exp-to-pow61.0%
sub-neg61.0%
metadata-eval61.0%
Simplified61.0%
Taylor expanded in t around 0 62.7%
times-frac57.2%
Simplified57.2%
Taylor expanded in y around 0 58.7%
Taylor expanded in b around 0 33.7%
Final simplification33.7%
(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 2023318
(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))