
(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 20 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)) (* (+ 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}
Initial program 98.8%
Final simplification98.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -5e+18) (not (<= t 11000000000.0))) (/ (* x (exp (- (* (+ t -1.0) (log a)) 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 <= -5e+18) || !(t <= 11000000000.0)) {
tmp = (x * exp((((t + -1.0) * log(a)) - 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 <= (-5d+18)) .or. (.not. (t <= 11000000000.0d0))) then
tmp = (x * exp((((t + (-1.0d0)) * log(a)) - 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 <= -5e+18) || !(t <= 11000000000.0)) {
tmp = (x * Math.exp((((t + -1.0) * Math.log(a)) - 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 <= -5e+18) or not (t <= 11000000000.0): tmp = (x * math.exp((((t + -1.0) * math.log(a)) - 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 <= -5e+18) || !(t <= 11000000000.0)) tmp = Float64(Float64(x * exp(Float64(Float64(Float64(t + -1.0) * log(a)) - 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 <= -5e+18) || ~((t <= 11000000000.0))) tmp = (x * exp((((t + -1.0) * log(a)) - 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, -5e+18], N[Not[LessEqual[t, 11000000000.0]], $MachinePrecision]], N[(N[(x * N[Exp[N[(N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $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 -5 \cdot 10^{+18} \lor \neg \left(t \leq 11000000000\right):\\
\;\;\;\;\frac{x \cdot e^{\left(t + -1\right) \cdot \log a - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z - \log a\right) - b}}{y}\\
\end{array}
\end{array}
if t < -5e18 or 1.1e10 < t Initial program 100.0%
Taylor expanded in y around 0 91.9%
if -5e18 < t < 1.1e10Initial program 97.3%
Taylor expanded in t around 0 97.3%
+-commutative97.3%
mul-1-neg97.3%
unsub-neg97.3%
Simplified97.3%
Final simplification94.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (exp b))) (t_2 (/ (* x (pow a (+ t -1.0))) y)))
(if (<= t -7.2e+98)
t_2
(if (<= t -5.5e+23)
(/ x (* a t_1))
(if (<= t -2.25e-13)
t_2
(if (<= t -1.12e-135)
(/ (/ (* x (pow z y)) a) y)
(if (<= t 10500000000.0) (/ x (/ a (/ (pow z y) t_1))) 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 * pow(a, (t + -1.0))) / y;
double tmp;
if (t <= -7.2e+98) {
tmp = t_2;
} else if (t <= -5.5e+23) {
tmp = x / (a * t_1);
} else if (t <= -2.25e-13) {
tmp = t_2;
} else if (t <= -1.12e-135) {
tmp = ((x * pow(z, y)) / a) / y;
} else if (t <= 10500000000.0) {
tmp = x / (a / (pow(z, y) / 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 = y * exp(b)
t_2 = (x * (a ** (t + (-1.0d0)))) / y
if (t <= (-7.2d+98)) then
tmp = t_2
else if (t <= (-5.5d+23)) then
tmp = x / (a * t_1)
else if (t <= (-2.25d-13)) then
tmp = t_2
else if (t <= (-1.12d-135)) then
tmp = ((x * (z ** y)) / a) / y
else if (t <= 10500000000.0d0) then
tmp = x / (a / ((z ** y) / 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 = y * Math.exp(b);
double t_2 = (x * Math.pow(a, (t + -1.0))) / y;
double tmp;
if (t <= -7.2e+98) {
tmp = t_2;
} else if (t <= -5.5e+23) {
tmp = x / (a * t_1);
} else if (t <= -2.25e-13) {
tmp = t_2;
} else if (t <= -1.12e-135) {
tmp = ((x * Math.pow(z, y)) / a) / y;
} else if (t <= 10500000000.0) {
tmp = x / (a / (Math.pow(z, y) / t_1));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * math.exp(b) t_2 = (x * math.pow(a, (t + -1.0))) / y tmp = 0 if t <= -7.2e+98: tmp = t_2 elif t <= -5.5e+23: tmp = x / (a * t_1) elif t <= -2.25e-13: tmp = t_2 elif t <= -1.12e-135: tmp = ((x * math.pow(z, y)) / a) / y elif t <= 10500000000.0: tmp = x / (a / (math.pow(z, y) / t_1)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * exp(b)) t_2 = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y) tmp = 0.0 if (t <= -7.2e+98) tmp = t_2; elseif (t <= -5.5e+23) tmp = Float64(x / Float64(a * t_1)); elseif (t <= -2.25e-13) tmp = t_2; elseif (t <= -1.12e-135) tmp = Float64(Float64(Float64(x * (z ^ y)) / a) / y); elseif (t <= 10500000000.0) tmp = Float64(x / Float64(a / Float64((z ^ y) / t_1))); 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 * (a ^ (t + -1.0))) / y; tmp = 0.0; if (t <= -7.2e+98) tmp = t_2; elseif (t <= -5.5e+23) tmp = x / (a * t_1); elseif (t <= -2.25e-13) tmp = t_2; elseif (t <= -1.12e-135) tmp = ((x * (z ^ y)) / a) / y; elseif (t <= 10500000000.0) tmp = x / (a / ((z ^ y) / t_1)); 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[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t, -7.2e+98], t$95$2, If[LessEqual[t, -5.5e+23], N[(x / N[(a * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.25e-13], t$95$2, If[LessEqual[t, -1.12e-135], N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 10500000000.0], N[(x / N[(a / N[(N[Power[z, y], $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot e^{b}\\
t_2 := \frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{if}\;t \leq -7.2 \cdot 10^{+98}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -5.5 \cdot 10^{+23}:\\
\;\;\;\;\frac{x}{a \cdot t\_1}\\
\mathbf{elif}\;t \leq -2.25 \cdot 10^{-13}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.12 \cdot 10^{-135}:\\
\;\;\;\;\frac{\frac{x \cdot {z}^{y}}{a}}{y}\\
\mathbf{elif}\;t \leq 10500000000:\\
\;\;\;\;\frac{x}{\frac{a}{\frac{{z}^{y}}{t\_1}}}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -7.19999999999999962e98 or -5.50000000000000004e23 < t < -2.25e-13 or 1.05e10 < t Initial program 100.0%
Taylor expanded in y around 0 92.7%
Taylor expanded in b around 0 84.7%
exp-to-pow84.7%
sub-neg84.7%
metadata-eval84.7%
+-commutative84.7%
Simplified84.7%
if -7.19999999999999962e98 < t < -5.50000000000000004e23Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum69.2%
associate-/r*69.2%
*-commutative69.2%
exp-to-pow69.2%
exp-diff30.8%
*-commutative30.8%
exp-to-pow30.8%
sub-neg30.8%
metadata-eval30.8%
Simplified30.8%
Taylor expanded in t around 0 77.0%
associate-/l*77.2%
Simplified77.2%
Taylor expanded in y around 0 92.4%
if -2.25e-13 < t < -1.12e-135Initial program 99.4%
Taylor expanded in b around 0 84.2%
exp-sum84.2%
*-commutative84.2%
exp-to-pow84.2%
exp-to-pow84.9%
sub-neg84.9%
metadata-eval84.9%
Simplified84.9%
Taylor expanded in t around 0 84.9%
if -1.12e-135 < t < 1.05e10Initial program 96.9%
associate-/l*96.8%
associate--l+96.8%
exp-sum82.1%
associate-/r*82.1%
*-commutative82.1%
exp-to-pow82.1%
exp-diff82.1%
*-commutative82.1%
exp-to-pow83.2%
sub-neg83.2%
metadata-eval83.2%
Simplified83.2%
Taylor expanded in t around 0 83.2%
associate-/l*84.3%
Simplified84.3%
Final simplification84.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3e+193) (not (<= y 5.5e+238))) (/ (/ (* x (pow z y)) a) y) (/ (* x (exp (- (* (+ t -1.0) (log a)) b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3e+193) || !(y <= 5.5e+238)) {
tmp = ((x * pow(z, y)) / a) / y;
} else {
tmp = (x * exp((((t + -1.0) * 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 ((y <= (-3d+193)) .or. (.not. (y <= 5.5d+238))) then
tmp = ((x * (z ** y)) / a) / y
else
tmp = (x * exp((((t + (-1.0d0)) * 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 ((y <= -3e+193) || !(y <= 5.5e+238)) {
tmp = ((x * Math.pow(z, y)) / a) / y;
} else {
tmp = (x * Math.exp((((t + -1.0) * Math.log(a)) - b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3e+193) or not (y <= 5.5e+238): tmp = ((x * math.pow(z, y)) / a) / y else: tmp = (x * math.exp((((t + -1.0) * math.log(a)) - b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3e+193) || !(y <= 5.5e+238)) tmp = Float64(Float64(Float64(x * (z ^ y)) / a) / y); else tmp = Float64(Float64(x * exp(Float64(Float64(Float64(t + -1.0) * log(a)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3e+193) || ~((y <= 5.5e+238))) tmp = ((x * (z ^ y)) / a) / y; else tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3e+193], N[Not[LessEqual[y, 5.5e+238]], $MachinePrecision]], N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3 \cdot 10^{+193} \lor \neg \left(y \leq 5.5 \cdot 10^{+238}\right):\\
\;\;\;\;\frac{\frac{x \cdot {z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(t + -1\right) \cdot \log a - b}}{y}\\
\end{array}
\end{array}
if y < -3e193 or 5.50000000000000012e238 < y Initial program 100.0%
Taylor expanded in b around 0 100.0%
exp-sum61.3%
*-commutative61.3%
exp-to-pow61.3%
exp-to-pow61.3%
sub-neg61.3%
metadata-eval61.3%
Simplified61.3%
Taylor expanded in t around 0 100.0%
if -3e193 < y < 5.50000000000000012e238Initial program 98.7%
Taylor expanded in y around 0 91.0%
Final simplification92.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (pow a (+ t -1.0))) y)) (t_2 (/ x (* a (* y (exp b))))))
(if (<= b -7.5e+100)
t_2
(if (<= b 1.7e-261)
t_1
(if (<= b 9e-171)
(/ (/ (* x (pow z y)) a) y)
(if (<= b 5e+33) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * pow(a, (t + -1.0))) / y;
double t_2 = x / (a * (y * exp(b)));
double tmp;
if (b <= -7.5e+100) {
tmp = t_2;
} else if (b <= 1.7e-261) {
tmp = t_1;
} else if (b <= 9e-171) {
tmp = ((x * pow(z, y)) / a) / y;
} else if (b <= 5e+33) {
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 ** (t + (-1.0d0)))) / y
t_2 = x / (a * (y * exp(b)))
if (b <= (-7.5d+100)) then
tmp = t_2
else if (b <= 1.7d-261) then
tmp = t_1
else if (b <= 9d-171) then
tmp = ((x * (z ** y)) / a) / y
else if (b <= 5d+33) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * Math.pow(a, (t + -1.0))) / y;
double t_2 = x / (a * (y * Math.exp(b)));
double tmp;
if (b <= -7.5e+100) {
tmp = t_2;
} else if (b <= 1.7e-261) {
tmp = t_1;
} else if (b <= 9e-171) {
tmp = ((x * Math.pow(z, y)) / a) / y;
} else if (b <= 5e+33) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * math.pow(a, (t + -1.0))) / y t_2 = x / (a * (y * math.exp(b))) tmp = 0 if b <= -7.5e+100: tmp = t_2 elif b <= 1.7e-261: tmp = t_1 elif b <= 9e-171: tmp = ((x * math.pow(z, y)) / a) / y elif b <= 5e+33: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y) t_2 = Float64(x / Float64(a * Float64(y * exp(b)))) tmp = 0.0 if (b <= -7.5e+100) tmp = t_2; elseif (b <= 1.7e-261) tmp = t_1; elseif (b <= 9e-171) tmp = Float64(Float64(Float64(x * (z ^ y)) / a) / y); elseif (b <= 5e+33) 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 ^ (t + -1.0))) / y; t_2 = x / (a * (y * exp(b))); tmp = 0.0; if (b <= -7.5e+100) tmp = t_2; elseif (b <= 1.7e-261) tmp = t_1; elseif (b <= 9e-171) tmp = ((x * (z ^ y)) / a) / y; elseif (b <= 5e+33) 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[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -7.5e+100], t$95$2, If[LessEqual[b, 1.7e-261], t$95$1, If[LessEqual[b, 9e-171], N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 5e+33], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
t_2 := \frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{if}\;b \leq -7.5 \cdot 10^{+100}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 1.7 \cdot 10^{-261}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 9 \cdot 10^{-171}:\\
\;\;\;\;\frac{\frac{x \cdot {z}^{y}}{a}}{y}\\
\mathbf{elif}\;b \leq 5 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -7.49999999999999983e100 or 4.99999999999999973e33 < b Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum74.4%
associate-/r*74.4%
*-commutative74.4%
exp-to-pow74.4%
exp-diff55.6%
*-commutative55.6%
exp-to-pow55.6%
sub-neg55.6%
metadata-eval55.6%
Simplified55.6%
Taylor expanded in t around 0 66.8%
associate-/l*66.8%
Simplified66.8%
Taylor expanded in y around 0 82.3%
if -7.49999999999999983e100 < b < 1.7e-261 or 9.0000000000000008e-171 < b < 4.99999999999999973e33Initial program 98.4%
Taylor expanded in y around 0 81.6%
Taylor expanded in b around 0 80.3%
exp-to-pow81.1%
sub-neg81.1%
metadata-eval81.1%
+-commutative81.1%
Simplified81.1%
if 1.7e-261 < b < 9.0000000000000008e-171Initial program 94.5%
Taylor expanded in b around 0 94.5%
exp-sum78.7%
*-commutative78.7%
exp-to-pow78.7%
exp-to-pow79.0%
sub-neg79.0%
metadata-eval79.0%
Simplified79.0%
Taylor expanded in t around 0 84.6%
Final simplification81.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1e+112) (not (<= b 6.5e+33))) (/ x (* a (* y (exp b)))) (/ (* x (pow a (+ t -1.0))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1e+112) || !(b <= 6.5e+33)) {
tmp = x / (a * (y * exp(b)));
} else {
tmp = (x * pow(a, (t + -1.0))) / 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 <= (-1d+112)) .or. (.not. (b <= 6.5d+33))) then
tmp = x / (a * (y * exp(b)))
else
tmp = (x * (a ** (t + (-1.0d0)))) / 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 <= -1e+112) || !(b <= 6.5e+33)) {
tmp = x / (a * (y * Math.exp(b)));
} else {
tmp = (x * Math.pow(a, (t + -1.0))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1e+112) or not (b <= 6.5e+33): tmp = x / (a * (y * math.exp(b))) else: tmp = (x * math.pow(a, (t + -1.0))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1e+112) || !(b <= 6.5e+33)) tmp = Float64(x / Float64(a * Float64(y * exp(b)))); else tmp = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -1e+112) || ~((b <= 6.5e+33))) tmp = x / (a * (y * exp(b))); else tmp = (x * (a ^ (t + -1.0))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1e+112], N[Not[LessEqual[b, 6.5e+33]], $MachinePrecision]], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1 \cdot 10^{+112} \lor \neg \left(b \leq 6.5 \cdot 10^{+33}\right):\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\end{array}
\end{array}
if b < -9.9999999999999993e111 or 6.49999999999999993e33 < b Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum75.0%
associate-/r*75.0%
*-commutative75.0%
exp-to-pow75.0%
exp-diff56.0%
*-commutative56.0%
exp-to-pow56.0%
sub-neg56.0%
metadata-eval56.0%
Simplified56.0%
Taylor expanded in t around 0 67.4%
associate-/l*67.4%
Simplified67.4%
Taylor expanded in y around 0 83.0%
if -9.9999999999999993e111 < b < 6.49999999999999993e33Initial program 97.8%
Taylor expanded in y around 0 75.9%
Taylor expanded in b around 0 74.7%
exp-to-pow75.4%
sub-neg75.4%
metadata-eval75.4%
+-commutative75.4%
Simplified75.4%
Final simplification78.9%
(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.8%
associate-/l*98.8%
associate--l+98.8%
exp-sum76.9%
associate-/r*76.9%
*-commutative76.9%
exp-to-pow76.9%
exp-diff64.8%
*-commutative64.8%
exp-to-pow65.3%
sub-neg65.3%
metadata-eval65.3%
Simplified65.3%
Taylor expanded in t around 0 62.9%
associate-/l*64.9%
Simplified64.9%
Taylor expanded in y around 0 61.1%
Final simplification61.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (/ x y))))
(if (<= b -1.9e+134)
(/ (- (/ x y) (/ (* x b) y)) a)
(if (<= b -9000000000.0)
(/ (- (* x a) (* y (* a t_1))) (* y (* a a)))
(if (<= b 8.8e-293)
(/ (- (* a (/ x a)) (* y t_1)) (* y a))
(/ (/ x (+ y (* y b))) a))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (x / y);
double tmp;
if (b <= -1.9e+134) {
tmp = ((x / y) - ((x * b) / y)) / a;
} else if (b <= -9000000000.0) {
tmp = ((x * a) - (y * (a * t_1))) / (y * (a * a));
} else if (b <= 8.8e-293) {
tmp = ((a * (x / a)) - (y * t_1)) / (y * a);
} else {
tmp = (x / (y + (y * b))) / 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) :: t_1
real(8) :: tmp
t_1 = b * (x / y)
if (b <= (-1.9d+134)) then
tmp = ((x / y) - ((x * b) / y)) / a
else if (b <= (-9000000000.0d0)) then
tmp = ((x * a) - (y * (a * t_1))) / (y * (a * a))
else if (b <= 8.8d-293) then
tmp = ((a * (x / a)) - (y * t_1)) / (y * a)
else
tmp = (x / (y + (y * b))) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (x / y);
double tmp;
if (b <= -1.9e+134) {
tmp = ((x / y) - ((x * b) / y)) / a;
} else if (b <= -9000000000.0) {
tmp = ((x * a) - (y * (a * t_1))) / (y * (a * a));
} else if (b <= 8.8e-293) {
tmp = ((a * (x / a)) - (y * t_1)) / (y * a);
} else {
tmp = (x / (y + (y * b))) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (x / y) tmp = 0 if b <= -1.9e+134: tmp = ((x / y) - ((x * b) / y)) / a elif b <= -9000000000.0: tmp = ((x * a) - (y * (a * t_1))) / (y * (a * a)) elif b <= 8.8e-293: tmp = ((a * (x / a)) - (y * t_1)) / (y * a) else: tmp = (x / (y + (y * b))) / a return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(x / y)) tmp = 0.0 if (b <= -1.9e+134) tmp = Float64(Float64(Float64(x / y) - Float64(Float64(x * b) / y)) / a); elseif (b <= -9000000000.0) tmp = Float64(Float64(Float64(x * a) - Float64(y * Float64(a * t_1))) / Float64(y * Float64(a * a))); elseif (b <= 8.8e-293) tmp = Float64(Float64(Float64(a * Float64(x / a)) - Float64(y * t_1)) / Float64(y * a)); else tmp = Float64(Float64(x / Float64(y + Float64(y * b))) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (x / y); tmp = 0.0; if (b <= -1.9e+134) tmp = ((x / y) - ((x * b) / y)) / a; elseif (b <= -9000000000.0) tmp = ((x * a) - (y * (a * t_1))) / (y * (a * a)); elseif (b <= 8.8e-293) tmp = ((a * (x / a)) - (y * t_1)) / (y * a); else tmp = (x / (y + (y * b))) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(x / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.9e+134], N[(N[(N[(x / y), $MachinePrecision] - N[(N[(x * b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[b, -9000000000.0], N[(N[(N[(x * a), $MachinePrecision] - N[(y * N[(a * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8.8e-293], N[(N[(N[(a * N[(x / a), $MachinePrecision]), $MachinePrecision] - N[(y * t$95$1), $MachinePrecision]), $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \frac{x}{y}\\
\mathbf{if}\;b \leq -1.9 \cdot 10^{+134}:\\
\;\;\;\;\frac{\frac{x}{y} - \frac{x \cdot b}{y}}{a}\\
\mathbf{elif}\;b \leq -9000000000:\\
\;\;\;\;\frac{x \cdot a - y \cdot \left(a \cdot t\_1\right)}{y \cdot \left(a \cdot a\right)}\\
\mathbf{elif}\;b \leq 8.8 \cdot 10^{-293}:\\
\;\;\;\;\frac{a \cdot \frac{x}{a} - y \cdot t\_1}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + y \cdot b}}{a}\\
\end{array}
\end{array}
if b < -1.89999999999999999e134Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum75.0%
associate-/r*75.0%
*-commutative75.0%
exp-to-pow75.0%
exp-diff54.2%
*-commutative54.2%
exp-to-pow54.2%
sub-neg54.2%
metadata-eval54.2%
Simplified54.2%
Taylor expanded in t around 0 64.6%
associate-/l*64.6%
Simplified64.6%
*-un-lft-identity64.6%
associate-/r/64.6%
times-frac64.6%
Applied egg-rr64.6%
associate-*l/64.6%
*-lft-identity64.6%
Simplified64.6%
Taylor expanded in y around 0 83.6%
Taylor expanded in b around 0 55.7%
+-commutative55.7%
mul-1-neg55.7%
unsub-neg55.7%
*-commutative55.7%
Simplified55.7%
if -1.89999999999999999e134 < b < -9e9Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum68.4%
associate-/r*68.4%
*-commutative68.4%
exp-to-pow68.4%
exp-diff42.1%
*-commutative42.1%
exp-to-pow42.1%
sub-neg42.1%
metadata-eval42.1%
Simplified42.1%
Taylor expanded in t around 0 58.1%
associate-/l*58.1%
Simplified58.1%
Taylor expanded in y around 0 63.7%
Taylor expanded in b around 0 24.0%
+-commutative24.0%
mul-1-neg24.0%
unsub-neg24.0%
*-commutative24.0%
*-commutative24.0%
times-frac19.1%
Simplified19.1%
associate-*r/19.1%
frac-sub33.6%
*-commutative33.6%
*-commutative33.6%
*-commutative33.6%
Applied egg-rr33.6%
associate-*l*43.7%
associate-*l*48.6%
Simplified48.6%
if -9e9 < b < 8.8e-293Initial program 98.8%
associate-/l*97.2%
associate--l+97.2%
exp-sum87.9%
associate-/r*87.9%
*-commutative87.9%
exp-to-pow87.9%
exp-diff84.1%
*-commutative84.1%
exp-to-pow85.0%
sub-neg85.0%
metadata-eval85.0%
Simplified85.0%
Taylor expanded in t around 0 55.5%
associate-/l*61.2%
Simplified61.2%
Taylor expanded in y around 0 41.8%
Taylor expanded in b around 0 41.6%
+-commutative41.6%
mul-1-neg41.6%
unsub-neg41.6%
*-commutative41.6%
*-commutative41.6%
times-frac36.7%
Simplified36.7%
associate-/r*34.8%
div-inv34.8%
associate-*r/34.8%
frac-sub43.7%
div-inv43.7%
*-commutative43.7%
Applied egg-rr43.7%
if 8.8e-293 < b Initial program 98.3%
associate-/l*98.8%
associate--l+98.8%
exp-sum74.5%
associate-/r*74.5%
*-commutative74.5%
exp-to-pow74.5%
exp-diff64.2%
*-commutative64.2%
exp-to-pow64.7%
sub-neg64.7%
metadata-eval64.7%
Simplified64.7%
Taylor expanded in t around 0 65.9%
associate-/l*67.4%
Simplified67.4%
*-un-lft-identity67.4%
associate-/r/67.4%
times-frac65.8%
Applied egg-rr65.8%
associate-*l/65.8%
*-lft-identity65.8%
Simplified65.8%
Taylor expanded in y around 0 63.1%
Taylor expanded in b around 0 39.5%
Final simplification44.1%
(FPCore (x y z t a b) :precision binary64 (if (<= b 3.1e-292) (/ (- (* a (/ x a)) (* y (* b (/ x y)))) (* y a)) (/ (/ x (+ y (* y b))) a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 3.1e-292) {
tmp = ((a * (x / a)) - (y * (b * (x / y)))) / (y * a);
} else {
tmp = (x / (y + (y * b))) / 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 <= 3.1d-292) then
tmp = ((a * (x / a)) - (y * (b * (x / y)))) / (y * a)
else
tmp = (x / (y + (y * b))) / 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 <= 3.1e-292) {
tmp = ((a * (x / a)) - (y * (b * (x / y)))) / (y * a);
} else {
tmp = (x / (y + (y * b))) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 3.1e-292: tmp = ((a * (x / a)) - (y * (b * (x / y)))) / (y * a) else: tmp = (x / (y + (y * b))) / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 3.1e-292) tmp = Float64(Float64(Float64(a * Float64(x / a)) - Float64(y * Float64(b * Float64(x / y)))) / Float64(y * a)); else tmp = Float64(Float64(x / Float64(y + Float64(y * b))) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 3.1e-292) tmp = ((a * (x / a)) - (y * (b * (x / y)))) / (y * a); else tmp = (x / (y + (y * b))) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 3.1e-292], N[(N[(N[(a * N[(x / a), $MachinePrecision]), $MachinePrecision] - N[(y * N[(b * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 3.1 \cdot 10^{-292}:\\
\;\;\;\;\frac{a \cdot \frac{x}{a} - y \cdot \left(b \cdot \frac{x}{y}\right)}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + y \cdot b}}{a}\\
\end{array}
\end{array}
if b < 3.0999999999999999e-292Initial program 99.5%
associate-/l*98.8%
associate--l+98.8%
exp-sum79.6%
associate-/r*79.6%
*-commutative79.6%
exp-to-pow79.6%
exp-diff65.5%
*-commutative65.5%
exp-to-pow65.9%
sub-neg65.9%
metadata-eval65.9%
Simplified65.9%
Taylor expanded in t around 0 59.6%
associate-/l*62.1%
Simplified62.1%
Taylor expanded in y around 0 62.0%
Taylor expanded in b around 0 41.9%
+-commutative41.9%
mul-1-neg41.9%
unsub-neg41.9%
*-commutative41.9%
*-commutative41.9%
times-frac36.7%
Simplified36.7%
associate-/r*36.7%
div-inv36.7%
associate-*r/37.5%
frac-sub44.4%
div-inv44.4%
*-commutative44.4%
Applied egg-rr44.4%
if 3.0999999999999999e-292 < b Initial program 98.3%
associate-/l*98.8%
associate--l+98.8%
exp-sum74.5%
associate-/r*74.5%
*-commutative74.5%
exp-to-pow74.5%
exp-diff64.2%
*-commutative64.2%
exp-to-pow64.7%
sub-neg64.7%
metadata-eval64.7%
Simplified64.7%
Taylor expanded in t around 0 65.9%
associate-/l*67.4%
Simplified67.4%
*-un-lft-identity67.4%
associate-/r/67.4%
times-frac65.8%
Applied egg-rr65.8%
associate-*l/65.8%
*-lft-identity65.8%
Simplified65.8%
Taylor expanded in y around 0 63.1%
Taylor expanded in b around 0 39.5%
Final simplification41.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.82e+84) (/ (- (/ x y) (/ (* x b) y)) a) (if (<= b 7.4e-284) (* x (/ 1.0 (* y a))) (/ (/ x (+ y (* y b))) a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.82e+84) {
tmp = ((x / y) - ((x * b) / y)) / a;
} else if (b <= 7.4e-284) {
tmp = x * (1.0 / (y * a));
} else {
tmp = (x / (y + (y * b))) / 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 <= (-1.82d+84)) then
tmp = ((x / y) - ((x * b) / y)) / a
else if (b <= 7.4d-284) then
tmp = x * (1.0d0 / (y * a))
else
tmp = (x / (y + (y * b))) / 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 <= -1.82e+84) {
tmp = ((x / y) - ((x * b) / y)) / a;
} else if (b <= 7.4e-284) {
tmp = x * (1.0 / (y * a));
} else {
tmp = (x / (y + (y * b))) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.82e+84: tmp = ((x / y) - ((x * b) / y)) / a elif b <= 7.4e-284: tmp = x * (1.0 / (y * a)) else: tmp = (x / (y + (y * b))) / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.82e+84) tmp = Float64(Float64(Float64(x / y) - Float64(Float64(x * b) / y)) / a); elseif (b <= 7.4e-284) tmp = Float64(x * Float64(1.0 / Float64(y * a))); else tmp = Float64(Float64(x / Float64(y + Float64(y * b))) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.82e+84) tmp = ((x / y) - ((x * b) / y)) / a; elseif (b <= 7.4e-284) tmp = x * (1.0 / (y * a)); else tmp = (x / (y + (y * b))) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.82e+84], N[(N[(N[(x / y), $MachinePrecision] - N[(N[(x * b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[b, 7.4e-284], N[(x * N[(1.0 / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.82 \cdot 10^{+84}:\\
\;\;\;\;\frac{\frac{x}{y} - \frac{x \cdot b}{y}}{a}\\
\mathbf{elif}\;b \leq 7.4 \cdot 10^{-284}:\\
\;\;\;\;x \cdot \frac{1}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + y \cdot b}}{a}\\
\end{array}
\end{array}
if b < -1.8200000000000001e84Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum73.2%
associate-/r*73.2%
*-commutative73.2%
exp-to-pow73.2%
exp-diff50.0%
*-commutative50.0%
exp-to-pow50.0%
sub-neg50.0%
metadata-eval50.0%
Simplified50.0%
Taylor expanded in t around 0 62.6%
associate-/l*62.6%
Simplified62.6%
*-un-lft-identity62.6%
associate-/r/62.6%
times-frac62.6%
Applied egg-rr62.6%
associate-*l/62.6%
*-lft-identity62.6%
Simplified62.6%
Taylor expanded in y around 0 78.9%
Taylor expanded in b around 0 51.8%
+-commutative51.8%
mul-1-neg51.8%
unsub-neg51.8%
*-commutative51.8%
Simplified51.8%
if -1.8200000000000001e84 < b < 7.4000000000000001e-284Initial program 99.0%
Taylor expanded in y around 0 82.9%
Taylor expanded in b around 0 81.4%
exp-to-pow82.2%
sub-neg82.2%
metadata-eval82.2%
+-commutative82.2%
Simplified82.2%
Taylor expanded in t around 0 39.8%
clear-num39.7%
associate-/r/39.8%
*-commutative39.8%
Applied egg-rr39.8%
if 7.4000000000000001e-284 < b Initial program 98.3%
associate-/l*98.8%
associate--l+98.8%
exp-sum74.5%
associate-/r*74.5%
*-commutative74.5%
exp-to-pow74.5%
exp-diff64.2%
*-commutative64.2%
exp-to-pow64.7%
sub-neg64.7%
metadata-eval64.7%
Simplified64.7%
Taylor expanded in t around 0 65.9%
associate-/l*67.4%
Simplified67.4%
*-un-lft-identity67.4%
associate-/r/67.4%
times-frac65.8%
Applied egg-rr65.8%
associate-*l/65.8%
*-lft-identity65.8%
Simplified65.8%
Taylor expanded in y around 0 63.1%
Taylor expanded in b around 0 39.5%
Final simplification42.3%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1e+158) (* (/ x y) (/ (- b) a)) (if (<= b 1e-292) (* x (/ 1.0 (* y a))) (/ 1.0 (* a (/ y x))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1e+158) {
tmp = (x / y) * (-b / a);
} else if (b <= 1e-292) {
tmp = x * (1.0 / (y * a));
} else {
tmp = 1.0 / (a * (y / x));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-1d+158)) then
tmp = (x / y) * (-b / a)
else if (b <= 1d-292) then
tmp = x * (1.0d0 / (y * a))
else
tmp = 1.0d0 / (a * (y / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1e+158) {
tmp = (x / y) * (-b / a);
} else if (b <= 1e-292) {
tmp = x * (1.0 / (y * a));
} else {
tmp = 1.0 / (a * (y / x));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1e+158: tmp = (x / y) * (-b / a) elif b <= 1e-292: tmp = x * (1.0 / (y * a)) else: tmp = 1.0 / (a * (y / x)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1e+158) tmp = Float64(Float64(x / y) * Float64(Float64(-b) / a)); elseif (b <= 1e-292) tmp = Float64(x * Float64(1.0 / Float64(y * a))); else tmp = Float64(1.0 / Float64(a * Float64(y / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1e+158) tmp = (x / y) * (-b / a); elseif (b <= 1e-292) tmp = x * (1.0 / (y * a)); else tmp = 1.0 / (a * (y / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1e+158], N[(N[(x / y), $MachinePrecision] * N[((-b) / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1e-292], N[(x * N[(1.0 / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1 \cdot 10^{+158}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{-b}{a}\\
\mathbf{elif}\;b \leq 10^{-292}:\\
\;\;\;\;x \cdot \frac{1}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{a \cdot \frac{y}{x}}\\
\end{array}
\end{array}
if b < -9.99999999999999953e157Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum78.0%
associate-/r*78.0%
*-commutative78.0%
exp-to-pow78.0%
exp-diff53.7%
*-commutative53.7%
exp-to-pow53.7%
sub-neg53.7%
metadata-eval53.7%
Simplified53.7%
Taylor expanded in t around 0 65.9%
associate-/l*65.9%
Simplified65.9%
Taylor expanded in y around 0 83.2%
Taylor expanded in b around 0 45.4%
+-commutative45.4%
mul-1-neg45.4%
unsub-neg45.4%
*-commutative45.4%
*-commutative45.4%
times-frac45.9%
Simplified45.9%
Taylor expanded in b around inf 45.4%
mul-1-neg45.4%
times-frac45.9%
*-commutative45.9%
distribute-rgt-neg-out45.9%
distribute-neg-frac45.9%
Simplified45.9%
if -9.99999999999999953e157 < b < 1.0000000000000001e-292Initial program 99.2%
Taylor expanded in y around 0 81.2%
Taylor expanded in b around 0 72.6%
exp-to-pow73.2%
sub-neg73.2%
metadata-eval73.2%
+-commutative73.2%
Simplified73.2%
Taylor expanded in t around 0 38.9%
clear-num38.9%
associate-/r/39.0%
*-commutative39.0%
Applied egg-rr39.0%
if 1.0000000000000001e-292 < b Initial program 98.3%
Taylor expanded in y around 0 82.5%
Taylor expanded in b around 0 60.1%
exp-to-pow60.4%
sub-neg60.4%
metadata-eval60.4%
+-commutative60.4%
Simplified60.4%
Taylor expanded in t around 0 27.6%
clear-num28.1%
inv-pow28.1%
*-commutative28.1%
Applied egg-rr28.1%
unpow-128.1%
*-commutative28.1%
associate-*r/32.8%
Simplified32.8%
Final simplification36.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.96e+83) (* (/ x (- a)) (/ b y)) (if (<= b 6e-287) (* x (/ 1.0 (* y a))) (/ 1.0 (* a (/ y x))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.96e+83) {
tmp = (x / -a) * (b / y);
} else if (b <= 6e-287) {
tmp = x * (1.0 / (y * a));
} else {
tmp = 1.0 / (a * (y / x));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-1.96d+83)) then
tmp = (x / -a) * (b / y)
else if (b <= 6d-287) then
tmp = x * (1.0d0 / (y * a))
else
tmp = 1.0d0 / (a * (y / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.96e+83) {
tmp = (x / -a) * (b / y);
} else if (b <= 6e-287) {
tmp = x * (1.0 / (y * a));
} else {
tmp = 1.0 / (a * (y / x));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.96e+83: tmp = (x / -a) * (b / y) elif b <= 6e-287: tmp = x * (1.0 / (y * a)) else: tmp = 1.0 / (a * (y / x)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.96e+83) tmp = Float64(Float64(x / Float64(-a)) * Float64(b / y)); elseif (b <= 6e-287) tmp = Float64(x * Float64(1.0 / Float64(y * a))); else tmp = Float64(1.0 / Float64(a * Float64(y / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.96e+83) tmp = (x / -a) * (b / y); elseif (b <= 6e-287) tmp = x * (1.0 / (y * a)); else tmp = 1.0 / (a * (y / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.96e+83], N[(N[(x / (-a)), $MachinePrecision] * N[(b / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6e-287], N[(x * N[(1.0 / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.96 \cdot 10^{+83}:\\
\;\;\;\;\frac{x}{-a} \cdot \frac{b}{y}\\
\mathbf{elif}\;b \leq 6 \cdot 10^{-287}:\\
\;\;\;\;x \cdot \frac{1}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{a \cdot \frac{y}{x}}\\
\end{array}
\end{array}
if b < -1.96e83Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum73.2%
associate-/r*73.2%
*-commutative73.2%
exp-to-pow73.2%
exp-diff50.0%
*-commutative50.0%
exp-to-pow50.0%
sub-neg50.0%
metadata-eval50.0%
Simplified50.0%
Taylor expanded in t around 0 62.6%
associate-/l*62.6%
Simplified62.6%
Taylor expanded in y around 0 78.9%
Taylor expanded in b around 0 46.4%
+-commutative46.4%
mul-1-neg46.4%
unsub-neg46.4%
*-commutative46.4%
*-commutative46.4%
times-frac40.0%
Simplified40.0%
Taylor expanded in b around inf 46.4%
associate-*r/46.4%
*-commutative46.4%
neg-mul-146.4%
distribute-lft-neg-in46.4%
times-frac44.8%
remove-double-neg44.8%
neg-mul-144.8%
metadata-eval44.8%
times-frac44.8%
*-lft-identity44.8%
neg-mul-144.8%
distribute-frac-neg44.8%
remove-double-neg44.8%
Simplified44.8%
if -1.96e83 < b < 5.99999999999999984e-287Initial program 99.0%
Taylor expanded in y around 0 82.9%
Taylor expanded in b around 0 81.4%
exp-to-pow82.2%
sub-neg82.2%
metadata-eval82.2%
+-commutative82.2%
Simplified82.2%
Taylor expanded in t around 0 39.8%
clear-num39.7%
associate-/r/39.8%
*-commutative39.8%
Applied egg-rr39.8%
if 5.99999999999999984e-287 < b Initial program 98.3%
Taylor expanded in y around 0 82.5%
Taylor expanded in b around 0 60.1%
exp-to-pow60.4%
sub-neg60.4%
metadata-eval60.4%
+-commutative60.4%
Simplified60.4%
Taylor expanded in t around 0 27.6%
clear-num28.1%
inv-pow28.1%
*-commutative28.1%
Applied egg-rr28.1%
unpow-128.1%
*-commutative28.1%
associate-*r/32.8%
Simplified32.8%
Final simplification37.2%
(FPCore (x y z t a b) :precision binary64 (if (<= b -5.5e+83) (/ (* x (- b)) (* y a)) (if (<= b 9.8e-286) (* x (/ 1.0 (* y a))) (/ 1.0 (* a (/ y x))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -5.5e+83) {
tmp = (x * -b) / (y * a);
} else if (b <= 9.8e-286) {
tmp = x * (1.0 / (y * a));
} else {
tmp = 1.0 / (a * (y / x));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-5.5d+83)) then
tmp = (x * -b) / (y * a)
else if (b <= 9.8d-286) then
tmp = x * (1.0d0 / (y * a))
else
tmp = 1.0d0 / (a * (y / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -5.5e+83) {
tmp = (x * -b) / (y * a);
} else if (b <= 9.8e-286) {
tmp = x * (1.0 / (y * a));
} else {
tmp = 1.0 / (a * (y / x));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -5.5e+83: tmp = (x * -b) / (y * a) elif b <= 9.8e-286: tmp = x * (1.0 / (y * a)) else: tmp = 1.0 / (a * (y / x)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -5.5e+83) tmp = Float64(Float64(x * Float64(-b)) / Float64(y * a)); elseif (b <= 9.8e-286) tmp = Float64(x * Float64(1.0 / Float64(y * a))); else tmp = Float64(1.0 / Float64(a * Float64(y / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -5.5e+83) tmp = (x * -b) / (y * a); elseif (b <= 9.8e-286) tmp = x * (1.0 / (y * a)); else tmp = 1.0 / (a * (y / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -5.5e+83], N[(N[(x * (-b)), $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 9.8e-286], N[(x * N[(1.0 / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.5 \cdot 10^{+83}:\\
\;\;\;\;\frac{x \cdot \left(-b\right)}{y \cdot a}\\
\mathbf{elif}\;b \leq 9.8 \cdot 10^{-286}:\\
\;\;\;\;x \cdot \frac{1}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{a \cdot \frac{y}{x}}\\
\end{array}
\end{array}
if b < -5.4999999999999996e83Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum73.2%
associate-/r*73.2%
*-commutative73.2%
exp-to-pow73.2%
exp-diff50.0%
*-commutative50.0%
exp-to-pow50.0%
sub-neg50.0%
metadata-eval50.0%
Simplified50.0%
Taylor expanded in t around 0 62.6%
associate-/l*62.6%
Simplified62.6%
Taylor expanded in y around 0 78.9%
Taylor expanded in b around 0 46.4%
+-commutative46.4%
mul-1-neg46.4%
unsub-neg46.4%
*-commutative46.4%
*-commutative46.4%
times-frac40.0%
Simplified40.0%
Taylor expanded in b around inf 46.4%
if -5.4999999999999996e83 < b < 9.8000000000000002e-286Initial program 99.0%
Taylor expanded in y around 0 82.9%
Taylor expanded in b around 0 81.4%
exp-to-pow82.2%
sub-neg82.2%
metadata-eval82.2%
+-commutative82.2%
Simplified82.2%
Taylor expanded in t around 0 39.8%
clear-num39.7%
associate-/r/39.8%
*-commutative39.8%
Applied egg-rr39.8%
if 9.8000000000000002e-286 < b Initial program 98.3%
Taylor expanded in y around 0 82.5%
Taylor expanded in b around 0 60.1%
exp-to-pow60.4%
sub-neg60.4%
metadata-eval60.4%
+-commutative60.4%
Simplified60.4%
Taylor expanded in t around 0 27.6%
clear-num28.1%
inv-pow28.1%
*-commutative28.1%
Applied egg-rr28.1%
unpow-128.1%
*-commutative28.1%
associate-*r/32.8%
Simplified32.8%
Final simplification37.5%
(FPCore (x y z t a b) :precision binary64 (if (<= b 3.4e-274) (* (/ x (* y a)) (- 1.0 b)) (/ 1.0 (* a (/ y x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 3.4e-274) {
tmp = (x / (y * a)) * (1.0 - b);
} else {
tmp = 1.0 / (a * (y / x));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= 3.4d-274) then
tmp = (x / (y * a)) * (1.0d0 - b)
else
tmp = 1.0d0 / (a * (y / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 3.4e-274) {
tmp = (x / (y * a)) * (1.0 - b);
} else {
tmp = 1.0 / (a * (y / x));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 3.4e-274: tmp = (x / (y * a)) * (1.0 - b) else: tmp = 1.0 / (a * (y / x)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 3.4e-274) tmp = Float64(Float64(x / Float64(y * a)) * Float64(1.0 - b)); else tmp = Float64(1.0 / Float64(a * Float64(y / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 3.4e-274) tmp = (x / (y * a)) * (1.0 - b); else tmp = 1.0 / (a * (y / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 3.4e-274], N[(N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision] * N[(1.0 - b), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 3.4 \cdot 10^{-274}:\\
\;\;\;\;\frac{x}{y \cdot a} \cdot \left(1 - b\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{a \cdot \frac{y}{x}}\\
\end{array}
\end{array}
if b < 3.39999999999999981e-274Initial program 99.3%
associate-/l*98.6%
associate--l+98.6%
exp-sum80.1%
associate-/r*80.1%
*-commutative80.1%
exp-to-pow80.1%
exp-diff66.4%
*-commutative66.4%
exp-to-pow67.0%
sub-neg67.0%
metadata-eval67.0%
Simplified67.0%
Taylor expanded in t around 0 60.1%
associate-/l*62.5%
Simplified62.5%
*-un-lft-identity62.5%
associate-/r/62.5%
times-frac58.7%
Applied egg-rr58.7%
associate-*l/58.7%
*-lft-identity58.7%
Simplified58.7%
Taylor expanded in y around 0 56.3%
Taylor expanded in b around 0 42.2%
+-commutative42.2%
*-commutative42.2%
mul-1-neg42.2%
times-frac37.2%
*-commutative37.2%
sub-neg37.2%
*-rgt-identity37.2%
times-frac42.2%
associate-*l/40.8%
distribute-lft-out--40.8%
*-commutative40.8%
Simplified40.8%
if 3.39999999999999981e-274 < b Initial program 98.4%
Taylor expanded in y around 0 82.1%
Taylor expanded in b around 0 59.0%
exp-to-pow59.2%
sub-neg59.2%
metadata-eval59.2%
+-commutative59.2%
Simplified59.2%
Taylor expanded in t around 0 26.9%
clear-num27.4%
inv-pow27.4%
*-commutative27.4%
Applied egg-rr27.4%
unpow-127.4%
*-commutative27.4%
associate-*r/32.3%
Simplified32.3%
Final simplification36.4%
(FPCore (x y z t a b) :precision binary64 (if (<= b 2e-290) (* (/ x (* y a)) (- 1.0 b)) (/ (/ x (+ y (* y b))) a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 2e-290) {
tmp = (x / (y * a)) * (1.0 - b);
} else {
tmp = (x / (y + (y * b))) / 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-290) then
tmp = (x / (y * a)) * (1.0d0 - b)
else
tmp = (x / (y + (y * b))) / 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-290) {
tmp = (x / (y * a)) * (1.0 - b);
} else {
tmp = (x / (y + (y * b))) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 2e-290: tmp = (x / (y * a)) * (1.0 - b) else: tmp = (x / (y + (y * b))) / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 2e-290) tmp = Float64(Float64(x / Float64(y * a)) * Float64(1.0 - b)); else tmp = Float64(Float64(x / Float64(y + Float64(y * b))) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 2e-290) tmp = (x / (y * a)) * (1.0 - b); else tmp = (x / (y + (y * b))) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 2e-290], N[(N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision] * N[(1.0 - b), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2 \cdot 10^{-290}:\\
\;\;\;\;\frac{x}{y \cdot a} \cdot \left(1 - b\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + y \cdot b}}{a}\\
\end{array}
\end{array}
if b < 2.0000000000000001e-290Initial program 99.5%
associate-/l*98.8%
associate--l+98.8%
exp-sum79.6%
associate-/r*79.6%
*-commutative79.6%
exp-to-pow79.6%
exp-diff65.5%
*-commutative65.5%
exp-to-pow65.9%
sub-neg65.9%
metadata-eval65.9%
Simplified65.9%
Taylor expanded in t around 0 59.6%
associate-/l*62.1%
Simplified62.1%
*-un-lft-identity62.1%
associate-/r/62.1%
times-frac58.1%
Applied egg-rr58.1%
associate-*l/58.1%
*-lft-identity58.1%
Simplified58.1%
Taylor expanded in y around 0 56.5%
Taylor expanded in b around 0 41.9%
+-commutative41.9%
*-commutative41.9%
mul-1-neg41.9%
times-frac36.7%
*-commutative36.7%
sub-neg36.7%
*-rgt-identity36.7%
times-frac41.9%
associate-*l/40.5%
distribute-lft-out--40.5%
*-commutative40.5%
Simplified40.5%
if 2.0000000000000001e-290 < b Initial program 98.3%
associate-/l*98.8%
associate--l+98.8%
exp-sum74.5%
associate-/r*74.5%
*-commutative74.5%
exp-to-pow74.5%
exp-diff64.2%
*-commutative64.2%
exp-to-pow64.7%
sub-neg64.7%
metadata-eval64.7%
Simplified64.7%
Taylor expanded in t around 0 65.9%
associate-/l*67.4%
Simplified67.4%
*-un-lft-identity67.4%
associate-/r/67.4%
times-frac65.8%
Applied egg-rr65.8%
associate-*l/65.8%
*-lft-identity65.8%
Simplified65.8%
Taylor expanded in y around 0 63.1%
Taylor expanded in b around 0 39.5%
Final simplification40.0%
(FPCore (x y z t a b) :precision binary64 (if (<= b 7.8e-289) (* x (/ 1.0 (* y a))) (/ (/ x y) a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 7.8e-289) {
tmp = x * (1.0 / (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 (b <= 7.8d-289) then
tmp = x * (1.0d0 / (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 (b <= 7.8e-289) {
tmp = x * (1.0 / (y * a));
} else {
tmp = (x / y) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 7.8e-289: tmp = x * (1.0 / (y * a)) else: tmp = (x / y) / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 7.8e-289) tmp = Float64(x * Float64(1.0 / Float64(y * a))); else tmp = Float64(Float64(x / y) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 7.8e-289) tmp = x * (1.0 / (y * a)); else tmp = (x / y) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 7.8e-289], N[(x * N[(1.0 / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 7.8 \cdot 10^{-289}:\\
\;\;\;\;x \cdot \frac{1}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{a}\\
\end{array}
\end{array}
if b < 7.7999999999999997e-289Initial program 99.5%
Taylor expanded in y around 0 86.8%
Taylor expanded in b around 0 68.1%
exp-to-pow68.5%
sub-neg68.5%
metadata-eval68.5%
+-commutative68.5%
Simplified68.5%
Taylor expanded in t around 0 32.4%
clear-num32.4%
associate-/r/32.4%
*-commutative32.4%
Applied egg-rr32.4%
if 7.7999999999999997e-289 < b Initial program 98.3%
associate-/l*98.8%
associate--l+98.8%
exp-sum74.5%
associate-/r*74.5%
*-commutative74.5%
exp-to-pow74.5%
exp-diff64.2%
*-commutative64.2%
exp-to-pow64.7%
sub-neg64.7%
metadata-eval64.7%
Simplified64.7%
Taylor expanded in t around 0 65.9%
associate-/l*67.4%
Simplified67.4%
*-un-lft-identity67.4%
associate-/r/67.4%
times-frac65.8%
Applied egg-rr65.8%
associate-*l/65.8%
*-lft-identity65.8%
Simplified65.8%
Taylor expanded in y around 0 63.1%
Taylor expanded in b around 0 31.2%
Final simplification31.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b 7.8e-284) (* x (/ 1.0 (* y a))) (/ 1.0 (* a (/ y x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 7.8e-284) {
tmp = x * (1.0 / (y * a));
} else {
tmp = 1.0 / (a * (y / x));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= 7.8d-284) then
tmp = x * (1.0d0 / (y * a))
else
tmp = 1.0d0 / (a * (y / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 7.8e-284) {
tmp = x * (1.0 / (y * a));
} else {
tmp = 1.0 / (a * (y / x));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 7.8e-284: tmp = x * (1.0 / (y * a)) else: tmp = 1.0 / (a * (y / x)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 7.8e-284) tmp = Float64(x * Float64(1.0 / Float64(y * a))); else tmp = Float64(1.0 / Float64(a * Float64(y / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 7.8e-284) tmp = x * (1.0 / (y * a)); else tmp = 1.0 / (a * (y / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 7.8e-284], N[(x * N[(1.0 / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 7.8 \cdot 10^{-284}:\\
\;\;\;\;x \cdot \frac{1}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{a \cdot \frac{y}{x}}\\
\end{array}
\end{array}
if b < 7.7999999999999994e-284Initial program 99.5%
Taylor expanded in y around 0 86.8%
Taylor expanded in b around 0 68.1%
exp-to-pow68.5%
sub-neg68.5%
metadata-eval68.5%
+-commutative68.5%
Simplified68.5%
Taylor expanded in t around 0 32.4%
clear-num32.4%
associate-/r/32.4%
*-commutative32.4%
Applied egg-rr32.4%
if 7.7999999999999994e-284 < b Initial program 98.3%
Taylor expanded in y around 0 82.5%
Taylor expanded in b around 0 60.1%
exp-to-pow60.4%
sub-neg60.4%
metadata-eval60.4%
+-commutative60.4%
Simplified60.4%
Taylor expanded in t around 0 27.6%
clear-num28.1%
inv-pow28.1%
*-commutative28.1%
Applied egg-rr28.1%
unpow-128.1%
*-commutative28.1%
associate-*r/32.8%
Simplified32.8%
Final simplification32.7%
(FPCore (x y z t a b) :precision binary64 (if (<= a 1.45e-153) (/ (/ x a) y) (/ x (* y a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 1.45e-153) {
tmp = (x / a) / y;
} 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 (a <= 1.45d-153) then
tmp = (x / a) / y
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 (a <= 1.45e-153) {
tmp = (x / a) / y;
} else {
tmp = x / (y * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= 1.45e-153: tmp = (x / a) / y else: tmp = x / (y * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= 1.45e-153) tmp = Float64(Float64(x / a) / y); 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 (a <= 1.45e-153) tmp = (x / a) / y; else tmp = x / (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, 1.45e-153], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.45 \cdot 10^{-153}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\end{array}
\end{array}
if a < 1.45000000000000001e-153Initial program 99.4%
Taylor expanded in y around 0 80.6%
Taylor expanded in b around 0 64.1%
exp-to-pow64.5%
sub-neg64.5%
metadata-eval64.5%
+-commutative64.5%
Simplified64.5%
Taylor expanded in t around 0 33.2%
if 1.45000000000000001e-153 < a Initial program 98.6%
Taylor expanded in y around 0 86.0%
Taylor expanded in b around 0 63.7%
exp-to-pow64.1%
sub-neg64.1%
metadata-eval64.1%
+-commutative64.1%
Simplified64.1%
Taylor expanded in t around 0 31.0%
Final simplification31.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b 3.5e-283) (/ x (* y a)) (/ (/ x y) a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 3.5e-283) {
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 (b <= 3.5d-283) 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 (b <= 3.5e-283) {
tmp = x / (y * a);
} else {
tmp = (x / y) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 3.5e-283: tmp = x / (y * a) else: tmp = (x / y) / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 3.5e-283) tmp = Float64(x / Float64(y * a)); else tmp = Float64(Float64(x / y) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 3.5e-283) tmp = x / (y * a); else tmp = (x / y) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 3.5e-283], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 3.5 \cdot 10^{-283}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{a}\\
\end{array}
\end{array}
if b < 3.4999999999999999e-283Initial program 99.5%
Taylor expanded in y around 0 86.8%
Taylor expanded in b around 0 68.1%
exp-to-pow68.5%
sub-neg68.5%
metadata-eval68.5%
+-commutative68.5%
Simplified68.5%
Taylor expanded in t around 0 32.4%
if 3.4999999999999999e-283 < b Initial program 98.3%
associate-/l*98.8%
associate--l+98.8%
exp-sum74.5%
associate-/r*74.5%
*-commutative74.5%
exp-to-pow74.5%
exp-diff64.2%
*-commutative64.2%
exp-to-pow64.7%
sub-neg64.7%
metadata-eval64.7%
Simplified64.7%
Taylor expanded in t around 0 65.9%
associate-/l*67.4%
Simplified67.4%
*-un-lft-identity67.4%
associate-/r/67.4%
times-frac65.8%
Applied egg-rr65.8%
associate-*l/65.8%
*-lft-identity65.8%
Simplified65.8%
Taylor expanded in y around 0 63.1%
Taylor expanded in b around 0 31.2%
Final simplification31.8%
(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.8%
Taylor expanded in y around 0 84.5%
Taylor expanded in b around 0 63.8%
exp-to-pow64.2%
sub-neg64.2%
metadata-eval64.2%
+-commutative64.2%
Simplified64.2%
Taylor expanded in t around 0 29.8%
Final simplification29.8%
(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 2024031
(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))