
(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 19 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.9%
Final simplification98.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= (- t 1.0) -1e+125)
(/ (* x (pow a t)) (* y a))
(if (<= (- t 1.0) 1e+81)
(* x (/ (pow z y) (* 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 ((t - 1.0) <= -1e+125) {
tmp = (x * pow(a, t)) / (y * a);
} else if ((t - 1.0) <= 1e+81) {
tmp = x * (pow(z, y) / (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 ((t - 1.0d0) <= (-1d+125)) then
tmp = (x * (a ** t)) / (y * a)
else if ((t - 1.0d0) <= 1d+81) then
tmp = x * ((z ** y) / (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 ((t - 1.0) <= -1e+125) {
tmp = (x * Math.pow(a, t)) / (y * a);
} else if ((t - 1.0) <= 1e+81) {
tmp = x * (Math.pow(z, y) / (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 (t - 1.0) <= -1e+125: tmp = (x * math.pow(a, t)) / (y * a) elif (t - 1.0) <= 1e+81: tmp = x * (math.pow(z, y) / (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 (Float64(t - 1.0) <= -1e+125) tmp = Float64(Float64(x * (a ^ t)) / Float64(y * a)); elseif (Float64(t - 1.0) <= 1e+81) tmp = Float64(x * Float64((z ^ y) / 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 ((t - 1.0) <= -1e+125) tmp = (x * (a ^ t)) / (y * a); elseif ((t - 1.0) <= 1e+81) tmp = x * ((z ^ y) / (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[LessEqual[N[(t - 1.0), $MachinePrecision], -1e+125], N[(N[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(t - 1.0), $MachinePrecision], 1e+81], N[(x * N[(N[Power[z, y], $MachinePrecision] / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $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}\;t - 1 \leq -1 \cdot 10^{+125}:\\
\;\;\;\;\frac{x \cdot {a}^{t}}{y \cdot a}\\
\mathbf{elif}\;t - 1 \leq 10^{+81}:\\
\;\;\;\;x \cdot \frac{{z}^{y}}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t - 1\right)}}{y}\\
\end{array}
\end{array}
if (-.f64 t 1) < -9.9999999999999992e124Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum73.3%
associate-/l*73.3%
associate-/r/73.3%
exp-neg73.3%
associate-*r/73.3%
Simplified64.4%
Taylor expanded in y around 0 71.1%
Taylor expanded in b around 0 97.8%
if -9.9999999999999992e124 < (-.f64 t 1) < 9.99999999999999921e80Initial program 98.3%
associate-*r/97.9%
sub-neg97.9%
exp-sum81.3%
associate-/l*81.3%
associate-/r/78.5%
exp-neg78.5%
associate-*r/78.5%
Simplified76.0%
Taylor expanded in t around 0 79.5%
if 9.99999999999999921e80 < (-.f64 t 1) Initial program 100.0%
Taylor expanded in y around 0 89.1%
Taylor expanded in b around 0 83.6%
Final simplification83.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= (- t 1.0) -1e+127)
(/ (* x (pow a t)) (* y a))
(if (<= (- t 1.0) 1e+81)
(/ (* (/ (pow z y) a) (/ x (exp b))) y)
(/ (* x (pow a (- t 1.0))) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t - 1.0) <= -1e+127) {
tmp = (x * pow(a, t)) / (y * a);
} else if ((t - 1.0) <= 1e+81) {
tmp = ((pow(z, y) / a) * (x / exp(b))) / y;
} 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 ((t - 1.0d0) <= (-1d+127)) then
tmp = (x * (a ** t)) / (y * a)
else if ((t - 1.0d0) <= 1d+81) then
tmp = (((z ** y) / a) * (x / exp(b))) / y
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 ((t - 1.0) <= -1e+127) {
tmp = (x * Math.pow(a, t)) / (y * a);
} else if ((t - 1.0) <= 1e+81) {
tmp = ((Math.pow(z, y) / a) * (x / Math.exp(b))) / y;
} else {
tmp = (x * Math.pow(a, (t - 1.0))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t - 1.0) <= -1e+127: tmp = (x * math.pow(a, t)) / (y * a) elif (t - 1.0) <= 1e+81: tmp = ((math.pow(z, y) / a) * (x / math.exp(b))) / y else: tmp = (x * math.pow(a, (t - 1.0))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(t - 1.0) <= -1e+127) tmp = Float64(Float64(x * (a ^ t)) / Float64(y * a)); elseif (Float64(t - 1.0) <= 1e+81) tmp = Float64(Float64(Float64((z ^ y) / a) * Float64(x / exp(b))) / y); 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 ((t - 1.0) <= -1e+127) tmp = (x * (a ^ t)) / (y * a); elseif ((t - 1.0) <= 1e+81) tmp = (((z ^ y) / a) * (x / exp(b))) / y; else tmp = (x * (a ^ (t - 1.0))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(t - 1.0), $MachinePrecision], -1e+127], N[(N[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(t - 1.0), $MachinePrecision], 1e+81], N[(N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] * N[(x / N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t - 1 \leq -1 \cdot 10^{+127}:\\
\;\;\;\;\frac{x \cdot {a}^{t}}{y \cdot a}\\
\mathbf{elif}\;t - 1 \leq 10^{+81}:\\
\;\;\;\;\frac{\frac{{z}^{y}}{a} \cdot \frac{x}{e^{b}}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t - 1\right)}}{y}\\
\end{array}
\end{array}
if (-.f64 t 1) < -9.99999999999999955e126Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum72.7%
associate-/l*72.7%
associate-/r/72.7%
exp-neg72.7%
associate-*r/72.7%
Simplified63.6%
Taylor expanded in y around 0 70.5%
Taylor expanded in b around 0 97.8%
if -9.99999999999999955e126 < (-.f64 t 1) < 9.99999999999999921e80Initial program 98.3%
associate-*r/97.9%
sub-neg97.9%
exp-sum81.4%
associate-/l*81.4%
associate-/r/78.6%
exp-neg78.6%
associate-*r/78.6%
Simplified76.1%
Taylor expanded in t around 0 79.2%
*-commutative79.2%
associate-*l*79.2%
*-commutative79.2%
times-frac77.5%
*-commutative77.5%
associate-/r*77.5%
Simplified77.5%
associate-*r/83.0%
Applied egg-rr83.0%
if 9.99999999999999921e80 < (-.f64 t 1) Initial program 100.0%
Taylor expanded in y around 0 89.1%
Taylor expanded in b around 0 83.6%
Final simplification85.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.65e+103) (not (<= y 3.3e+131))) (/ (/ (* 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 <= -1.65e+103) || !(y <= 3.3e+131)) {
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 <= (-1.65d+103)) .or. (.not. (y <= 3.3d+131))) 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 <= -1.65e+103) || !(y <= 3.3e+131)) {
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 <= -1.65e+103) or not (y <= 3.3e+131): 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 <= -1.65e+103) || !(y <= 3.3e+131)) 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 <= -1.65e+103) || ~((y <= 3.3e+131))) 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, -1.65e+103], N[Not[LessEqual[y, 3.3e+131]], $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 -1.65 \cdot 10^{+103} \lor \neg \left(y \leq 3.3 \cdot 10^{+131}\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 < -1.65000000000000004e103 or 3.2999999999999998e131 < y Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum74.4%
associate-/l*74.4%
associate-/r/74.4%
exp-neg74.4%
associate-*r/74.4%
Simplified60.3%
Taylor expanded in t around 0 65.4%
*-commutative65.4%
associate-*l*65.4%
*-commutative65.4%
times-frac65.4%
*-commutative65.4%
associate-/r*65.4%
Simplified65.4%
associate-*r/74.4%
Applied egg-rr74.4%
Taylor expanded in b around 0 91.2%
if -1.65000000000000004e103 < y < 3.2999999999999998e131Initial program 98.4%
Taylor expanded in y around 0 92.1%
Final simplification91.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (* a (* y (exp b)))))
(t_2 (/ (/ (* x (pow z y)) a) y))
(t_3 (/ (* x (pow a (- t 1.0))) y)))
(if (<= y -4.2e+21)
t_2
(if (<= y -1.3e-292)
t_1
(if (<= y 9.5e-290)
t_3
(if (<= y 3.4e-191) t_1 (if (<= y 5.2e-26) t_3 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a * (y * exp(b)));
double t_2 = ((x * pow(z, y)) / a) / y;
double t_3 = (x * pow(a, (t - 1.0))) / y;
double tmp;
if (y <= -4.2e+21) {
tmp = t_2;
} else if (y <= -1.3e-292) {
tmp = t_1;
} else if (y <= 9.5e-290) {
tmp = t_3;
} else if (y <= 3.4e-191) {
tmp = t_1;
} else if (y <= 5.2e-26) {
tmp = t_3;
} 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) :: t_3
real(8) :: tmp
t_1 = x / (a * (y * exp(b)))
t_2 = ((x * (z ** y)) / a) / y
t_3 = (x * (a ** (t - 1.0d0))) / y
if (y <= (-4.2d+21)) then
tmp = t_2
else if (y <= (-1.3d-292)) then
tmp = t_1
else if (y <= 9.5d-290) then
tmp = t_3
else if (y <= 3.4d-191) then
tmp = t_1
else if (y <= 5.2d-26) then
tmp = t_3
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a * (y * Math.exp(b)));
double t_2 = ((x * Math.pow(z, y)) / a) / y;
double t_3 = (x * Math.pow(a, (t - 1.0))) / y;
double tmp;
if (y <= -4.2e+21) {
tmp = t_2;
} else if (y <= -1.3e-292) {
tmp = t_1;
} else if (y <= 9.5e-290) {
tmp = t_3;
} else if (y <= 3.4e-191) {
tmp = t_1;
} else if (y <= 5.2e-26) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a * (y * math.exp(b))) t_2 = ((x * math.pow(z, y)) / a) / y t_3 = (x * math.pow(a, (t - 1.0))) / y tmp = 0 if y <= -4.2e+21: tmp = t_2 elif y <= -1.3e-292: tmp = t_1 elif y <= 9.5e-290: tmp = t_3 elif y <= 3.4e-191: tmp = t_1 elif y <= 5.2e-26: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a * Float64(y * exp(b)))) t_2 = Float64(Float64(Float64(x * (z ^ y)) / a) / y) t_3 = Float64(Float64(x * (a ^ Float64(t - 1.0))) / y) tmp = 0.0 if (y <= -4.2e+21) tmp = t_2; elseif (y <= -1.3e-292) tmp = t_1; elseif (y <= 9.5e-290) tmp = t_3; elseif (y <= 3.4e-191) tmp = t_1; elseif (y <= 5.2e-26) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a * (y * exp(b))); t_2 = ((x * (z ^ y)) / a) / y; t_3 = (x * (a ^ (t - 1.0))) / y; tmp = 0.0; if (y <= -4.2e+21) tmp = t_2; elseif (y <= -1.3e-292) tmp = t_1; elseif (y <= 9.5e-290) tmp = t_3; elseif (y <= 3.4e-191) tmp = t_1; elseif (y <= 5.2e-26) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -4.2e+21], t$95$2, If[LessEqual[y, -1.3e-292], t$95$1, If[LessEqual[y, 9.5e-290], t$95$3, If[LessEqual[y, 3.4e-191], t$95$1, If[LessEqual[y, 5.2e-26], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
t_2 := \frac{\frac{x \cdot {z}^{y}}{a}}{y}\\
t_3 := \frac{x \cdot {a}^{\left(t - 1\right)}}{y}\\
\mathbf{if}\;y \leq -4.2 \cdot 10^{+21}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{-292}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{-290}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{-191}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{-26}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -4.2e21 or 5.2000000000000002e-26 < y Initial program 99.9%
associate-*r/99.9%
sub-neg99.9%
exp-sum71.9%
associate-/l*71.9%
associate-/r/71.9%
exp-neg71.9%
associate-*r/71.9%
Simplified57.6%
Taylor expanded in t around 0 60.9%
*-commutative60.9%
associate-*l*60.9%
*-commutative60.9%
times-frac60.1%
*-commutative60.1%
associate-/r*60.1%
Simplified60.1%
associate-*r/66.5%
Applied egg-rr66.5%
Taylor expanded in b around 0 83.5%
if -4.2e21 < y < -1.30000000000000007e-292 or 9.50000000000000023e-290 < y < 3.39999999999999994e-191Initial program 97.4%
associate-*r/97.4%
sub-neg97.4%
exp-sum86.2%
associate-/l*86.2%
associate-/r/79.9%
exp-neg79.9%
associate-*r/79.9%
Simplified81.2%
Taylor expanded in y around 0 88.9%
associate-/r*82.8%
associate-*r/80.3%
Simplified80.3%
Taylor expanded in t around 0 86.8%
if -1.30000000000000007e-292 < y < 9.50000000000000023e-290 or 3.39999999999999994e-191 < y < 5.2000000000000002e-26Initial program 98.8%
Taylor expanded in y around 0 98.8%
Taylor expanded in b around 0 82.0%
Final simplification84.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (* a (* y (exp b))))))
(if (<= b -4.1e+34)
t_1
(if (<= b 4.8e-113)
(* x (/ (pow z y) (* y a)))
(if (<= b 9.5e+24) (/ (* x (pow a (- t 1.0))) y) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a * (y * exp(b)));
double tmp;
if (b <= -4.1e+34) {
tmp = t_1;
} else if (b <= 4.8e-113) {
tmp = x * (pow(z, y) / (y * a));
} else if (b <= 9.5e+24) {
tmp = (x * pow(a, (t - 1.0))) / 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 / (a * (y * exp(b)))
if (b <= (-4.1d+34)) then
tmp = t_1
else if (b <= 4.8d-113) then
tmp = x * ((z ** y) / (y * a))
else if (b <= 9.5d+24) then
tmp = (x * (a ** (t - 1.0d0))) / 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 / (a * (y * Math.exp(b)));
double tmp;
if (b <= -4.1e+34) {
tmp = t_1;
} else if (b <= 4.8e-113) {
tmp = x * (Math.pow(z, y) / (y * a));
} else if (b <= 9.5e+24) {
tmp = (x * Math.pow(a, (t - 1.0))) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a * (y * math.exp(b))) tmp = 0 if b <= -4.1e+34: tmp = t_1 elif b <= 4.8e-113: tmp = x * (math.pow(z, y) / (y * a)) elif b <= 9.5e+24: tmp = (x * math.pow(a, (t - 1.0))) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a * Float64(y * exp(b)))) tmp = 0.0 if (b <= -4.1e+34) tmp = t_1; elseif (b <= 4.8e-113) tmp = Float64(x * Float64((z ^ y) / Float64(y * a))); elseif (b <= 9.5e+24) tmp = Float64(Float64(x * (a ^ Float64(t - 1.0))) / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a * (y * exp(b))); tmp = 0.0; if (b <= -4.1e+34) tmp = t_1; elseif (b <= 4.8e-113) tmp = x * ((z ^ y) / (y * a)); elseif (b <= 9.5e+24) tmp = (x * (a ^ (t - 1.0))) / y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4.1e+34], t$95$1, If[LessEqual[b, 4.8e-113], N[(x * N[(N[Power[z, y], $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 9.5e+24], N[(N[(x * N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{if}\;b \leq -4.1 \cdot 10^{+34}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 4.8 \cdot 10^{-113}:\\
\;\;\;\;x \cdot \frac{{z}^{y}}{y \cdot a}\\
\mathbf{elif}\;b \leq 9.5 \cdot 10^{+24}:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t - 1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if b < -4.0999999999999998e34 or 9.5000000000000001e24 < b Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum65.8%
associate-/l*65.8%
associate-/r/61.5%
exp-neg61.5%
associate-*r/61.5%
Simplified56.4%
Taylor expanded in y around 0 72.8%
associate-/r*67.6%
associate-*r/66.8%
Simplified66.8%
Taylor expanded in t around 0 81.5%
if -4.0999999999999998e34 < b < 4.80000000000000024e-113Initial program 97.6%
associate-*r/97.6%
sub-neg97.6%
exp-sum93.9%
associate-/l*93.9%
associate-/r/93.9%
exp-neg93.9%
associate-*r/93.9%
Simplified85.4%
Taylor expanded in t around 0 71.5%
Taylor expanded in b around 0 73.7%
if 4.80000000000000024e-113 < b < 9.5000000000000001e24Initial program 99.2%
Taylor expanded in y around 0 82.4%
Taylor expanded in b around 0 81.7%
Final simplification78.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -7.5e+34) (not (<= b 1.05e+25))) (/ x (* a (* y (exp b)))) (* x (/ (pow z y) (* y a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -7.5e+34) || !(b <= 1.05e+25)) {
tmp = x / (a * (y * exp(b)));
} else {
tmp = x * (pow(z, y) / (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.5d+34)) .or. (.not. (b <= 1.05d+25))) then
tmp = x / (a * (y * exp(b)))
else
tmp = x * ((z ** y) / (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.5e+34) || !(b <= 1.05e+25)) {
tmp = x / (a * (y * Math.exp(b)));
} else {
tmp = x * (Math.pow(z, y) / (y * a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -7.5e+34) or not (b <= 1.05e+25): tmp = x / (a * (y * math.exp(b))) else: tmp = x * (math.pow(z, y) / (y * a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -7.5e+34) || !(b <= 1.05e+25)) tmp = Float64(x / Float64(a * Float64(y * exp(b)))); else tmp = Float64(x * Float64((z ^ y) / Float64(y * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -7.5e+34) || ~((b <= 1.05e+25))) tmp = x / (a * (y * exp(b))); else tmp = x * ((z ^ y) / (y * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -7.5e+34], N[Not[LessEqual[b, 1.05e+25]], $MachinePrecision]], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Power[z, y], $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.5 \cdot 10^{+34} \lor \neg \left(b \leq 1.05 \cdot 10^{+25}\right):\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{{z}^{y}}{y \cdot a}\\
\end{array}
\end{array}
if b < -7.49999999999999976e34 or 1.05e25 < b Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum65.8%
associate-/l*65.8%
associate-/r/61.5%
exp-neg61.5%
associate-*r/61.5%
Simplified56.4%
Taylor expanded in y around 0 72.8%
associate-/r*67.6%
associate-*r/66.8%
Simplified66.8%
Taylor expanded in t around 0 81.5%
if -7.49999999999999976e34 < b < 1.05e25Initial program 97.9%
associate-*r/97.3%
sub-neg97.3%
exp-sum90.9%
associate-/l*90.9%
associate-/r/90.9%
exp-neg90.9%
associate-*r/90.9%
Simplified83.4%
Taylor expanded in t around 0 69.0%
Taylor expanded in b around 0 71.9%
Final simplification76.3%
(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.9%
associate-*r/98.5%
sub-neg98.5%
exp-sum79.4%
associate-/l*79.4%
associate-/r/77.5%
exp-neg77.5%
associate-*r/77.5%
Simplified71.1%
Taylor expanded in y around 0 67.4%
associate-/r*65.5%
associate-*r/60.8%
Simplified60.8%
Taylor expanded in t around 0 59.5%
Final simplification59.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (* a (+ y (* y b))))))
(if (<= y -1e+197)
t_1
(if (<= y -5.2e-192)
(+ (- (/ x (* y a)) (/ (* x (/ b a)) y)) (* (/ (* b b) y) (/ x a)))
(if (<= y 1.7e+19)
(/ (/ x a) y)
(if (<= y 7.8e+192) t_1 (/ (- (/ x a) (/ (* x b) a)) y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a * (y + (y * b)));
double tmp;
if (y <= -1e+197) {
tmp = t_1;
} else if (y <= -5.2e-192) {
tmp = ((x / (y * a)) - ((x * (b / a)) / y)) + (((b * b) / y) * (x / a));
} else if (y <= 1.7e+19) {
tmp = (x / a) / y;
} else if (y <= 7.8e+192) {
tmp = t_1;
} else {
tmp = ((x / a) - ((x * b) / a)) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (a * (y + (y * b)))
if (y <= (-1d+197)) then
tmp = t_1
else if (y <= (-5.2d-192)) then
tmp = ((x / (y * a)) - ((x * (b / a)) / y)) + (((b * b) / y) * (x / a))
else if (y <= 1.7d+19) then
tmp = (x / a) / y
else if (y <= 7.8d+192) then
tmp = t_1
else
tmp = ((x / a) - ((x * b) / a)) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a * (y + (y * b)));
double tmp;
if (y <= -1e+197) {
tmp = t_1;
} else if (y <= -5.2e-192) {
tmp = ((x / (y * a)) - ((x * (b / a)) / y)) + (((b * b) / y) * (x / a));
} else if (y <= 1.7e+19) {
tmp = (x / a) / y;
} else if (y <= 7.8e+192) {
tmp = t_1;
} else {
tmp = ((x / a) - ((x * b) / a)) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a * (y + (y * b))) tmp = 0 if y <= -1e+197: tmp = t_1 elif y <= -5.2e-192: tmp = ((x / (y * a)) - ((x * (b / a)) / y)) + (((b * b) / y) * (x / a)) elif y <= 1.7e+19: tmp = (x / a) / y elif y <= 7.8e+192: tmp = t_1 else: tmp = ((x / a) - ((x * b) / a)) / y return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a * Float64(y + Float64(y * b)))) tmp = 0.0 if (y <= -1e+197) tmp = t_1; elseif (y <= -5.2e-192) tmp = Float64(Float64(Float64(x / Float64(y * a)) - Float64(Float64(x * Float64(b / a)) / y)) + Float64(Float64(Float64(b * b) / y) * Float64(x / a))); elseif (y <= 1.7e+19) tmp = Float64(Float64(x / a) / y); elseif (y <= 7.8e+192) tmp = t_1; else tmp = Float64(Float64(Float64(x / a) - Float64(Float64(x * b) / a)) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a * (y + (y * b))); tmp = 0.0; if (y <= -1e+197) tmp = t_1; elseif (y <= -5.2e-192) tmp = ((x / (y * a)) - ((x * (b / a)) / y)) + (((b * b) / y) * (x / a)); elseif (y <= 1.7e+19) tmp = (x / a) / y; elseif (y <= 7.8e+192) tmp = t_1; else tmp = ((x / a) - ((x * b) / a)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a * N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1e+197], t$95$1, If[LessEqual[y, -5.2e-192], N[(N[(N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(b / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(b * b), $MachinePrecision] / y), $MachinePrecision] * N[(x / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.7e+19], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 7.8e+192], t$95$1, N[(N[(N[(x / a), $MachinePrecision] - N[(N[(x * b), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\mathbf{if}\;y \leq -1 \cdot 10^{+197}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -5.2 \cdot 10^{-192}:\\
\;\;\;\;\left(\frac{x}{y \cdot a} - \frac{x \cdot \frac{b}{a}}{y}\right) + \frac{b \cdot b}{y} \cdot \frac{x}{a}\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{+19}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{+192}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a} - \frac{x \cdot b}{a}}{y}\\
\end{array}
\end{array}
if y < -9.9999999999999995e196 or 1.7e19 < y < 7.7999999999999996e192Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum59.0%
associate-/l*59.0%
associate-/r/59.0%
exp-neg59.0%
associate-*r/59.0%
Simplified45.9%
Taylor expanded in y around 0 40.2%
associate-/r*41.7%
associate-*r/36.8%
Simplified36.8%
Taylor expanded in t around 0 35.9%
Taylor expanded in b around 0 34.5%
if -9.9999999999999995e196 < y < -5.2000000000000003e-192Initial program 98.2%
associate-*r/99.4%
sub-neg99.4%
exp-sum84.1%
associate-/l*84.1%
associate-/r/81.3%
exp-neg81.3%
associate-*r/81.3%
Simplified75.0%
Taylor expanded in y around 0 71.4%
associate-/r*70.1%
associate-*r/64.5%
Simplified64.5%
Taylor expanded in t around 0 64.9%
Taylor expanded in b around 0 21.6%
Taylor expanded in b around 0 33.5%
+-commutative33.5%
*-commutative33.5%
associate-*r/33.5%
*-commutative33.5%
associate-*r/33.5%
mul-1-neg33.5%
times-frac32.0%
distribute-lft-neg-out32.0%
cancel-sign-sub-inv32.0%
*-commutative32.0%
associate-*l/33.4%
*-commutative33.4%
times-frac38.9%
unpow238.9%
Simplified38.9%
if -5.2000000000000003e-192 < y < 1.7e19Initial program 98.4%
associate-*r/96.7%
sub-neg96.7%
exp-sum87.8%
associate-/l*87.8%
associate-/r/84.8%
exp-neg84.8%
associate-*r/84.8%
Simplified86.0%
Taylor expanded in y around 0 87.5%
associate-/r*82.6%
associate-*r/78.6%
Simplified78.6%
Taylor expanded in t around 0 73.3%
Taylor expanded in b around 0 44.1%
associate-/r*47.9%
Simplified47.9%
if 7.7999999999999996e192 < y Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum82.6%
associate-/l*82.6%
associate-/r/82.6%
exp-neg82.6%
associate-*r/82.6%
Simplified60.9%
Taylor expanded in y around 0 39.9%
associate-/r*40.5%
associate-*r/36.1%
Simplified36.1%
Taylor expanded in t around 0 44.9%
Taylor expanded in b around 0 19.1%
Taylor expanded in y around 0 44.8%
Final simplification41.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -0.1)
(* (/ b a) (- (/ x y)))
(if (<= b -1.15e-118)
(* (/ x a) (/ 1.0 y))
(if (<= b 4.8e-220) (* (/ x (* y a)) (- 1.0 b)) (/ x (* y (* a b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -0.1) {
tmp = (b / a) * -(x / y);
} else if (b <= -1.15e-118) {
tmp = (x / a) * (1.0 / y);
} else if (b <= 4.8e-220) {
tmp = (x / (y * a)) * (1.0 - b);
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-0.1d0)) then
tmp = (b / a) * -(x / y)
else if (b <= (-1.15d-118)) then
tmp = (x / a) * (1.0d0 / y)
else if (b <= 4.8d-220) then
tmp = (x / (y * a)) * (1.0d0 - b)
else
tmp = x / (y * (a * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -0.1) {
tmp = (b / a) * -(x / y);
} else if (b <= -1.15e-118) {
tmp = (x / a) * (1.0 / y);
} else if (b <= 4.8e-220) {
tmp = (x / (y * a)) * (1.0 - b);
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -0.1: tmp = (b / a) * -(x / y) elif b <= -1.15e-118: tmp = (x / a) * (1.0 / y) elif b <= 4.8e-220: tmp = (x / (y * a)) * (1.0 - b) else: tmp = x / (y * (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -0.1) tmp = Float64(Float64(b / a) * Float64(-Float64(x / y))); elseif (b <= -1.15e-118) tmp = Float64(Float64(x / a) * Float64(1.0 / y)); elseif (b <= 4.8e-220) tmp = Float64(Float64(x / Float64(y * a)) * Float64(1.0 - b)); else tmp = Float64(x / Float64(y * Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -0.1) tmp = (b / a) * -(x / y); elseif (b <= -1.15e-118) tmp = (x / a) * (1.0 / y); elseif (b <= 4.8e-220) tmp = (x / (y * a)) * (1.0 - b); else tmp = x / (y * (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -0.1], N[(N[(b / a), $MachinePrecision] * (-N[(x / y), $MachinePrecision])), $MachinePrecision], If[LessEqual[b, -1.15e-118], N[(N[(x / a), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.8e-220], N[(N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision] * N[(1.0 - b), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -0.1:\\
\;\;\;\;\frac{b}{a} \cdot \left(-\frac{x}{y}\right)\\
\mathbf{elif}\;b \leq -1.15 \cdot 10^{-118}:\\
\;\;\;\;\frac{x}{a} \cdot \frac{1}{y}\\
\mathbf{elif}\;b \leq 4.8 \cdot 10^{-220}:\\
\;\;\;\;\frac{x}{y \cdot a} \cdot \left(1 - b\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot b\right)}\\
\end{array}
\end{array}
if b < -0.10000000000000001Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum62.9%
associate-/l*62.9%
associate-/r/62.9%
exp-neg62.9%
associate-*r/62.9%
Simplified61.4%
Taylor expanded in y around 0 67.3%
associate-/r*65.9%
associate-*r/64.4%
Simplified64.4%
Taylor expanded in t around 0 74.7%
Taylor expanded in b around 0 32.2%
Taylor expanded in b around inf 32.2%
mul-1-neg32.2%
times-frac34.8%
distribute-lft-neg-out34.8%
*-commutative34.8%
distribute-neg-frac34.8%
Simplified34.8%
if -0.10000000000000001 < b < -1.1500000000000001e-118Initial program 97.8%
associate-*r/94.7%
sub-neg94.7%
exp-sum94.8%
associate-/l*94.8%
associate-/r/94.8%
exp-neg94.8%
associate-*r/94.8%
Simplified89.2%
Taylor expanded in y around 0 71.8%
associate-/r*71.7%
associate-*r/64.6%
Simplified64.6%
Taylor expanded in t around 0 47.7%
Taylor expanded in b around 0 45.3%
*-commutative45.3%
Simplified45.3%
*-rgt-identity45.3%
*-commutative45.3%
times-frac55.5%
Applied egg-rr55.5%
if -1.1500000000000001e-118 < b < 4.8000000000000003e-220Initial program 96.3%
associate-*r/98.0%
sub-neg98.0%
exp-sum98.0%
associate-/l*98.0%
associate-/r/98.0%
exp-neg98.0%
associate-*r/98.0%
Simplified86.2%
Taylor expanded in y around 0 68.5%
associate-/r*65.1%
associate-*r/55.3%
Simplified55.3%
Taylor expanded in t around 0 44.1%
Taylor expanded in b around 0 44.1%
Taylor expanded in b around 0 40.2%
*-commutative40.2%
metadata-eval40.2%
associate-*r/42.2%
cancel-sign-sub-inv42.2%
*-lft-identity42.2%
*-lft-identity42.2%
distribute-rgt-out--44.1%
Simplified44.1%
if 4.8000000000000003e-220 < b Initial program 99.6%
associate-*r/98.8%
sub-neg98.8%
exp-sum77.4%
associate-/l*77.4%
associate-/r/72.7%
exp-neg72.7%
associate-*r/72.7%
Simplified65.5%
Taylor expanded in y around 0 65.9%
associate-/r*63.9%
associate-*r/60.2%
Simplified60.2%
Taylor expanded in t around 0 59.9%
Taylor expanded in b around 0 31.3%
Taylor expanded in b around inf 31.4%
associate-*r*29.5%
*-commutative29.5%
associate-*r*34.8%
Simplified34.8%
Final simplification38.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (* a (* y b)))))
(if (<= y -7500000.0)
t_1
(if (<= y -7e-217) (/ x (* y a)) (if (<= y 3.2e+19) (/ (/ x a) y) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a * (y * b));
double tmp;
if (y <= -7500000.0) {
tmp = t_1;
} else if (y <= -7e-217) {
tmp = x / (y * a);
} else if (y <= 3.2e+19) {
tmp = (x / a) / 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 / (a * (y * b))
if (y <= (-7500000.0d0)) then
tmp = t_1
else if (y <= (-7d-217)) then
tmp = x / (y * a)
else if (y <= 3.2d+19) then
tmp = (x / a) / 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 / (a * (y * b));
double tmp;
if (y <= -7500000.0) {
tmp = t_1;
} else if (y <= -7e-217) {
tmp = x / (y * a);
} else if (y <= 3.2e+19) {
tmp = (x / a) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a * (y * b)) tmp = 0 if y <= -7500000.0: tmp = t_1 elif y <= -7e-217: tmp = x / (y * a) elif y <= 3.2e+19: tmp = (x / a) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a * Float64(y * b))) tmp = 0.0 if (y <= -7500000.0) tmp = t_1; elseif (y <= -7e-217) tmp = Float64(x / Float64(y * a)); elseif (y <= 3.2e+19) tmp = Float64(Float64(x / a) / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a * (y * b)); tmp = 0.0; if (y <= -7500000.0) tmp = t_1; elseif (y <= -7e-217) tmp = x / (y * a); elseif (y <= 3.2e+19) tmp = (x / a) / y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7500000.0], t$95$1, If[LessEqual[y, -7e-217], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.2e+19], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a \cdot \left(y \cdot b\right)}\\
\mathbf{if}\;y \leq -7500000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -7 \cdot 10^{-217}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{+19}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -7.5e6 or 3.2e19 < y Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum70.8%
associate-/l*70.8%
associate-/r/70.8%
exp-neg70.8%
associate-*r/70.8%
Simplified55.8%
Taylor expanded in y around 0 45.1%
associate-/r*46.0%
associate-*r/41.0%
Simplified41.0%
Taylor expanded in t around 0 41.5%
Taylor expanded in b around 0 26.1%
Taylor expanded in b around inf 26.5%
if -7.5e6 < y < -7e-217Initial program 96.5%
associate-*r/98.6%
sub-neg98.6%
exp-sum86.4%
associate-/l*86.4%
associate-/r/81.5%
exp-neg81.5%
associate-*r/81.5%
Simplified82.9%
Taylor expanded in y around 0 87.8%
associate-/r*83.2%
associate-*r/78.3%
Simplified78.3%
Taylor expanded in t around 0 83.5%
Taylor expanded in b around 0 45.8%
*-commutative45.8%
Simplified45.8%
if -7e-217 < y < 3.2e19Initial program 98.5%
associate-*r/96.7%
sub-neg96.7%
exp-sum87.2%
associate-/l*87.2%
associate-/r/84.1%
exp-neg84.1%
associate-*r/84.1%
Simplified85.3%
Taylor expanded in y around 0 86.9%
associate-/r*82.6%
associate-*r/78.4%
Simplified78.4%
Taylor expanded in t around 0 71.9%
Taylor expanded in b around 0 42.2%
associate-/r*47.1%
Simplified47.1%
Final simplification37.3%
(FPCore (x y z t a b) :precision binary64 (if (<= b 2.4e-218) (/ (- (/ x a) (* x (/ b a))) y) (/ x (* y (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 2.4e-218) {
tmp = ((x / a) - (x * (b / a))) / y;
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= 2.4d-218) then
tmp = ((x / a) - (x * (b / a))) / y
else
tmp = x / (y * (a * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 2.4e-218) {
tmp = ((x / a) - (x * (b / a))) / y;
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 2.4e-218: tmp = ((x / a) - (x * (b / a))) / y else: tmp = x / (y * (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 2.4e-218) tmp = Float64(Float64(Float64(x / a) - Float64(x * Float64(b / a))) / y); else tmp = Float64(x / Float64(y * Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 2.4e-218) tmp = ((x / a) - (x * (b / a))) / y; else tmp = x / (y * (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 2.4e-218], N[(N[(N[(x / a), $MachinePrecision] - N[(x * N[(b / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.4 \cdot 10^{-218}:\\
\;\;\;\;\frac{\frac{x}{a} - x \cdot \frac{b}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot b\right)}\\
\end{array}
\end{array}
if b < 2.4000000000000001e-218Initial program 98.3%
associate-*r/98.3%
sub-neg98.3%
exp-sum80.9%
associate-/l*80.9%
associate-/r/80.9%
exp-neg80.9%
associate-*r/80.9%
Simplified75.1%
Taylor expanded in y around 0 68.5%
associate-/r*66.7%
associate-*r/61.3%
Simplified61.3%
Taylor expanded in t around 0 59.2%
Taylor expanded in b around 0 37.5%
Taylor expanded in y around 0 43.4%
+-commutative43.4%
mul-1-neg43.4%
*-commutative43.4%
unsub-neg43.4%
associate-*r/42.7%
Simplified42.7%
if 2.4000000000000001e-218 < b Initial program 99.6%
associate-*r/98.8%
sub-neg98.8%
exp-sum77.4%
associate-/l*77.4%
associate-/r/72.7%
exp-neg72.7%
associate-*r/72.7%
Simplified65.5%
Taylor expanded in y around 0 65.9%
associate-/r*63.9%
associate-*r/60.2%
Simplified60.2%
Taylor expanded in t around 0 59.9%
Taylor expanded in b around 0 31.3%
Taylor expanded in b around inf 31.4%
associate-*r*29.5%
*-commutative29.5%
associate-*r*34.8%
Simplified34.8%
Final simplification39.4%
(FPCore (x y z t a b) :precision binary64 (if (<= b 1.7e-217) (/ (- (/ x a) (/ (* x b) a)) y) (/ x (* y (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 1.7e-217) {
tmp = ((x / a) - ((x * b) / a)) / y;
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= 1.7d-217) then
tmp = ((x / a) - ((x * b) / a)) / y
else
tmp = x / (y * (a * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 1.7e-217) {
tmp = ((x / a) - ((x * b) / a)) / y;
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 1.7e-217: tmp = ((x / a) - ((x * b) / a)) / y else: tmp = x / (y * (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 1.7e-217) tmp = Float64(Float64(Float64(x / a) - Float64(Float64(x * b) / a)) / y); else tmp = Float64(x / Float64(y * Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 1.7e-217) tmp = ((x / a) - ((x * b) / a)) / y; else tmp = x / (y * (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 1.7e-217], N[(N[(N[(x / a), $MachinePrecision] - N[(N[(x * b), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.7 \cdot 10^{-217}:\\
\;\;\;\;\frac{\frac{x}{a} - \frac{x \cdot b}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot b\right)}\\
\end{array}
\end{array}
if b < 1.70000000000000008e-217Initial program 98.3%
associate-*r/98.3%
sub-neg98.3%
exp-sum80.9%
associate-/l*80.9%
associate-/r/80.9%
exp-neg80.9%
associate-*r/80.9%
Simplified75.1%
Taylor expanded in y around 0 68.5%
associate-/r*66.7%
associate-*r/61.3%
Simplified61.3%
Taylor expanded in t around 0 59.2%
Taylor expanded in b around 0 37.5%
Taylor expanded in y around 0 43.4%
if 1.70000000000000008e-217 < b Initial program 99.6%
associate-*r/98.8%
sub-neg98.8%
exp-sum77.4%
associate-/l*77.4%
associate-/r/72.7%
exp-neg72.7%
associate-*r/72.7%
Simplified65.5%
Taylor expanded in y around 0 65.9%
associate-/r*63.9%
associate-*r/60.2%
Simplified60.2%
Taylor expanded in t around 0 59.9%
Taylor expanded in b around 0 31.3%
Taylor expanded in b around inf 31.4%
associate-*r*29.5%
*-commutative29.5%
associate-*r*34.8%
Simplified34.8%
Final simplification39.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b -4.8e+154) (* (/ x a) (/ b (- y))) (if (<= b 1.95e-218) (* (/ x a) (/ 1.0 y)) (/ x (* y (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -4.8e+154) {
tmp = (x / a) * (b / -y);
} else if (b <= 1.95e-218) {
tmp = (x / a) * (1.0 / y);
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-4.8d+154)) then
tmp = (x / a) * (b / -y)
else if (b <= 1.95d-218) then
tmp = (x / a) * (1.0d0 / y)
else
tmp = x / (y * (a * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -4.8e+154) {
tmp = (x / a) * (b / -y);
} else if (b <= 1.95e-218) {
tmp = (x / a) * (1.0 / y);
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -4.8e+154: tmp = (x / a) * (b / -y) elif b <= 1.95e-218: tmp = (x / a) * (1.0 / y) else: tmp = x / (y * (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -4.8e+154) tmp = Float64(Float64(x / a) * Float64(b / Float64(-y))); elseif (b <= 1.95e-218) tmp = Float64(Float64(x / a) * Float64(1.0 / y)); else tmp = Float64(x / Float64(y * Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -4.8e+154) tmp = (x / a) * (b / -y); elseif (b <= 1.95e-218) tmp = (x / a) * (1.0 / y); else tmp = x / (y * (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -4.8e+154], N[(N[(x / a), $MachinePrecision] * N[(b / (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.95e-218], N[(N[(x / a), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.8 \cdot 10^{+154}:\\
\;\;\;\;\frac{x}{a} \cdot \frac{b}{-y}\\
\mathbf{elif}\;b \leq 1.95 \cdot 10^{-218}:\\
\;\;\;\;\frac{x}{a} \cdot \frac{1}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot b\right)}\\
\end{array}
\end{array}
if b < -4.8000000000000003e154Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum62.9%
associate-/l*62.9%
associate-/r/62.9%
exp-neg62.9%
associate-*r/62.9%
Simplified62.9%
Taylor expanded in y around 0 74.4%
associate-/r*71.5%
associate-*r/68.7%
Simplified68.7%
Taylor expanded in t around 0 83.1%
Taylor expanded in b around 0 36.3%
Taylor expanded in b around inf 36.3%
associate-*r/36.3%
*-commutative36.3%
associate-*r/36.3%
mul-1-neg36.3%
associate-*r/33.7%
*-lft-identity33.7%
metadata-eval33.7%
*-commutative33.7%
associate-/r*33.9%
times-frac33.9%
associate-*r/33.9%
neg-mul-133.9%
neg-mul-133.9%
associate-/r*33.7%
associate-*r/36.3%
distribute-rgt-neg-out36.3%
*-commutative36.3%
distribute-neg-frac36.3%
associate-/l*41.8%
distribute-neg-frac41.8%
distribute-frac-neg41.8%
Simplified36.6%
if -4.8000000000000003e154 < b < 1.95e-218Initial program 97.8%
associate-*r/97.8%
sub-neg97.8%
exp-sum86.4%
associate-/l*86.4%
associate-/r/86.4%
exp-neg86.4%
associate-*r/86.4%
Simplified78.9%
Taylor expanded in y around 0 66.7%
associate-/r*65.2%
associate-*r/59.1%
Simplified59.1%
Taylor expanded in t around 0 51.8%
Taylor expanded in b around 0 39.4%
*-commutative39.4%
Simplified39.4%
*-rgt-identity39.4%
*-commutative39.4%
times-frac41.1%
Applied egg-rr41.1%
if 1.95e-218 < b Initial program 99.6%
associate-*r/98.8%
sub-neg98.8%
exp-sum77.4%
associate-/l*77.4%
associate-/r/72.7%
exp-neg72.7%
associate-*r/72.7%
Simplified65.5%
Taylor expanded in y around 0 65.9%
associate-/r*63.9%
associate-*r/60.2%
Simplified60.2%
Taylor expanded in t around 0 59.9%
Taylor expanded in b around 0 31.3%
Taylor expanded in b around inf 31.4%
associate-*r*29.5%
*-commutative29.5%
associate-*r*34.8%
Simplified34.8%
Final simplification37.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b -0.216) (* (/ b a) (- (/ x y))) (if (<= b 1.9e-217) (* (/ x a) (/ 1.0 y)) (/ x (* y (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -0.216) {
tmp = (b / a) * -(x / y);
} else if (b <= 1.9e-217) {
tmp = (x / a) * (1.0 / y);
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-0.216d0)) then
tmp = (b / a) * -(x / y)
else if (b <= 1.9d-217) then
tmp = (x / a) * (1.0d0 / y)
else
tmp = x / (y * (a * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -0.216) {
tmp = (b / a) * -(x / y);
} else if (b <= 1.9e-217) {
tmp = (x / a) * (1.0 / y);
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -0.216: tmp = (b / a) * -(x / y) elif b <= 1.9e-217: tmp = (x / a) * (1.0 / y) else: tmp = x / (y * (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -0.216) tmp = Float64(Float64(b / a) * Float64(-Float64(x / y))); elseif (b <= 1.9e-217) tmp = Float64(Float64(x / a) * Float64(1.0 / y)); else tmp = Float64(x / Float64(y * Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -0.216) tmp = (b / a) * -(x / y); elseif (b <= 1.9e-217) tmp = (x / a) * (1.0 / y); else tmp = x / (y * (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -0.216], N[(N[(b / a), $MachinePrecision] * (-N[(x / y), $MachinePrecision])), $MachinePrecision], If[LessEqual[b, 1.9e-217], N[(N[(x / a), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -0.216:\\
\;\;\;\;\frac{b}{a} \cdot \left(-\frac{x}{y}\right)\\
\mathbf{elif}\;b \leq 1.9 \cdot 10^{-217}:\\
\;\;\;\;\frac{x}{a} \cdot \frac{1}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot b\right)}\\
\end{array}
\end{array}
if b < -0.215999999999999998Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum62.9%
associate-/l*62.9%
associate-/r/62.9%
exp-neg62.9%
associate-*r/62.9%
Simplified61.4%
Taylor expanded in y around 0 67.3%
associate-/r*65.9%
associate-*r/64.4%
Simplified64.4%
Taylor expanded in t around 0 74.7%
Taylor expanded in b around 0 32.2%
Taylor expanded in b around inf 32.2%
mul-1-neg32.2%
times-frac34.8%
distribute-lft-neg-out34.8%
*-commutative34.8%
distribute-neg-frac34.8%
Simplified34.8%
if -0.215999999999999998 < b < 1.89999999999999993e-217Initial program 96.8%
associate-*r/96.8%
sub-neg96.8%
exp-sum96.9%
associate-/l*96.9%
associate-/r/96.9%
exp-neg96.9%
associate-*r/96.9%
Simplified87.2%
Taylor expanded in y around 0 69.6%
associate-/r*67.4%
associate-*r/58.6%
Simplified58.6%
Taylor expanded in t around 0 45.4%
Taylor expanded in b around 0 44.5%
*-commutative44.5%
Simplified44.5%
*-rgt-identity44.5%
*-commutative44.5%
times-frac46.9%
Applied egg-rr46.9%
if 1.89999999999999993e-217 < b Initial program 99.6%
associate-*r/98.8%
sub-neg98.8%
exp-sum77.4%
associate-/l*77.4%
associate-/r/72.7%
exp-neg72.7%
associate-*r/72.7%
Simplified65.5%
Taylor expanded in y around 0 65.9%
associate-/r*63.9%
associate-*r/60.2%
Simplified60.2%
Taylor expanded in t around 0 59.9%
Taylor expanded in b around 0 31.3%
Taylor expanded in b around inf 31.4%
associate-*r*29.5%
*-commutative29.5%
associate-*r*34.8%
Simplified34.8%
Final simplification38.5%
(FPCore (x y z t a b) :precision binary64 (if (<= y -2.95e-217) (/ 1.0 (/ (* y a) x)) (/ (/ x a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.95e-217) {
tmp = 1.0 / ((y * a) / x);
} else {
tmp = (x / a) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-2.95d-217)) then
tmp = 1.0d0 / ((y * a) / x)
else
tmp = (x / a) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.95e-217) {
tmp = 1.0 / ((y * a) / x);
} else {
tmp = (x / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.95e-217: tmp = 1.0 / ((y * a) / x) else: tmp = (x / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.95e-217) tmp = Float64(1.0 / Float64(Float64(y * a) / x)); else tmp = Float64(Float64(x / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.95e-217) tmp = 1.0 / ((y * a) / x); else tmp = (x / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.95e-217], N[(1.0 / N[(N[(y * a), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.95 \cdot 10^{-217}:\\
\;\;\;\;\frac{1}{\frac{y \cdot a}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if y < -2.9499999999999999e-217Initial program 98.6%
associate-*r/99.4%
sub-neg99.4%
exp-sum79.3%
associate-/l*79.3%
associate-/r/77.3%
exp-neg77.3%
associate-*r/77.3%
Simplified69.2%
Taylor expanded in t around 0 72.3%
Taylor expanded in b around 0 61.3%
Taylor expanded in y around 0 24.4%
div-inv24.4%
clear-num24.6%
Applied egg-rr24.6%
if -2.9499999999999999e-217 < y Initial program 99.0%
associate-*r/97.9%
sub-neg97.9%
exp-sum79.5%
associate-/l*79.5%
associate-/r/77.5%
exp-neg77.5%
associate-*r/77.5%
Simplified72.4%
Taylor expanded in y around 0 70.4%
associate-/r*67.8%
associate-*r/64.5%
Simplified64.5%
Taylor expanded in t around 0 61.2%
Taylor expanded in b around 0 32.5%
associate-/r*36.9%
Simplified36.9%
Final simplification31.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b 2.5e-217) (/ 1.0 (/ (* y a) x)) (/ x (* y (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 2.5e-217) {
tmp = 1.0 / ((y * a) / x);
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= 2.5d-217) then
tmp = 1.0d0 / ((y * a) / x)
else
tmp = x / (y * (a * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 2.5e-217) {
tmp = 1.0 / ((y * a) / x);
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 2.5e-217: tmp = 1.0 / ((y * a) / x) else: tmp = x / (y * (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 2.5e-217) tmp = Float64(1.0 / Float64(Float64(y * a) / x)); else tmp = Float64(x / Float64(y * Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 2.5e-217) tmp = 1.0 / ((y * a) / x); else tmp = x / (y * (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 2.5e-217], N[(1.0 / N[(N[(y * a), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.5 \cdot 10^{-217}:\\
\;\;\;\;\frac{1}{\frac{y \cdot a}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot b\right)}\\
\end{array}
\end{array}
if b < 2.5000000000000001e-217Initial program 98.3%
associate-*r/98.3%
sub-neg98.3%
exp-sum80.9%
associate-/l*80.9%
associate-/r/80.9%
exp-neg80.9%
associate-*r/80.9%
Simplified75.1%
Taylor expanded in t around 0 70.9%
Taylor expanded in b around 0 62.8%
Taylor expanded in y around 0 34.6%
div-inv34.7%
clear-num34.8%
Applied egg-rr34.8%
if 2.5000000000000001e-217 < b Initial program 99.6%
associate-*r/98.8%
sub-neg98.8%
exp-sum77.4%
associate-/l*77.4%
associate-/r/72.7%
exp-neg72.7%
associate-*r/72.7%
Simplified65.5%
Taylor expanded in y around 0 65.9%
associate-/r*63.9%
associate-*r/60.2%
Simplified60.2%
Taylor expanded in t around 0 59.9%
Taylor expanded in b around 0 31.3%
Taylor expanded in b around inf 31.4%
associate-*r*29.5%
*-commutative29.5%
associate-*r*34.8%
Simplified34.8%
Final simplification34.8%
(FPCore (x y z t a b) :precision binary64 (if (<= y -6.5e-225) (/ x (* y a)) (/ (/ x a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -6.5e-225) {
tmp = x / (y * a);
} else {
tmp = (x / a) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-6.5d-225)) then
tmp = x / (y * a)
else
tmp = (x / a) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -6.5e-225) {
tmp = x / (y * a);
} else {
tmp = (x / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -6.5e-225: tmp = x / (y * a) else: tmp = (x / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -6.5e-225) tmp = Float64(x / Float64(y * a)); else tmp = Float64(Float64(x / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -6.5e-225) tmp = x / (y * a); else tmp = (x / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -6.5e-225], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{-225}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if y < -6.5000000000000005e-225Initial program 98.6%
associate-*r/99.4%
sub-neg99.4%
exp-sum79.3%
associate-/l*79.3%
associate-/r/77.3%
exp-neg77.3%
associate-*r/77.3%
Simplified69.2%
Taylor expanded in y around 0 63.2%
associate-/r*62.2%
associate-*r/55.5%
Simplified55.5%
Taylor expanded in t around 0 57.0%
Taylor expanded in b around 0 24.4%
*-commutative24.4%
Simplified24.4%
if -6.5000000000000005e-225 < y Initial program 99.0%
associate-*r/97.9%
sub-neg97.9%
exp-sum79.5%
associate-/l*79.5%
associate-/r/77.5%
exp-neg77.5%
associate-*r/77.5%
Simplified72.4%
Taylor expanded in y around 0 70.4%
associate-/r*67.8%
associate-*r/64.5%
Simplified64.5%
Taylor expanded in t around 0 61.2%
Taylor expanded in b around 0 32.5%
associate-/r*36.9%
Simplified36.9%
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.9%
associate-*r/98.5%
sub-neg98.5%
exp-sum79.4%
associate-/l*79.4%
associate-/r/77.5%
exp-neg77.5%
associate-*r/77.5%
Simplified71.1%
Taylor expanded in y around 0 67.4%
associate-/r*65.5%
associate-*r/60.8%
Simplified60.8%
Taylor expanded in t around 0 59.5%
Taylor expanded in b around 0 29.2%
*-commutative29.2%
Simplified29.2%
Final simplification29.2%
(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 2023195
(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))