
(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.3%
Final simplification98.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.1e+46) (not (<= y 0.0002))) (/ (* x (exp (- (- (* y (log z)) (log a)) b))) 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.1e+46) || !(y <= 0.0002)) {
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / 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.1d+46)) .or. (.not. (y <= 0.0002d0))) then
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / 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.1e+46) || !(y <= 0.0002)) {
tmp = (x * Math.exp((((y * Math.log(z)) - Math.log(a)) - b))) / 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.1e+46) or not (y <= 0.0002): tmp = (x * math.exp((((y * math.log(z)) - math.log(a)) - b))) / 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.1e+46) || !(y <= 0.0002)) tmp = Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) - log(a)) - b))) / 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.1e+46) || ~((y <= 0.0002))) tmp = (x * exp((((y * log(z)) - log(a)) - b))) / 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.1e+46], N[Not[LessEqual[y, 0.0002]], $MachinePrecision]], N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] - N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[(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.1 \cdot 10^{+46} \lor \neg \left(y \leq 0.0002\right):\\
\;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z - \log a\right) - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(t + -1\right) \cdot \log a - b}}{y}\\
\end{array}
\end{array}
if y < -1.1e46 or 2.0000000000000001e-4 < y Initial program 100.0%
Taylor expanded in t around 0 93.6%
mul-1-neg93.6%
Simplified93.6%
if -1.1e46 < y < 2.0000000000000001e-4Initial program 96.7%
Taylor expanded in y around 0 96.7%
Final simplification95.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (/ (pow a (+ t -1.0)) (exp b))) y))
(t_2 (/ (* x (/ (pow z y) a)) y)))
(if (<= y -2.4e+46)
t_2
(if (<= y 2.15e-257)
t_1
(if (<= y 1.04e-231)
(/ (* x (pow a t)) (* y a))
(if (<= y 3.3) 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)) / exp(b))) / y;
double t_2 = (x * (pow(z, y) / a)) / y;
double tmp;
if (y <= -2.4e+46) {
tmp = t_2;
} else if (y <= 2.15e-257) {
tmp = t_1;
} else if (y <= 1.04e-231) {
tmp = (x * pow(a, t)) / (y * a);
} else if (y <= 3.3) {
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))) / exp(b))) / y
t_2 = (x * ((z ** y) / a)) / y
if (y <= (-2.4d+46)) then
tmp = t_2
else if (y <= 2.15d-257) then
tmp = t_1
else if (y <= 1.04d-231) then
tmp = (x * (a ** t)) / (y * a)
else if (y <= 3.3d0) 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)) / Math.exp(b))) / y;
double t_2 = (x * (Math.pow(z, y) / a)) / y;
double tmp;
if (y <= -2.4e+46) {
tmp = t_2;
} else if (y <= 2.15e-257) {
tmp = t_1;
} else if (y <= 1.04e-231) {
tmp = (x * Math.pow(a, t)) / (y * a);
} else if (y <= 3.3) {
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)) / math.exp(b))) / y t_2 = (x * (math.pow(z, y) / a)) / y tmp = 0 if y <= -2.4e+46: tmp = t_2 elif y <= 2.15e-257: tmp = t_1 elif y <= 1.04e-231: tmp = (x * math.pow(a, t)) / (y * a) elif y <= 3.3: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * Float64((a ^ Float64(t + -1.0)) / exp(b))) / y) t_2 = Float64(Float64(x * Float64((z ^ y) / a)) / y) tmp = 0.0 if (y <= -2.4e+46) tmp = t_2; elseif (y <= 2.15e-257) tmp = t_1; elseif (y <= 1.04e-231) tmp = Float64(Float64(x * (a ^ t)) / Float64(y * a)); elseif (y <= 3.3) 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)) / exp(b))) / y; t_2 = (x * ((z ^ y) / a)) / y; tmp = 0.0; if (y <= -2.4e+46) tmp = t_2; elseif (y <= 2.15e-257) tmp = t_1; elseif (y <= 1.04e-231) tmp = (x * (a ^ t)) / (y * a); elseif (y <= 3.3) 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[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -2.4e+46], t$95$2, If[LessEqual[y, 2.15e-257], t$95$1, If[LessEqual[y, 1.04e-231], N[(N[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.3], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot \frac{{a}^{\left(t + -1\right)}}{e^{b}}}{y}\\
t_2 := \frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{if}\;y \leq -2.4 \cdot 10^{+46}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 2.15 \cdot 10^{-257}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.04 \cdot 10^{-231}:\\
\;\;\;\;\frac{x \cdot {a}^{t}}{y \cdot a}\\
\mathbf{elif}\;y \leq 3.3:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -2.40000000000000008e46 or 3.2999999999999998 < y Initial program 100.0%
Taylor expanded in t around 0 93.5%
mul-1-neg93.5%
Simplified93.5%
Taylor expanded in b around 0 89.5%
div-exp89.5%
*-commutative89.5%
exp-to-pow89.5%
rem-exp-log89.5%
Simplified89.5%
if -2.40000000000000008e46 < y < 2.14999999999999999e-257 or 1.03999999999999998e-231 < y < 3.2999999999999998Initial program 97.3%
Taylor expanded in y around 0 97.3%
exp-diff84.7%
sub-neg84.7%
metadata-eval84.7%
*-commutative84.7%
exp-to-pow85.8%
Simplified85.8%
if 2.14999999999999999e-257 < y < 1.03999999999999998e-231Initial program 85.1%
associate-*r/97.6%
sub-neg97.6%
exp-sum54.7%
associate-/l*54.7%
associate-/r/54.7%
exp-neg54.7%
associate-*r/54.7%
Simplified56.9%
Taylor expanded in y around 0 57.1%
Taylor expanded in b around 0 100.0%
Final simplification88.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= (+ t -1.0) -5e+66)
(/ (* x (pow a t)) (* y a))
(if (<= (+ t -1.0) 2e+16)
(* x (/ (pow z y) (* y (* a (exp b)))))
(if (or (<= (+ t -1.0) 5e+142) (not (<= (+ t -1.0) 2e+157)))
(/ (* x (pow a (+ t -1.0))) y)
(/ (/ (/ x a) (exp b)) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t + -1.0) <= -5e+66) {
tmp = (x * pow(a, t)) / (y * a);
} else if ((t + -1.0) <= 2e+16) {
tmp = x * (pow(z, y) / (y * (a * exp(b))));
} else if (((t + -1.0) <= 5e+142) || !((t + -1.0) <= 2e+157)) {
tmp = (x * pow(a, (t + -1.0))) / y;
} else {
tmp = ((x / a) / exp(b)) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t + (-1.0d0)) <= (-5d+66)) then
tmp = (x * (a ** t)) / (y * a)
else if ((t + (-1.0d0)) <= 2d+16) then
tmp = x * ((z ** y) / (y * (a * exp(b))))
else if (((t + (-1.0d0)) <= 5d+142) .or. (.not. ((t + (-1.0d0)) <= 2d+157))) then
tmp = (x * (a ** (t + (-1.0d0)))) / y
else
tmp = ((x / a) / exp(b)) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t + -1.0) <= -5e+66) {
tmp = (x * Math.pow(a, t)) / (y * a);
} else if ((t + -1.0) <= 2e+16) {
tmp = x * (Math.pow(z, y) / (y * (a * Math.exp(b))));
} else if (((t + -1.0) <= 5e+142) || !((t + -1.0) <= 2e+157)) {
tmp = (x * Math.pow(a, (t + -1.0))) / y;
} else {
tmp = ((x / a) / Math.exp(b)) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t + -1.0) <= -5e+66: tmp = (x * math.pow(a, t)) / (y * a) elif (t + -1.0) <= 2e+16: tmp = x * (math.pow(z, y) / (y * (a * math.exp(b)))) elif ((t + -1.0) <= 5e+142) or not ((t + -1.0) <= 2e+157): tmp = (x * math.pow(a, (t + -1.0))) / y else: tmp = ((x / a) / math.exp(b)) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(t + -1.0) <= -5e+66) tmp = Float64(Float64(x * (a ^ t)) / Float64(y * a)); elseif (Float64(t + -1.0) <= 2e+16) tmp = Float64(x * Float64((z ^ y) / Float64(y * Float64(a * exp(b))))); elseif ((Float64(t + -1.0) <= 5e+142) || !(Float64(t + -1.0) <= 2e+157)) tmp = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y); else tmp = Float64(Float64(Float64(x / a) / exp(b)) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t + -1.0) <= -5e+66) tmp = (x * (a ^ t)) / (y * a); elseif ((t + -1.0) <= 2e+16) tmp = x * ((z ^ y) / (y * (a * exp(b)))); elseif (((t + -1.0) <= 5e+142) || ~(((t + -1.0) <= 2e+157))) tmp = (x * (a ^ (t + -1.0))) / y; else tmp = ((x / a) / exp(b)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(t + -1.0), $MachinePrecision], -5e+66], N[(N[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(t + -1.0), $MachinePrecision], 2e+16], N[(x * N[(N[Power[z, y], $MachinePrecision] / N[(y * N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(t + -1.0), $MachinePrecision], 5e+142], N[Not[LessEqual[N[(t + -1.0), $MachinePrecision], 2e+157]], $MachinePrecision]], N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(N[(x / a), $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t + -1 \leq -5 \cdot 10^{+66}:\\
\;\;\;\;\frac{x \cdot {a}^{t}}{y \cdot a}\\
\mathbf{elif}\;t + -1 \leq 2 \cdot 10^{+16}:\\
\;\;\;\;x \cdot \frac{{z}^{y}}{y \cdot \left(a \cdot e^{b}\right)}\\
\mathbf{elif}\;t + -1 \leq 5 \cdot 10^{+142} \lor \neg \left(t + -1 \leq 2 \cdot 10^{+157}\right):\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{x}{a}}{e^{b}}}{y}\\
\end{array}
\end{array}
if (-.f64 t 1) < -4.99999999999999991e66Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum68.2%
associate-/l*68.2%
associate-/r/68.2%
exp-neg68.2%
associate-*r/68.2%
Simplified52.3%
Taylor expanded in y around 0 61.5%
Taylor expanded in b around 0 82.1%
if -4.99999999999999991e66 < (-.f64 t 1) < 2e16Initial program 96.8%
associate-*r/95.6%
sub-neg95.6%
exp-sum88.5%
associate-/l*88.5%
associate-/r/84.2%
exp-neg84.2%
associate-*r/84.2%
Simplified83.7%
Taylor expanded in t around 0 86.8%
*-commutative86.8%
associate-*l*86.8%
*-commutative86.8%
Simplified86.8%
if 2e16 < (-.f64 t 1) < 5.0000000000000001e142 or 1.99999999999999997e157 < (-.f64 t 1) Initial program 100.0%
Taylor expanded in y around 0 95.5%
exp-diff67.7%
sub-neg67.7%
metadata-eval67.7%
*-commutative67.7%
exp-to-pow67.7%
Simplified67.7%
Taylor expanded in b around 0 86.4%
if 5.0000000000000001e142 < (-.f64 t 1) < 1.99999999999999997e157Initial program 100.0%
Taylor expanded in t around 0 100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in y around 0 87.0%
exp-neg87.0%
associate-*l/87.0%
*-lft-identity87.0%
+-commutative87.0%
exp-sum87.0%
rem-exp-log87.0%
associate-/r*87.0%
Simplified87.0%
Final simplification85.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= (+ t -1.0) -5e+66)
(/ (* x (pow a t)) (* y a))
(if (<= (+ t -1.0) 2e+16)
(* (/ (pow z y) a) (/ (/ x y) (exp b)))
(if (or (<= (+ t -1.0) 5e+142) (not (<= (+ t -1.0) 2e+157)))
(/ (* x (pow a (+ t -1.0))) y)
(/ (/ (/ x a) (exp b)) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t + -1.0) <= -5e+66) {
tmp = (x * pow(a, t)) / (y * a);
} else if ((t + -1.0) <= 2e+16) {
tmp = (pow(z, y) / a) * ((x / y) / exp(b));
} else if (((t + -1.0) <= 5e+142) || !((t + -1.0) <= 2e+157)) {
tmp = (x * pow(a, (t + -1.0))) / y;
} else {
tmp = ((x / a) / exp(b)) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t + (-1.0d0)) <= (-5d+66)) then
tmp = (x * (a ** t)) / (y * a)
else if ((t + (-1.0d0)) <= 2d+16) then
tmp = ((z ** y) / a) * ((x / y) / exp(b))
else if (((t + (-1.0d0)) <= 5d+142) .or. (.not. ((t + (-1.0d0)) <= 2d+157))) then
tmp = (x * (a ** (t + (-1.0d0)))) / y
else
tmp = ((x / a) / exp(b)) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t + -1.0) <= -5e+66) {
tmp = (x * Math.pow(a, t)) / (y * a);
} else if ((t + -1.0) <= 2e+16) {
tmp = (Math.pow(z, y) / a) * ((x / y) / Math.exp(b));
} else if (((t + -1.0) <= 5e+142) || !((t + -1.0) <= 2e+157)) {
tmp = (x * Math.pow(a, (t + -1.0))) / y;
} else {
tmp = ((x / a) / Math.exp(b)) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t + -1.0) <= -5e+66: tmp = (x * math.pow(a, t)) / (y * a) elif (t + -1.0) <= 2e+16: tmp = (math.pow(z, y) / a) * ((x / y) / math.exp(b)) elif ((t + -1.0) <= 5e+142) or not ((t + -1.0) <= 2e+157): tmp = (x * math.pow(a, (t + -1.0))) / y else: tmp = ((x / a) / math.exp(b)) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(t + -1.0) <= -5e+66) tmp = Float64(Float64(x * (a ^ t)) / Float64(y * a)); elseif (Float64(t + -1.0) <= 2e+16) tmp = Float64(Float64((z ^ y) / a) * Float64(Float64(x / y) / exp(b))); elseif ((Float64(t + -1.0) <= 5e+142) || !(Float64(t + -1.0) <= 2e+157)) tmp = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y); else tmp = Float64(Float64(Float64(x / a) / exp(b)) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t + -1.0) <= -5e+66) tmp = (x * (a ^ t)) / (y * a); elseif ((t + -1.0) <= 2e+16) tmp = ((z ^ y) / a) * ((x / y) / exp(b)); elseif (((t + -1.0) <= 5e+142) || ~(((t + -1.0) <= 2e+157))) tmp = (x * (a ^ (t + -1.0))) / y; else tmp = ((x / a) / exp(b)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(t + -1.0), $MachinePrecision], -5e+66], N[(N[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(t + -1.0), $MachinePrecision], 2e+16], N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] * N[(N[(x / y), $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(t + -1.0), $MachinePrecision], 5e+142], N[Not[LessEqual[N[(t + -1.0), $MachinePrecision], 2e+157]], $MachinePrecision]], N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(N[(x / a), $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t + -1 \leq -5 \cdot 10^{+66}:\\
\;\;\;\;\frac{x \cdot {a}^{t}}{y \cdot a}\\
\mathbf{elif}\;t + -1 \leq 2 \cdot 10^{+16}:\\
\;\;\;\;\frac{{z}^{y}}{a} \cdot \frac{\frac{x}{y}}{e^{b}}\\
\mathbf{elif}\;t + -1 \leq 5 \cdot 10^{+142} \lor \neg \left(t + -1 \leq 2 \cdot 10^{+157}\right):\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{x}{a}}{e^{b}}}{y}\\
\end{array}
\end{array}
if (-.f64 t 1) < -4.99999999999999991e66Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum68.2%
associate-/l*68.2%
associate-/r/68.2%
exp-neg68.2%
associate-*r/68.2%
Simplified52.3%
Taylor expanded in y around 0 61.5%
Taylor expanded in b around 0 82.1%
if -4.99999999999999991e66 < (-.f64 t 1) < 2e16Initial program 96.8%
associate-*r/95.6%
sub-neg95.6%
exp-sum88.5%
associate-/l*88.5%
associate-/r/84.2%
exp-neg84.2%
associate-*r/84.2%
Simplified83.7%
Taylor expanded in t around 0 87.7%
*-commutative87.7%
associate-*l*87.7%
*-commutative87.7%
times-frac89.4%
associate-/r*87.3%
Simplified87.3%
if 2e16 < (-.f64 t 1) < 5.0000000000000001e142 or 1.99999999999999997e157 < (-.f64 t 1) Initial program 100.0%
Taylor expanded in y around 0 95.5%
exp-diff67.7%
sub-neg67.7%
metadata-eval67.7%
*-commutative67.7%
exp-to-pow67.7%
Simplified67.7%
Taylor expanded in b around 0 86.4%
if 5.0000000000000001e142 < (-.f64 t 1) < 1.99999999999999997e157Initial program 100.0%
Taylor expanded in t around 0 100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in y around 0 87.0%
exp-neg87.0%
associate-*l/87.0%
*-lft-identity87.0%
+-commutative87.0%
exp-sum87.0%
rem-exp-log87.0%
associate-/r*87.0%
Simplified87.0%
Final simplification86.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -7.2e+47) (not (<= y 5.1))) (/ (* 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 <= -7.2e+47) || !(y <= 5.1)) {
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 <= (-7.2d+47)) .or. (.not. (y <= 5.1d0))) 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 <= -7.2e+47) || !(y <= 5.1)) {
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 <= -7.2e+47) or not (y <= 5.1): 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 <= -7.2e+47) || !(y <= 5.1)) tmp = Float64(Float64(x * Float64((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 <= -7.2e+47) || ~((y <= 5.1))) 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, -7.2e+47], N[Not[LessEqual[y, 5.1]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $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 -7.2 \cdot 10^{+47} \lor \neg \left(y \leq 5.1\right):\\
\;\;\;\;\frac{x \cdot \frac{{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 < -7.20000000000000015e47 or 5.0999999999999996 < y Initial program 100.0%
Taylor expanded in t around 0 93.5%
mul-1-neg93.5%
Simplified93.5%
Taylor expanded in b around 0 89.5%
div-exp89.5%
*-commutative89.5%
exp-to-pow89.5%
rem-exp-log89.5%
Simplified89.5%
if -7.20000000000000015e47 < y < 5.0999999999999996Initial program 96.7%
Taylor expanded in y around 0 96.7%
Final simplification93.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -8.2e+46) (not (<= y 8.2))) (/ (* x (/ (pow z y) a)) y) (/ (/ (pow a (+ t -1.0)) (exp b)) (/ y x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -8.2e+46) || !(y <= 8.2)) {
tmp = (x * (pow(z, y) / a)) / y;
} else {
tmp = (pow(a, (t + -1.0)) / exp(b)) / (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 ((y <= (-8.2d+46)) .or. (.not. (y <= 8.2d0))) then
tmp = (x * ((z ** y) / a)) / y
else
tmp = ((a ** (t + (-1.0d0))) / exp(b)) / (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 ((y <= -8.2e+46) || !(y <= 8.2)) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else {
tmp = (Math.pow(a, (t + -1.0)) / Math.exp(b)) / (y / x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -8.2e+46) or not (y <= 8.2): tmp = (x * (math.pow(z, y) / a)) / y else: tmp = (math.pow(a, (t + -1.0)) / math.exp(b)) / (y / x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -8.2e+46) || !(y <= 8.2)) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = Float64(Float64((a ^ Float64(t + -1.0)) / exp(b)) / Float64(y / x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -8.2e+46) || ~((y <= 8.2))) tmp = (x * ((z ^ y) / a)) / y; else tmp = ((a ^ (t + -1.0)) / exp(b)) / (y / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -8.2e+46], N[Not[LessEqual[y, 8.2]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision] / N[(y / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{+46} \lor \neg \left(y \leq 8.2\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{{a}^{\left(t + -1\right)}}{e^{b}}}{\frac{y}{x}}\\
\end{array}
\end{array}
if y < -8.19999999999999999e46 or 8.1999999999999993 < y Initial program 100.0%
Taylor expanded in t around 0 93.5%
mul-1-neg93.5%
Simplified93.5%
Taylor expanded in b around 0 89.5%
div-exp89.5%
*-commutative89.5%
exp-to-pow89.5%
rem-exp-log89.5%
Simplified89.5%
if -8.19999999999999999e46 < y < 8.1999999999999993Initial program 96.7%
Taylor expanded in y around 0 96.7%
associate-/l*94.9%
exp-diff83.0%
sub-neg83.0%
metadata-eval83.0%
*-commutative83.0%
exp-to-pow84.1%
Simplified84.1%
Final simplification86.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (pow a t)) (* y a)))
(t_2 (/ (* x (/ (pow z y) a)) y))
(t_3 (/ (/ x y) (* a (exp b)))))
(if (<= y -9e+47)
t_2
(if (<= y -6.5e-73)
t_1
(if (<= y 1.75e-272)
t_3
(if (<= y 1.42e-231) t_1 (if (<= y 7.2) t_3 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * pow(a, t)) / (y * a);
double t_2 = (x * (pow(z, y) / a)) / y;
double t_3 = (x / y) / (a * exp(b));
double tmp;
if (y <= -9e+47) {
tmp = t_2;
} else if (y <= -6.5e-73) {
tmp = t_1;
} else if (y <= 1.75e-272) {
tmp = t_3;
} else if (y <= 1.42e-231) {
tmp = t_1;
} else if (y <= 7.2) {
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 ** t)) / (y * a)
t_2 = (x * ((z ** y) / a)) / y
t_3 = (x / y) / (a * exp(b))
if (y <= (-9d+47)) then
tmp = t_2
else if (y <= (-6.5d-73)) then
tmp = t_1
else if (y <= 1.75d-272) then
tmp = t_3
else if (y <= 1.42d-231) then
tmp = t_1
else if (y <= 7.2d0) 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 * Math.pow(a, t)) / (y * a);
double t_2 = (x * (Math.pow(z, y) / a)) / y;
double t_3 = (x / y) / (a * Math.exp(b));
double tmp;
if (y <= -9e+47) {
tmp = t_2;
} else if (y <= -6.5e-73) {
tmp = t_1;
} else if (y <= 1.75e-272) {
tmp = t_3;
} else if (y <= 1.42e-231) {
tmp = t_1;
} else if (y <= 7.2) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * math.pow(a, t)) / (y * a) t_2 = (x * (math.pow(z, y) / a)) / y t_3 = (x / y) / (a * math.exp(b)) tmp = 0 if y <= -9e+47: tmp = t_2 elif y <= -6.5e-73: tmp = t_1 elif y <= 1.75e-272: tmp = t_3 elif y <= 1.42e-231: tmp = t_1 elif y <= 7.2: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * (a ^ t)) / Float64(y * a)) t_2 = Float64(Float64(x * Float64((z ^ y) / a)) / y) t_3 = Float64(Float64(x / y) / Float64(a * exp(b))) tmp = 0.0 if (y <= -9e+47) tmp = t_2; elseif (y <= -6.5e-73) tmp = t_1; elseif (y <= 1.75e-272) tmp = t_3; elseif (y <= 1.42e-231) tmp = t_1; elseif (y <= 7.2) 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 ^ t)) / (y * a); t_2 = (x * ((z ^ y) / a)) / y; t_3 = (x / y) / (a * exp(b)); tmp = 0.0; if (y <= -9e+47) tmp = t_2; elseif (y <= -6.5e-73) tmp = t_1; elseif (y <= 1.75e-272) tmp = t_3; elseif (y <= 1.42e-231) tmp = t_1; elseif (y <= 7.2) tmp = t_3; 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, t], $MachinePrecision]), $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x / y), $MachinePrecision] / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9e+47], t$95$2, If[LessEqual[y, -6.5e-73], t$95$1, If[LessEqual[y, 1.75e-272], t$95$3, If[LessEqual[y, 1.42e-231], t$95$1, If[LessEqual[y, 7.2], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot {a}^{t}}{y \cdot a}\\
t_2 := \frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
t_3 := \frac{\frac{x}{y}}{a \cdot e^{b}}\\
\mathbf{if}\;y \leq -9 \cdot 10^{+47}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -6.5 \cdot 10^{-73}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{-272}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq 1.42 \cdot 10^{-231}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 7.2:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -8.99999999999999958e47 or 7.20000000000000018 < y Initial program 100.0%
Taylor expanded in t around 0 93.5%
mul-1-neg93.5%
Simplified93.5%
Taylor expanded in b around 0 89.5%
div-exp89.5%
*-commutative89.5%
exp-to-pow89.5%
rem-exp-log89.5%
Simplified89.5%
if -8.99999999999999958e47 < y < -6.4999999999999999e-73 or 1.7499999999999998e-272 < y < 1.42000000000000014e-231Initial program 97.0%
associate-*r/99.3%
sub-neg99.3%
exp-sum78.2%
associate-/l*78.2%
associate-/r/78.2%
exp-neg78.2%
associate-*r/78.2%
Simplified71.0%
Taylor expanded in y around 0 76.3%
Taylor expanded in b around 0 81.9%
if -6.4999999999999999e-73 < y < 1.7499999999999998e-272 or 1.42000000000000014e-231 < y < 7.20000000000000018Initial program 96.6%
associate-*r/93.9%
sub-neg93.9%
exp-sum82.4%
associate-/l*82.4%
associate-/r/76.2%
exp-neg76.2%
associate-*r/76.2%
Simplified77.3%
Taylor expanded in t around 0 80.5%
*-commutative80.5%
associate-*l*80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in y around 0 81.9%
Taylor expanded in a around 0 81.9%
associate-*r*77.7%
*-commutative77.7%
associate-*r*81.9%
associate-/r*84.4%
Simplified84.4%
Final simplification86.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (/ (pow z y) a)) y)) (t_2 (/ (/ x y) (* a (exp b)))))
(if (<= y -7e+45)
t_1
(if (<= y -6e-77)
(/ (* x (pow a t)) (* y a))
(if (<= y 1.35e-270)
t_2
(if (<= y 5.2e-231)
(/ (pow a (+ t -1.0)) (/ y x))
(if (<= y 1.76) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * (pow(z, y) / a)) / y;
double t_2 = (x / y) / (a * exp(b));
double tmp;
if (y <= -7e+45) {
tmp = t_1;
} else if (y <= -6e-77) {
tmp = (x * pow(a, t)) / (y * a);
} else if (y <= 1.35e-270) {
tmp = t_2;
} else if (y <= 5.2e-231) {
tmp = pow(a, (t + -1.0)) / (y / x);
} else if (y <= 1.76) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x * ((z ** y) / a)) / y
t_2 = (x / y) / (a * exp(b))
if (y <= (-7d+45)) then
tmp = t_1
else if (y <= (-6d-77)) then
tmp = (x * (a ** t)) / (y * a)
else if (y <= 1.35d-270) then
tmp = t_2
else if (y <= 5.2d-231) then
tmp = (a ** (t + (-1.0d0))) / (y / x)
else if (y <= 1.76d0) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * (Math.pow(z, y) / a)) / y;
double t_2 = (x / y) / (a * Math.exp(b));
double tmp;
if (y <= -7e+45) {
tmp = t_1;
} else if (y <= -6e-77) {
tmp = (x * Math.pow(a, t)) / (y * a);
} else if (y <= 1.35e-270) {
tmp = t_2;
} else if (y <= 5.2e-231) {
tmp = Math.pow(a, (t + -1.0)) / (y / x);
} else if (y <= 1.76) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * (math.pow(z, y) / a)) / y t_2 = (x / y) / (a * math.exp(b)) tmp = 0 if y <= -7e+45: tmp = t_1 elif y <= -6e-77: tmp = (x * math.pow(a, t)) / (y * a) elif y <= 1.35e-270: tmp = t_2 elif y <= 5.2e-231: tmp = math.pow(a, (t + -1.0)) / (y / x) elif y <= 1.76: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * Float64((z ^ y) / a)) / y) t_2 = Float64(Float64(x / y) / Float64(a * exp(b))) tmp = 0.0 if (y <= -7e+45) tmp = t_1; elseif (y <= -6e-77) tmp = Float64(Float64(x * (a ^ t)) / Float64(y * a)); elseif (y <= 1.35e-270) tmp = t_2; elseif (y <= 5.2e-231) tmp = Float64((a ^ Float64(t + -1.0)) / Float64(y / x)); elseif (y <= 1.76) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x * ((z ^ y) / a)) / y; t_2 = (x / y) / (a * exp(b)); tmp = 0.0; if (y <= -7e+45) tmp = t_1; elseif (y <= -6e-77) tmp = (x * (a ^ t)) / (y * a); elseif (y <= 1.35e-270) tmp = t_2; elseif (y <= 5.2e-231) tmp = (a ^ (t + -1.0)) / (y / x); elseif (y <= 1.76) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / y), $MachinePrecision] / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7e+45], t$95$1, If[LessEqual[y, -6e-77], N[(N[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.35e-270], t$95$2, If[LessEqual[y, 5.2e-231], N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.76], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
t_2 := \frac{\frac{x}{y}}{a \cdot e^{b}}\\
\mathbf{if}\;y \leq -7 \cdot 10^{+45}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -6 \cdot 10^{-77}:\\
\;\;\;\;\frac{x \cdot {a}^{t}}{y \cdot a}\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{-270}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{-231}:\\
\;\;\;\;\frac{{a}^{\left(t + -1\right)}}{\frac{y}{x}}\\
\mathbf{elif}\;y \leq 1.76:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -7.00000000000000046e45 or 1.76000000000000001 < y Initial program 100.0%
Taylor expanded in t around 0 93.5%
mul-1-neg93.5%
Simplified93.5%
Taylor expanded in b around 0 89.5%
div-exp89.5%
*-commutative89.5%
exp-to-pow89.5%
rem-exp-log89.5%
Simplified89.5%
if -7.00000000000000046e45 < y < -6.00000000000000033e-77Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum80.8%
associate-/l*80.8%
associate-/r/80.8%
exp-neg80.8%
associate-*r/80.8%
Simplified69.2%
Taylor expanded in y around 0 80.8%
Taylor expanded in b around 0 81.2%
if -6.00000000000000033e-77 < y < 1.35000000000000004e-270 or 5.20000000000000006e-231 < y < 1.76000000000000001Initial program 96.6%
associate-*r/93.9%
sub-neg93.9%
exp-sum82.4%
associate-/l*82.4%
associate-/r/76.2%
exp-neg76.2%
associate-*r/76.2%
Simplified77.3%
Taylor expanded in t around 0 80.5%
*-commutative80.5%
associate-*l*80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in y around 0 81.9%
Taylor expanded in a around 0 81.9%
associate-*r*77.7%
*-commutative77.7%
associate-*r*81.9%
associate-/r*84.4%
Simplified84.4%
if 1.35000000000000004e-270 < y < 5.20000000000000006e-231Initial program 90.5%
Taylor expanded in y around 0 90.5%
exp-diff65.5%
sub-neg65.5%
metadata-eval65.5%
*-commutative65.5%
exp-to-pow66.5%
Simplified66.5%
Taylor expanded in b around 0 83.3%
associate-/l*91.1%
sub-neg91.1%
metadata-eval91.1%
Simplified91.1%
Final simplification86.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (/ (pow z y) a)) y)))
(if (<= y -1.15e+46)
t_1
(if (<= y -2.5e-78)
(/ (* x (pow a t)) (* y a))
(if (<= y 1.52e-270)
(/ (/ (/ 1.0 a) (exp b)) (/ y x))
(if (<= y 1.1e-231)
(/ (pow a (+ t -1.0)) (/ y x))
(if (<= y 0.0275) (/ (/ x y) (* a (exp b))) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * (pow(z, y) / a)) / y;
double tmp;
if (y <= -1.15e+46) {
tmp = t_1;
} else if (y <= -2.5e-78) {
tmp = (x * pow(a, t)) / (y * a);
} else if (y <= 1.52e-270) {
tmp = ((1.0 / a) / exp(b)) / (y / x);
} else if (y <= 1.1e-231) {
tmp = pow(a, (t + -1.0)) / (y / x);
} else if (y <= 0.0275) {
tmp = (x / y) / (a * exp(b));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x * ((z ** y) / a)) / y
if (y <= (-1.15d+46)) then
tmp = t_1
else if (y <= (-2.5d-78)) then
tmp = (x * (a ** t)) / (y * a)
else if (y <= 1.52d-270) then
tmp = ((1.0d0 / a) / exp(b)) / (y / x)
else if (y <= 1.1d-231) then
tmp = (a ** (t + (-1.0d0))) / (y / x)
else if (y <= 0.0275d0) then
tmp = (x / y) / (a * exp(b))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * (Math.pow(z, y) / a)) / y;
double tmp;
if (y <= -1.15e+46) {
tmp = t_1;
} else if (y <= -2.5e-78) {
tmp = (x * Math.pow(a, t)) / (y * a);
} else if (y <= 1.52e-270) {
tmp = ((1.0 / a) / Math.exp(b)) / (y / x);
} else if (y <= 1.1e-231) {
tmp = Math.pow(a, (t + -1.0)) / (y / x);
} else if (y <= 0.0275) {
tmp = (x / y) / (a * Math.exp(b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * (math.pow(z, y) / a)) / y tmp = 0 if y <= -1.15e+46: tmp = t_1 elif y <= -2.5e-78: tmp = (x * math.pow(a, t)) / (y * a) elif y <= 1.52e-270: tmp = ((1.0 / a) / math.exp(b)) / (y / x) elif y <= 1.1e-231: tmp = math.pow(a, (t + -1.0)) / (y / x) elif y <= 0.0275: tmp = (x / y) / (a * math.exp(b)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * Float64((z ^ y) / a)) / y) tmp = 0.0 if (y <= -1.15e+46) tmp = t_1; elseif (y <= -2.5e-78) tmp = Float64(Float64(x * (a ^ t)) / Float64(y * a)); elseif (y <= 1.52e-270) tmp = Float64(Float64(Float64(1.0 / a) / exp(b)) / Float64(y / x)); elseif (y <= 1.1e-231) tmp = Float64((a ^ Float64(t + -1.0)) / Float64(y / x)); elseif (y <= 0.0275) tmp = Float64(Float64(x / y) / Float64(a * exp(b))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x * ((z ^ y) / a)) / y; tmp = 0.0; if (y <= -1.15e+46) tmp = t_1; elseif (y <= -2.5e-78) tmp = (x * (a ^ t)) / (y * a); elseif (y <= 1.52e-270) tmp = ((1.0 / a) / exp(b)) / (y / x); elseif (y <= 1.1e-231) tmp = (a ^ (t + -1.0)) / (y / x); elseif (y <= 0.0275) tmp = (x / y) / (a * exp(b)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -1.15e+46], t$95$1, If[LessEqual[y, -2.5e-78], N[(N[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.52e-270], N[(N[(N[(1.0 / a), $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision] / N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.1e-231], N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.0275], N[(N[(x / y), $MachinePrecision] / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{if}\;y \leq -1.15 \cdot 10^{+46}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2.5 \cdot 10^{-78}:\\
\;\;\;\;\frac{x \cdot {a}^{t}}{y \cdot a}\\
\mathbf{elif}\;y \leq 1.52 \cdot 10^{-270}:\\
\;\;\;\;\frac{\frac{\frac{1}{a}}{e^{b}}}{\frac{y}{x}}\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{-231}:\\
\;\;\;\;\frac{{a}^{\left(t + -1\right)}}{\frac{y}{x}}\\
\mathbf{elif}\;y \leq 0.0275:\\
\;\;\;\;\frac{\frac{x}{y}}{a \cdot e^{b}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.15e46 or 0.0275000000000000001 < y Initial program 100.0%
Taylor expanded in t around 0 93.5%
mul-1-neg93.5%
Simplified93.5%
Taylor expanded in b around 0 89.5%
div-exp89.5%
*-commutative89.5%
exp-to-pow89.5%
rem-exp-log89.5%
Simplified89.5%
if -1.15e46 < y < -2.4999999999999998e-78Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum80.8%
associate-/l*80.8%
associate-/r/80.8%
exp-neg80.8%
associate-*r/80.8%
Simplified69.2%
Taylor expanded in y around 0 80.8%
Taylor expanded in b around 0 81.2%
if -2.4999999999999998e-78 < y < 1.52000000000000004e-270Initial program 94.7%
Taylor expanded in y around 0 94.7%
associate-/l*94.2%
exp-diff86.4%
sub-neg86.4%
metadata-eval86.4%
*-commutative86.4%
exp-to-pow87.9%
Simplified87.9%
Taylor expanded in t around 0 86.0%
if 1.52000000000000004e-270 < y < 1.10000000000000005e-231Initial program 90.5%
Taylor expanded in y around 0 90.5%
exp-diff65.5%
sub-neg65.5%
metadata-eval65.5%
*-commutative65.5%
exp-to-pow66.5%
Simplified66.5%
Taylor expanded in b around 0 83.3%
associate-/l*91.1%
sub-neg91.1%
metadata-eval91.1%
Simplified91.1%
if 1.10000000000000005e-231 < y < 0.0275000000000000001Initial program 98.6%
associate-*r/94.8%
sub-neg94.8%
exp-sum81.5%
associate-/l*81.5%
associate-/r/77.0%
exp-neg77.0%
associate-*r/77.0%
Simplified78.0%
Taylor expanded in t around 0 78.3%
*-commutative78.3%
associate-*l*78.3%
*-commutative78.3%
Simplified78.3%
Taylor expanded in y around 0 80.3%
Taylor expanded in a around 0 80.3%
associate-*r*75.9%
*-commutative75.9%
associate-*r*80.3%
associate-/r*82.5%
Simplified82.5%
Final simplification86.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1400000.0) (not (<= y 6.2))) (/ (* x (/ (pow z y) a)) y) (/ (/ x y) (* a (exp b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1400000.0) || !(y <= 6.2)) {
tmp = (x * (pow(z, y) / a)) / y;
} else {
tmp = (x / y) / (a * exp(b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1400000.0d0)) .or. (.not. (y <= 6.2d0))) then
tmp = (x * ((z ** y) / a)) / y
else
tmp = (x / y) / (a * exp(b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1400000.0) || !(y <= 6.2)) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else {
tmp = (x / y) / (a * Math.exp(b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1400000.0) or not (y <= 6.2): tmp = (x * (math.pow(z, y) / a)) / y else: tmp = (x / y) / (a * math.exp(b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1400000.0) || !(y <= 6.2)) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = Float64(Float64(x / y) / Float64(a * exp(b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1400000.0) || ~((y <= 6.2))) tmp = (x * ((z ^ y) / a)) / y; else tmp = (x / y) / (a * exp(b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1400000.0], N[Not[LessEqual[y, 6.2]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1400000 \lor \neg \left(y \leq 6.2\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{a \cdot e^{b}}\\
\end{array}
\end{array}
if y < -1.4e6 or 6.20000000000000018 < y Initial program 100.0%
Taylor expanded in t around 0 90.8%
mul-1-neg90.8%
Simplified90.8%
Taylor expanded in b around 0 87.0%
div-exp87.0%
*-commutative87.0%
exp-to-pow87.0%
rem-exp-log87.0%
Simplified87.0%
if -1.4e6 < y < 6.20000000000000018Initial program 96.5%
associate-*r/95.2%
sub-neg95.2%
exp-sum81.8%
associate-/l*81.8%
associate-/r/77.1%
exp-neg77.1%
associate-*r/77.1%
Simplified78.1%
Taylor expanded in t around 0 74.9%
*-commutative74.9%
associate-*l*74.9%
*-commutative74.9%
Simplified74.9%
Taylor expanded in y around 0 75.9%
Taylor expanded in a around 0 75.9%
associate-*r*72.7%
*-commutative72.7%
associate-*r*75.9%
associate-/r*76.2%
Simplified76.2%
Final simplification81.7%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* a (exp b)))) (if (<= a 3e-86) (/ (/ x y) t_1) (/ x (* y t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * exp(b);
double tmp;
if (a <= 3e-86) {
tmp = (x / y) / t_1;
} else {
tmp = x / (y * 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 = a * exp(b)
if (a <= 3d-86) then
tmp = (x / y) / t_1
else
tmp = x / (y * 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 = a * Math.exp(b);
double tmp;
if (a <= 3e-86) {
tmp = (x / y) / t_1;
} else {
tmp = x / (y * t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * math.exp(b) tmp = 0 if a <= 3e-86: tmp = (x / y) / t_1 else: tmp = x / (y * t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * exp(b)) tmp = 0.0 if (a <= 3e-86) tmp = Float64(Float64(x / y) / t_1); else tmp = Float64(x / Float64(y * t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * exp(b); tmp = 0.0; if (a <= 3e-86) tmp = (x / y) / t_1; else tmp = x / (y * t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 3e-86], N[(N[(x / y), $MachinePrecision] / t$95$1), $MachinePrecision], N[(x / N[(y * t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot e^{b}\\
\mathbf{if}\;a \leq 3 \cdot 10^{-86}:\\
\;\;\;\;\frac{\frac{x}{y}}{t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t_1}\\
\end{array}
\end{array}
if a < 3.0000000000000001e-86Initial program 99.5%
associate-*r/95.6%
sub-neg95.6%
exp-sum81.0%
associate-/l*81.0%
associate-/r/76.5%
exp-neg76.5%
associate-*r/76.5%
Simplified65.4%
Taylor expanded in t around 0 68.0%
*-commutative68.0%
associate-*l*68.0%
*-commutative68.0%
Simplified68.0%
Taylor expanded in y around 0 45.5%
Taylor expanded in a around 0 45.5%
associate-*r*41.0%
*-commutative41.0%
associate-*r*45.5%
associate-/r*50.9%
Simplified50.9%
if 3.0000000000000001e-86 < a Initial program 97.6%
associate-*r/98.7%
sub-neg98.7%
exp-sum79.5%
associate-/l*79.5%
associate-/r/78.3%
exp-neg78.3%
associate-*r/78.3%
Simplified73.1%
Taylor expanded in t around 0 73.5%
*-commutative73.5%
associate-*l*73.5%
*-commutative73.5%
Simplified73.5%
Taylor expanded in y around 0 61.8%
Final simplification58.0%
(FPCore (x y z t a b) :precision binary64 (/ x (* y (* a (exp b)))))
double code(double x, double y, double z, double t, double a, double b) {
return x / (y * (a * 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 / (y * (a * exp(b)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / (y * (a * Math.exp(b)));
}
def code(x, y, z, t, a, b): return x / (y * (a * math.exp(b)))
function code(x, y, z, t, a, b) return Float64(x / Float64(y * Float64(a * exp(b)))) end
function tmp = code(x, y, z, t, a, b) tmp = x / (y * (a * exp(b))); end
code[x_, y_, z_, t_, a_, b_] := N[(x / N[(y * N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y \cdot \left(a \cdot e^{b}\right)}
\end{array}
Initial program 98.3%
associate-*r/97.6%
sub-neg97.6%
exp-sum80.0%
associate-/l*80.0%
associate-/r/77.7%
exp-neg77.7%
associate-*r/77.7%
Simplified70.4%
Taylor expanded in t around 0 71.6%
*-commutative71.6%
associate-*l*71.6%
*-commutative71.6%
Simplified71.6%
Taylor expanded in y around 0 56.1%
Final simplification56.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (/ x a) y)))
(if (<= b -1.32e+73)
(- t_1 (+ (* (/ x a) (/ b y)) (* (* b b) (* t_1 -0.5))))
(/ x (* y (+ a (* a b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / a) / y;
double tmp;
if (b <= -1.32e+73) {
tmp = t_1 - (((x / a) * (b / y)) + ((b * b) * (t_1 * -0.5)));
} else {
tmp = x / (y * (a + (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) :: t_1
real(8) :: tmp
t_1 = (x / a) / y
if (b <= (-1.32d+73)) then
tmp = t_1 - (((x / a) * (b / y)) + ((b * b) * (t_1 * (-0.5d0))))
else
tmp = x / (y * (a + (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 t_1 = (x / a) / y;
double tmp;
if (b <= -1.32e+73) {
tmp = t_1 - (((x / a) * (b / y)) + ((b * b) * (t_1 * -0.5)));
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x / a) / y tmp = 0 if b <= -1.32e+73: tmp = t_1 - (((x / a) * (b / y)) + ((b * b) * (t_1 * -0.5))) else: tmp = x / (y * (a + (a * b))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x / a) / y) tmp = 0.0 if (b <= -1.32e+73) tmp = Float64(t_1 - Float64(Float64(Float64(x / a) * Float64(b / y)) + Float64(Float64(b * b) * Float64(t_1 * -0.5)))); else tmp = Float64(x / Float64(y * Float64(a + Float64(a * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x / a) / y; tmp = 0.0; if (b <= -1.32e+73) tmp = t_1 - (((x / a) * (b / y)) + ((b * b) * (t_1 * -0.5))); else tmp = x / (y * (a + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[b, -1.32e+73], N[(t$95$1 - N[(N[(N[(x / a), $MachinePrecision] * N[(b / y), $MachinePrecision]), $MachinePrecision] + N[(N[(b * b), $MachinePrecision] * N[(t$95$1 * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{a}}{y}\\
\mathbf{if}\;b \leq -1.32 \cdot 10^{+73}:\\
\;\;\;\;t_1 - \left(\frac{x}{a} \cdot \frac{b}{y} + \left(b \cdot b\right) \cdot \left(t_1 \cdot -0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\
\end{array}
\end{array}
if b < -1.32e73Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum65.0%
associate-/l*65.0%
associate-/r/65.0%
exp-neg65.0%
associate-*r/65.0%
Simplified61.7%
Taylor expanded in t around 0 75.1%
*-commutative75.1%
associate-*l*75.1%
*-commutative75.1%
Simplified75.1%
Taylor expanded in y around 0 77.0%
Taylor expanded in b around 0 45.8%
associate-/r*45.8%
distribute-lft-out45.8%
times-frac39.4%
distribute-rgt-out59.4%
metadata-eval59.4%
*-commutative59.4%
*-commutative59.4%
unpow259.4%
associate-/r*61.1%
Simplified61.1%
if -1.32e73 < b Initial program 97.7%
associate-*r/96.9%
sub-neg96.9%
exp-sum84.6%
associate-/l*84.6%
associate-/r/81.6%
exp-neg81.6%
associate-*r/81.6%
Simplified73.1%
Taylor expanded in t around 0 70.5%
*-commutative70.5%
associate-*l*70.5%
*-commutative70.5%
Simplified70.5%
Taylor expanded in y around 0 49.8%
Taylor expanded in b around 0 37.9%
Final simplification43.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x b) y)) (t_2 (/ (- (/ x y) t_1) a)))
(if (<= b -3.2e-225)
t_2
(if (<= b 4.6e-168)
(/ (+ (* a (/ x y)) (* a t_1)) (* a a))
(if (<= b 2.25e-11) t_2 (/ x (* y (+ a (* a b)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * b) / y;
double t_2 = ((x / y) - t_1) / a;
double tmp;
if (b <= -3.2e-225) {
tmp = t_2;
} else if (b <= 4.6e-168) {
tmp = ((a * (x / y)) + (a * t_1)) / (a * a);
} else if (b <= 2.25e-11) {
tmp = t_2;
} else {
tmp = x / (y * (a + (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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x * b) / y
t_2 = ((x / y) - t_1) / a
if (b <= (-3.2d-225)) then
tmp = t_2
else if (b <= 4.6d-168) then
tmp = ((a * (x / y)) + (a * t_1)) / (a * a)
else if (b <= 2.25d-11) then
tmp = t_2
else
tmp = x / (y * (a + (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 t_1 = (x * b) / y;
double t_2 = ((x / y) - t_1) / a;
double tmp;
if (b <= -3.2e-225) {
tmp = t_2;
} else if (b <= 4.6e-168) {
tmp = ((a * (x / y)) + (a * t_1)) / (a * a);
} else if (b <= 2.25e-11) {
tmp = t_2;
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * b) / y t_2 = ((x / y) - t_1) / a tmp = 0 if b <= -3.2e-225: tmp = t_2 elif b <= 4.6e-168: tmp = ((a * (x / y)) + (a * t_1)) / (a * a) elif b <= 2.25e-11: tmp = t_2 else: tmp = x / (y * (a + (a * b))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * b) / y) t_2 = Float64(Float64(Float64(x / y) - t_1) / a) tmp = 0.0 if (b <= -3.2e-225) tmp = t_2; elseif (b <= 4.6e-168) tmp = Float64(Float64(Float64(a * Float64(x / y)) + Float64(a * t_1)) / Float64(a * a)); elseif (b <= 2.25e-11) tmp = t_2; else tmp = Float64(x / Float64(y * Float64(a + Float64(a * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x * b) / y; t_2 = ((x / y) - t_1) / a; tmp = 0.0; if (b <= -3.2e-225) tmp = t_2; elseif (b <= 4.6e-168) tmp = ((a * (x / y)) + (a * t_1)) / (a * a); elseif (b <= 2.25e-11) tmp = t_2; else tmp = x / (y * (a + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * b), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x / y), $MachinePrecision] - t$95$1), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[b, -3.2e-225], t$95$2, If[LessEqual[b, 4.6e-168], N[(N[(N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision] + N[(a * t$95$1), $MachinePrecision]), $MachinePrecision] / N[(a * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.25e-11], t$95$2, N[(x / N[(y * N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot b}{y}\\
t_2 := \frac{\frac{x}{y} - t_1}{a}\\
\mathbf{if}\;b \leq -3.2 \cdot 10^{-225}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq 4.6 \cdot 10^{-168}:\\
\;\;\;\;\frac{a \cdot \frac{x}{y} + a \cdot t_1}{a \cdot a}\\
\mathbf{elif}\;b \leq 2.25 \cdot 10^{-11}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\
\end{array}
\end{array}
if b < -3.19999999999999975e-225 or 4.59999999999999971e-168 < b < 2.25e-11Initial program 98.6%
associate-*r/97.6%
sub-neg97.6%
exp-sum80.0%
associate-/l*80.0%
associate-/r/80.0%
exp-neg80.0%
associate-*r/80.0%
Simplified75.6%
Taylor expanded in t around 0 71.2%
*-commutative71.2%
associate-*l*71.2%
*-commutative71.2%
Simplified71.2%
Taylor expanded in y around 0 49.7%
Taylor expanded in b around 0 33.8%
mul-1-neg33.8%
unsub-neg33.8%
associate-/r*32.3%
associate-/l*28.2%
associate-/l*28.2%
Simplified28.2%
associate-/l/28.6%
associate-/r*30.7%
associate-/r/32.9%
times-frac34.8%
associate-/r*38.1%
sub-div40.0%
*-commutative40.0%
Applied egg-rr40.0%
if -3.19999999999999975e-225 < b < 4.59999999999999971e-168Initial program 94.8%
associate-*r/94.7%
sub-neg94.7%
exp-sum94.7%
associate-/l*94.7%
associate-/r/94.7%
exp-neg94.7%
associate-*r/94.7%
Simplified81.5%
Taylor expanded in t around 0 76.8%
*-commutative76.8%
associate-*l*76.8%
*-commutative76.8%
Simplified76.8%
Taylor expanded in y around 0 45.4%
Taylor expanded in b around 0 38.3%
mul-1-neg38.3%
unsub-neg38.3%
associate-/r*38.7%
associate-/l*36.3%
associate-/l*34.0%
Simplified34.0%
sub-neg34.0%
associate-/l/36.7%
associate-/r*38.0%
associate-/r/38.0%
times-frac34.0%
mul-1-neg34.0%
add-sqr-sqrt28.6%
sqrt-unprod34.0%
mul-1-neg34.0%
times-frac33.3%
associate-/r/38.0%
mul-1-neg38.0%
times-frac35.6%
associate-/r/40.3%
sqr-neg40.3%
sqrt-unprod33.1%
add-sqr-sqrt42.6%
associate-/r/40.3%
times-frac36.3%
associate-/r*41.0%
Applied egg-rr54.3%
if 2.25e-11 < b Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum68.5%
associate-/l*68.5%
associate-/r/57.4%
exp-neg57.4%
associate-*r/57.4%
Simplified46.3%
Taylor expanded in t around 0 68.6%
*-commutative68.6%
associate-*l*68.6%
*-commutative68.6%
Simplified68.6%
Taylor expanded in y around 0 83.6%
Taylor expanded in b around 0 48.0%
Final simplification44.1%
(FPCore (x y z t a b) :precision binary64 (if (<= b 4.9e-214) (/ (- (/ x y) (/ (* x b) y)) a) (/ x (* y (+ a (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 4.9e-214) {
tmp = ((x / y) - ((x * b) / y)) / a;
} else {
tmp = x / (y * (a + (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.9d-214) then
tmp = ((x / y) - ((x * b) / y)) / a
else
tmp = x / (y * (a + (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.9e-214) {
tmp = ((x / y) - ((x * b) / y)) / a;
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 4.9e-214: tmp = ((x / y) - ((x * b) / y)) / a else: tmp = x / (y * (a + (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 4.9e-214) tmp = Float64(Float64(Float64(x / y) - Float64(Float64(x * b) / y)) / a); else tmp = Float64(x / Float64(y * Float64(a + Float64(a * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 4.9e-214) tmp = ((x / y) - ((x * b) / y)) / a; else tmp = x / (y * (a + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 4.9e-214], N[(N[(N[(x / y), $MachinePrecision] - N[(N[(x * b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(x / N[(y * N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 4.9 \cdot 10^{-214}:\\
\;\;\;\;\frac{\frac{x}{y} - \frac{x \cdot b}{y}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\
\end{array}
\end{array}
if b < 4.89999999999999968e-214Initial program 98.7%
associate-*r/97.6%
sub-neg97.6%
exp-sum79.1%
associate-/l*79.1%
associate-/r/79.1%
exp-neg79.1%
associate-*r/79.1%
Simplified75.8%
Taylor expanded in t around 0 73.5%
*-commutative73.5%
associate-*l*73.5%
*-commutative73.5%
Simplified73.5%
Taylor expanded in y around 0 52.3%
Taylor expanded in b around 0 37.7%
mul-1-neg37.7%
unsub-neg37.7%
associate-/r*37.9%
associate-/l*33.6%
associate-/l*33.6%
Simplified33.6%
associate-/l/33.9%
associate-/r*35.0%
associate-/r/35.4%
times-frac38.1%
associate-/r*40.9%
sub-div41.5%
*-commutative41.5%
Applied egg-rr41.5%
if 4.89999999999999968e-214 < b Initial program 97.7%
associate-*r/97.7%
sub-neg97.7%
exp-sum81.3%
associate-/l*81.3%
associate-/r/75.6%
exp-neg75.6%
associate-*r/75.6%
Simplified62.5%
Taylor expanded in t around 0 68.8%
*-commutative68.8%
associate-*l*68.8%
*-commutative68.8%
Simplified68.8%
Taylor expanded in y around 0 61.8%
Taylor expanded in b around 0 43.3%
Final simplification42.2%
(FPCore (x y z t a b) :precision binary64 (if (<= b -9.4e+72) (/ (- (* x b)) (* y a)) (/ x (* y (+ a (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -9.4e+72) {
tmp = -(x * b) / (y * a);
} else {
tmp = x / (y * (a + (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 <= (-9.4d+72)) then
tmp = -(x * b) / (y * a)
else
tmp = x / (y * (a + (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 <= -9.4e+72) {
tmp = -(x * b) / (y * a);
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -9.4e+72: tmp = -(x * b) / (y * a) else: tmp = x / (y * (a + (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -9.4e+72) tmp = Float64(Float64(-Float64(x * b)) / Float64(y * a)); else tmp = Float64(x / Float64(y * Float64(a + Float64(a * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -9.4e+72) tmp = -(x * b) / (y * a); else tmp = x / (y * (a + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -9.4e+72], N[((-N[(x * b), $MachinePrecision]) / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -9.4 \cdot 10^{+72}:\\
\;\;\;\;\frac{-x \cdot b}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\
\end{array}
\end{array}
if b < -9.40000000000000069e72Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum65.6%
associate-/l*65.6%
associate-/r/65.6%
exp-neg65.6%
associate-*r/65.6%
Simplified62.3%
Taylor expanded in t around 0 75.5%
*-commutative75.5%
associate-*l*75.5%
*-commutative75.5%
Simplified75.5%
Taylor expanded in y around 0 77.4%
Taylor expanded in b around 0 49.1%
mul-1-neg49.1%
unsub-neg49.1%
associate-/r*49.1%
associate-/l*38.2%
associate-/l*36.6%
Simplified36.6%
Taylor expanded in b around inf 49.1%
associate-*r/49.1%
*-commutative49.1%
neg-mul-149.1%
Simplified49.1%
if -9.40000000000000069e72 < b Initial program 97.7%
associate-*r/96.9%
sub-neg96.9%
exp-sum84.5%
associate-/l*84.5%
associate-/r/81.5%
exp-neg81.5%
associate-*r/81.5%
Simplified72.9%
Taylor expanded in t around 0 70.3%
*-commutative70.3%
associate-*l*70.3%
*-commutative70.3%
Simplified70.3%
Taylor expanded in y around 0 49.5%
Taylor expanded in b around 0 38.1%
Final simplification40.7%
(FPCore (x y z t a b) :precision binary64 (if (<= b -9.4e+72) (/ (- (* x b)) (* y a)) (/ (/ x a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -9.4e+72) {
tmp = -(x * b) / (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 (b <= (-9.4d+72)) then
tmp = -(x * b) / (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 (b <= -9.4e+72) {
tmp = -(x * b) / (y * a);
} else {
tmp = (x / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -9.4e+72: tmp = -(x * b) / (y * a) else: tmp = (x / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -9.4e+72) tmp = Float64(Float64(-Float64(x * b)) / 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 (b <= -9.4e+72) tmp = -(x * b) / (y * a); else tmp = (x / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -9.4e+72], N[((-N[(x * b), $MachinePrecision]) / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -9.4 \cdot 10^{+72}:\\
\;\;\;\;\frac{-x \cdot b}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if b < -9.40000000000000069e72Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum65.6%
associate-/l*65.6%
associate-/r/65.6%
exp-neg65.6%
associate-*r/65.6%
Simplified62.3%
Taylor expanded in t around 0 75.5%
*-commutative75.5%
associate-*l*75.5%
*-commutative75.5%
Simplified75.5%
Taylor expanded in y around 0 77.4%
Taylor expanded in b around 0 49.1%
mul-1-neg49.1%
unsub-neg49.1%
associate-/r*49.1%
associate-/l*38.2%
associate-/l*36.6%
Simplified36.6%
Taylor expanded in b around inf 49.1%
associate-*r/49.1%
*-commutative49.1%
neg-mul-149.1%
Simplified49.1%
if -9.40000000000000069e72 < b Initial program 97.7%
associate-*r/96.9%
sub-neg96.9%
exp-sum84.5%
associate-/l*84.5%
associate-/r/81.5%
exp-neg81.5%
associate-*r/81.5%
Simplified72.9%
Taylor expanded in t around 0 70.3%
*-commutative70.3%
associate-*l*70.3%
*-commutative70.3%
Simplified70.3%
Taylor expanded in y around 0 49.5%
Taylor expanded in b around 0 30.2%
*-commutative30.2%
associate-/r*30.3%
Simplified30.3%
Final simplification34.8%
(FPCore (x y z t a b) :precision binary64 (if (<= a 2.9e-166) (/ (/ x a) y) (/ x (* y a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 2.9e-166) {
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 <= 2.9d-166) 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 <= 2.9e-166) {
tmp = (x / a) / y;
} else {
tmp = x / (y * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= 2.9e-166: tmp = (x / a) / y else: tmp = x / (y * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= 2.9e-166) 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 <= 2.9e-166) tmp = (x / a) / y; else tmp = x / (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, 2.9e-166], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.9 \cdot 10^{-166}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\end{array}
\end{array}
if a < 2.9e-166Initial program 99.5%
associate-*r/94.9%
sub-neg94.9%
exp-sum80.6%
associate-/l*80.6%
associate-/r/73.5%
exp-neg73.5%
associate-*r/73.5%
Simplified62.8%
Taylor expanded in t around 0 70.2%
*-commutative70.2%
associate-*l*70.2%
*-commutative70.2%
Simplified70.2%
Taylor expanded in y around 0 46.4%
Taylor expanded in b around 0 27.5%
*-commutative27.5%
associate-/r*40.6%
Simplified40.6%
if 2.9e-166 < a Initial program 97.9%
associate-*r/98.4%
sub-neg98.4%
exp-sum79.9%
associate-/l*79.9%
associate-/r/78.9%
exp-neg78.9%
associate-*r/78.9%
Simplified72.5%
Taylor expanded in t around 0 71.9%
*-commutative71.9%
associate-*l*71.9%
*-commutative71.9%
Simplified71.9%
Taylor expanded in y around 0 58.9%
Taylor expanded in b around 0 29.0%
Final simplification31.5%
(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.3%
associate-*r/97.6%
sub-neg97.6%
exp-sum80.0%
associate-/l*80.0%
associate-/r/77.7%
exp-neg77.7%
associate-*r/77.7%
Simplified70.4%
Taylor expanded in t around 0 71.6%
*-commutative71.6%
associate-*l*71.6%
*-commutative71.6%
Simplified71.6%
Taylor expanded in y around 0 56.1%
Taylor expanded in b around 0 28.6%
Final simplification28.6%
(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 2023240
(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))