
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (+ 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.6%
Final simplification98.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (+ t -1.0) -1e+16) (not (<= (+ t -1.0) 2e+132))) (* x (/ (pow a (+ t -1.0)) y)) (* x (/ (exp (- (- (* y (log z)) (log a)) b)) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t + -1.0) <= -1e+16) || !((t + -1.0) <= 2e+132)) {
tmp = x * (pow(a, (t + -1.0)) / y);
} else {
tmp = x * (exp((((y * log(z)) - log(a)) - b)) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (((t + (-1.0d0)) <= (-1d+16)) .or. (.not. ((t + (-1.0d0)) <= 2d+132))) then
tmp = x * ((a ** (t + (-1.0d0))) / y)
else
tmp = x * (exp((((y * log(z)) - log(a)) - b)) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t + -1.0) <= -1e+16) || !((t + -1.0) <= 2e+132)) {
tmp = x * (Math.pow(a, (t + -1.0)) / y);
} else {
tmp = x * (Math.exp((((y * Math.log(z)) - Math.log(a)) - b)) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((t + -1.0) <= -1e+16) or not ((t + -1.0) <= 2e+132): tmp = x * (math.pow(a, (t + -1.0)) / y) else: tmp = x * (math.exp((((y * math.log(z)) - math.log(a)) - b)) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(t + -1.0) <= -1e+16) || !(Float64(t + -1.0) <= 2e+132)) tmp = Float64(x * Float64((a ^ Float64(t + -1.0)) / y)); else tmp = Float64(x * Float64(exp(Float64(Float64(Float64(y * log(z)) - log(a)) - b)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((t + -1.0) <= -1e+16) || ~(((t + -1.0) <= 2e+132))) tmp = x * ((a ^ (t + -1.0)) / y); else tmp = x * (exp((((y * log(z)) - log(a)) - b)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(t + -1.0), $MachinePrecision], -1e+16], N[Not[LessEqual[N[(t + -1.0), $MachinePrecision], 2e+132]], $MachinePrecision]], N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] - N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t + -1 \leq -1 \cdot 10^{+16} \lor \neg \left(t + -1 \leq 2 \cdot 10^{+132}\right):\\
\;\;\;\;x \cdot \frac{{a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{e^{\left(y \cdot \log z - \log a\right) - b}}{y}\\
\end{array}
\end{array}
if (-.f64 t #s(literal 1 binary64)) < -1e16 or 1.99999999999999998e132 < (-.f64 t #s(literal 1 binary64)) Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum81.4%
associate-/l*81.4%
*-commutative81.4%
exp-to-pow81.4%
exp-diff63.7%
*-commutative63.7%
exp-to-pow63.7%
sub-neg63.7%
metadata-eval63.7%
Simplified63.7%
Taylor expanded in y around 0 76.5%
associate-/r*76.5%
exp-to-pow76.5%
sub-neg76.5%
metadata-eval76.5%
Simplified76.5%
Taylor expanded in b around 0 88.4%
Simplified88.4%
if -1e16 < (-.f64 t #s(literal 1 binary64)) < 1.99999999999999998e132Initial program 97.7%
*-commutative97.7%
associate-/l*88.6%
associate--l+88.6%
fma-define88.6%
sub-neg88.6%
metadata-eval88.6%
Simplified88.6%
Taylor expanded in t around 0 96.8%
associate-/l*96.0%
+-commutative96.0%
mul-1-neg96.0%
unsub-neg96.0%
Simplified96.0%
Final simplification93.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (/ (/ (/ (pow a t) a) y) (exp b))))
(t_2 (* x (/ (/ (pow z y) a) y))))
(if (<= y -1.3e+141)
t_2
(if (<= y -1.2e-206)
t_1
(if (<= y 7.4e-209)
(* x (/ (pow a (+ t -1.0)) y))
(if (<= y 1.02e+95) 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) / a) / y) / exp(b));
double t_2 = x * ((pow(z, y) / a) / y);
double tmp;
if (y <= -1.3e+141) {
tmp = t_2;
} else if (y <= -1.2e-206) {
tmp = t_1;
} else if (y <= 7.4e-209) {
tmp = x * (pow(a, (t + -1.0)) / y);
} else if (y <= 1.02e+95) {
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) / a) / y) / exp(b))
t_2 = x * (((z ** y) / a) / y)
if (y <= (-1.3d+141)) then
tmp = t_2
else if (y <= (-1.2d-206)) then
tmp = t_1
else if (y <= 7.4d-209) then
tmp = x * ((a ** (t + (-1.0d0))) / y)
else if (y <= 1.02d+95) 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) / a) / y) / Math.exp(b));
double t_2 = x * ((Math.pow(z, y) / a) / y);
double tmp;
if (y <= -1.3e+141) {
tmp = t_2;
} else if (y <= -1.2e-206) {
tmp = t_1;
} else if (y <= 7.4e-209) {
tmp = x * (Math.pow(a, (t + -1.0)) / y);
} else if (y <= 1.02e+95) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * (((math.pow(a, t) / a) / y) / math.exp(b)) t_2 = x * ((math.pow(z, y) / a) / y) tmp = 0 if y <= -1.3e+141: tmp = t_2 elif y <= -1.2e-206: tmp = t_1 elif y <= 7.4e-209: tmp = x * (math.pow(a, (t + -1.0)) / y) elif y <= 1.02e+95: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64(Float64(Float64((a ^ t) / a) / y) / exp(b))) t_2 = Float64(x * Float64(Float64((z ^ y) / a) / y)) tmp = 0.0 if (y <= -1.3e+141) tmp = t_2; elseif (y <= -1.2e-206) tmp = t_1; elseif (y <= 7.4e-209) tmp = Float64(x * Float64((a ^ Float64(t + -1.0)) / y)); elseif (y <= 1.02e+95) 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) / a) / y) / exp(b)); t_2 = x * (((z ^ y) / a) / y); tmp = 0.0; if (y <= -1.3e+141) tmp = t_2; elseif (y <= -1.2e-206) tmp = t_1; elseif (y <= 7.4e-209) tmp = x * ((a ^ (t + -1.0)) / y); elseif (y <= 1.02e+95) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[(N[(N[Power[a, t], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.3e+141], t$95$2, If[LessEqual[y, -1.2e-206], t$95$1, If[LessEqual[y, 7.4e-209], N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.02e+95], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{\frac{\frac{{a}^{t}}{a}}{y}}{e^{b}}\\
t_2 := x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\
\mathbf{if}\;y \leq -1.3 \cdot 10^{+141}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -1.2 \cdot 10^{-206}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 7.4 \cdot 10^{-209}:\\
\;\;\;\;x \cdot \frac{{a}^{\left(t + -1\right)}}{y}\\
\mathbf{elif}\;y \leq 1.02 \cdot 10^{+95}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -1.3e141 or 1.0200000000000001e95 < y Initial program 100.0%
*-commutative100.0%
associate-/l*81.7%
associate--l+81.7%
fma-define81.7%
sub-neg81.7%
metadata-eval81.7%
Simplified81.7%
Taylor expanded in t around 0 95.8%
associate-/l*95.8%
+-commutative95.8%
mul-1-neg95.8%
unsub-neg95.8%
Simplified95.8%
Taylor expanded in b around 0 90.3%
div-exp90.3%
*-commutative90.3%
exp-to-pow90.3%
rem-exp-log90.3%
Simplified90.3%
if -1.3e141 < y < -1.2e-206 or 7.3999999999999995e-209 < y < 1.0200000000000001e95Initial program 98.6%
associate-/l*98.7%
associate--l+98.7%
exp-sum85.1%
associate-/l*85.1%
*-commutative85.1%
exp-to-pow85.1%
exp-diff78.7%
*-commutative78.7%
exp-to-pow79.2%
sub-neg79.2%
metadata-eval79.2%
Simplified79.2%
Taylor expanded in y around 0 86.8%
associate-/r*83.2%
exp-to-pow83.7%
sub-neg83.7%
metadata-eval83.7%
Simplified83.7%
unpow-prod-up83.8%
unpow-183.8%
Applied egg-rr83.8%
associate-*r/83.8%
*-rgt-identity83.8%
Simplified83.8%
if -1.2e-206 < y < 7.3999999999999995e-209Initial program 96.6%
associate-/l*94.9%
associate--l+94.9%
exp-sum94.9%
associate-/l*94.9%
*-commutative94.9%
exp-to-pow94.9%
exp-diff72.7%
*-commutative72.7%
exp-to-pow73.5%
sub-neg73.5%
metadata-eval73.5%
Simplified73.5%
Taylor expanded in y around 0 72.7%
associate-/r*70.5%
exp-to-pow71.3%
sub-neg71.3%
metadata-eval71.3%
Simplified71.3%
Taylor expanded in b around 0 79.7%
Simplified80.5%
Final simplification85.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (/ x (* y (exp b))) (/ (pow a t) a)))
(t_2 (* x (/ (/ (pow z y) a) y))))
(if (<= y -6.8e+141)
t_2
(if (<= y -1.85e-208)
t_1
(if (<= y -9.2e-299)
(* x (/ (pow a (+ t -1.0)) y))
(if (<= y 2.6e+94) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / (y * exp(b))) * (pow(a, t) / a);
double t_2 = x * ((pow(z, y) / a) / y);
double tmp;
if (y <= -6.8e+141) {
tmp = t_2;
} else if (y <= -1.85e-208) {
tmp = t_1;
} else if (y <= -9.2e-299) {
tmp = x * (pow(a, (t + -1.0)) / y);
} else if (y <= 2.6e+94) {
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 / (y * exp(b))) * ((a ** t) / a)
t_2 = x * (((z ** y) / a) / y)
if (y <= (-6.8d+141)) then
tmp = t_2
else if (y <= (-1.85d-208)) then
tmp = t_1
else if (y <= (-9.2d-299)) then
tmp = x * ((a ** (t + (-1.0d0))) / y)
else if (y <= 2.6d+94) 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 / (y * Math.exp(b))) * (Math.pow(a, t) / a);
double t_2 = x * ((Math.pow(z, y) / a) / y);
double tmp;
if (y <= -6.8e+141) {
tmp = t_2;
} else if (y <= -1.85e-208) {
tmp = t_1;
} else if (y <= -9.2e-299) {
tmp = x * (Math.pow(a, (t + -1.0)) / y);
} else if (y <= 2.6e+94) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x / (y * math.exp(b))) * (math.pow(a, t) / a) t_2 = x * ((math.pow(z, y) / a) / y) tmp = 0 if y <= -6.8e+141: tmp = t_2 elif y <= -1.85e-208: tmp = t_1 elif y <= -9.2e-299: tmp = x * (math.pow(a, (t + -1.0)) / y) elif y <= 2.6e+94: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x / Float64(y * exp(b))) * Float64((a ^ t) / a)) t_2 = Float64(x * Float64(Float64((z ^ y) / a) / y)) tmp = 0.0 if (y <= -6.8e+141) tmp = t_2; elseif (y <= -1.85e-208) tmp = t_1; elseif (y <= -9.2e-299) tmp = Float64(x * Float64((a ^ Float64(t + -1.0)) / y)); elseif (y <= 2.6e+94) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x / (y * exp(b))) * ((a ^ t) / a); t_2 = x * (((z ^ y) / a) / y); tmp = 0.0; if (y <= -6.8e+141) tmp = t_2; elseif (y <= -1.85e-208) tmp = t_1; elseif (y <= -9.2e-299) tmp = x * ((a ^ (t + -1.0)) / y); elseif (y <= 2.6e+94) 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[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[a, t], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.8e+141], t$95$2, If[LessEqual[y, -1.85e-208], t$95$1, If[LessEqual[y, -9.2e-299], N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.6e+94], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y \cdot e^{b}} \cdot \frac{{a}^{t}}{a}\\
t_2 := x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\
\mathbf{if}\;y \leq -6.8 \cdot 10^{+141}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -1.85 \cdot 10^{-208}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -9.2 \cdot 10^{-299}:\\
\;\;\;\;x \cdot \frac{{a}^{\left(t + -1\right)}}{y}\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{+94}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -6.7999999999999996e141 or 2.5999999999999999e94 < y Initial program 100.0%
*-commutative100.0%
associate-/l*81.7%
associate--l+81.7%
fma-define81.7%
sub-neg81.7%
metadata-eval81.7%
Simplified81.7%
Taylor expanded in t around 0 95.8%
associate-/l*95.8%
+-commutative95.8%
mul-1-neg95.8%
unsub-neg95.8%
Simplified95.8%
Taylor expanded in b around 0 90.3%
div-exp90.3%
*-commutative90.3%
exp-to-pow90.3%
rem-exp-log90.3%
Simplified90.3%
if -6.7999999999999996e141 < y < -1.8500000000000001e-208 or -9.2000000000000003e-299 < y < 2.5999999999999999e94Initial program 98.5%
associate-/l*97.7%
associate--l+97.7%
exp-sum86.2%
associate-/l*86.2%
*-commutative86.2%
exp-to-pow86.2%
exp-diff78.3%
*-commutative78.3%
exp-to-pow78.8%
sub-neg78.8%
metadata-eval78.8%
Simplified78.8%
associate-/l/78.8%
unpow-prod-up78.9%
times-frac78.3%
unpow-178.3%
Applied egg-rr78.3%
Taylor expanded in y around 0 85.1%
*-commutative85.1%
times-frac85.8%
Applied egg-rr85.8%
if -1.8500000000000001e-208 < y < -9.2000000000000003e-299Initial program 94.7%
associate-/l*98.8%
associate--l+98.8%
exp-sum98.8%
associate-/l*98.8%
*-commutative98.8%
exp-to-pow98.8%
exp-diff68.8%
*-commutative68.8%
exp-to-pow69.8%
sub-neg69.8%
metadata-eval69.8%
Simplified69.8%
Taylor expanded in y around 0 68.8%
associate-/r*68.8%
exp-to-pow69.8%
sub-neg69.8%
metadata-eval69.8%
Simplified69.8%
Taylor expanded in b around 0 84.2%
Simplified85.2%
Final simplification87.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (exp b))) (t_2 (* x (/ (/ (pow z y) a) y))))
(if (<= y -2.4e+140)
t_2
(if (<= y -6.2e-204)
(/ (* x (pow a t)) (* a t_1))
(if (<= y -9.5e-299)
(* x (/ (pow a (+ t -1.0)) y))
(if (<= y 2.75e+94) (* (/ x t_1) (/ (pow a t) a)) t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * exp(b);
double t_2 = x * ((pow(z, y) / a) / y);
double tmp;
if (y <= -2.4e+140) {
tmp = t_2;
} else if (y <= -6.2e-204) {
tmp = (x * pow(a, t)) / (a * t_1);
} else if (y <= -9.5e-299) {
tmp = x * (pow(a, (t + -1.0)) / y);
} else if (y <= 2.75e+94) {
tmp = (x / t_1) * (pow(a, t) / a);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y * exp(b)
t_2 = x * (((z ** y) / a) / y)
if (y <= (-2.4d+140)) then
tmp = t_2
else if (y <= (-6.2d-204)) then
tmp = (x * (a ** t)) / (a * t_1)
else if (y <= (-9.5d-299)) then
tmp = x * ((a ** (t + (-1.0d0))) / y)
else if (y <= 2.75d+94) then
tmp = (x / t_1) * ((a ** t) / a)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * Math.exp(b);
double t_2 = x * ((Math.pow(z, y) / a) / y);
double tmp;
if (y <= -2.4e+140) {
tmp = t_2;
} else if (y <= -6.2e-204) {
tmp = (x * Math.pow(a, t)) / (a * t_1);
} else if (y <= -9.5e-299) {
tmp = x * (Math.pow(a, (t + -1.0)) / y);
} else if (y <= 2.75e+94) {
tmp = (x / t_1) * (Math.pow(a, t) / a);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * math.exp(b) t_2 = x * ((math.pow(z, y) / a) / y) tmp = 0 if y <= -2.4e+140: tmp = t_2 elif y <= -6.2e-204: tmp = (x * math.pow(a, t)) / (a * t_1) elif y <= -9.5e-299: tmp = x * (math.pow(a, (t + -1.0)) / y) elif y <= 2.75e+94: tmp = (x / t_1) * (math.pow(a, t) / a) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * exp(b)) t_2 = Float64(x * Float64(Float64((z ^ y) / a) / y)) tmp = 0.0 if (y <= -2.4e+140) tmp = t_2; elseif (y <= -6.2e-204) tmp = Float64(Float64(x * (a ^ t)) / Float64(a * t_1)); elseif (y <= -9.5e-299) tmp = Float64(x * Float64((a ^ Float64(t + -1.0)) / y)); elseif (y <= 2.75e+94) tmp = Float64(Float64(x / t_1) * Float64((a ^ t) / a)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * exp(b); t_2 = x * (((z ^ y) / a) / y); tmp = 0.0; if (y <= -2.4e+140) tmp = t_2; elseif (y <= -6.2e-204) tmp = (x * (a ^ t)) / (a * t_1); elseif (y <= -9.5e-299) tmp = x * ((a ^ (t + -1.0)) / y); elseif (y <= 2.75e+94) tmp = (x / t_1) * ((a ^ t) / a); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.4e+140], t$95$2, If[LessEqual[y, -6.2e-204], N[(N[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / N[(a * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -9.5e-299], N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.75e+94], N[(N[(x / t$95$1), $MachinePrecision] * N[(N[Power[a, t], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot e^{b}\\
t_2 := x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\
\mathbf{if}\;y \leq -2.4 \cdot 10^{+140}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -6.2 \cdot 10^{-204}:\\
\;\;\;\;\frac{x \cdot {a}^{t}}{a \cdot t\_1}\\
\mathbf{elif}\;y \leq -9.5 \cdot 10^{-299}:\\
\;\;\;\;x \cdot \frac{{a}^{\left(t + -1\right)}}{y}\\
\mathbf{elif}\;y \leq 2.75 \cdot 10^{+94}:\\
\;\;\;\;\frac{x}{t\_1} \cdot \frac{{a}^{t}}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -2.4e140 or 2.7499999999999999e94 < y Initial program 100.0%
*-commutative100.0%
associate-/l*81.7%
associate--l+81.7%
fma-define81.7%
sub-neg81.7%
metadata-eval81.7%
Simplified81.7%
Taylor expanded in t around 0 95.8%
associate-/l*95.8%
+-commutative95.8%
mul-1-neg95.8%
unsub-neg95.8%
Simplified95.8%
Taylor expanded in b around 0 90.3%
div-exp90.3%
*-commutative90.3%
exp-to-pow90.3%
rem-exp-log90.3%
Simplified90.3%
if -2.4e140 < y < -6.1999999999999998e-204Initial program 97.9%
associate-/l*98.1%
associate--l+98.1%
exp-sum81.4%
associate-/l*81.4%
*-commutative81.4%
exp-to-pow81.4%
exp-diff74.3%
*-commutative74.3%
exp-to-pow75.0%
sub-neg75.0%
metadata-eval75.0%
Simplified75.0%
associate-/l/75.0%
unpow-prod-up75.1%
times-frac75.1%
unpow-175.1%
Applied egg-rr75.1%
Taylor expanded in y around 0 86.5%
if -6.1999999999999998e-204 < y < -9.5000000000000001e-299Initial program 94.7%
associate-/l*98.8%
associate--l+98.8%
exp-sum98.8%
associate-/l*98.8%
*-commutative98.8%
exp-to-pow98.8%
exp-diff68.8%
*-commutative68.8%
exp-to-pow69.8%
sub-neg69.8%
metadata-eval69.8%
Simplified69.8%
Taylor expanded in y around 0 68.8%
associate-/r*68.8%
exp-to-pow69.8%
sub-neg69.8%
metadata-eval69.8%
Simplified69.8%
Taylor expanded in b around 0 84.2%
Simplified85.2%
if -9.5000000000000001e-299 < y < 2.7499999999999999e94Initial program 99.2%
associate-/l*97.2%
associate--l+97.2%
exp-sum91.1%
associate-/l*91.1%
*-commutative91.1%
exp-to-pow91.1%
exp-diff82.4%
*-commutative82.4%
exp-to-pow82.7%
sub-neg82.7%
metadata-eval82.7%
Simplified82.7%
associate-/l/82.7%
unpow-prod-up82.8%
times-frac81.6%
unpow-181.6%
Applied egg-rr81.6%
Taylor expanded in y around 0 83.7%
*-commutative83.7%
times-frac85.3%
Applied egg-rr85.3%
Final simplification87.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -5.5e+44)
(/ x (* y (exp b)))
(if (<= b 0.016)
(* x (* (pow a (+ t -1.0)) (/ (pow z y) y)))
(* x (/ (/ (/ 1.0 a) (exp b)) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -5.5e+44) {
tmp = x / (y * exp(b));
} else if (b <= 0.016) {
tmp = x * (pow(a, (t + -1.0)) * (pow(z, y) / y));
} else {
tmp = x * (((1.0 / 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 (b <= (-5.5d+44)) then
tmp = x / (y * exp(b))
else if (b <= 0.016d0) then
tmp = x * ((a ** (t + (-1.0d0))) * ((z ** y) / y))
else
tmp = x * (((1.0d0 / 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 (b <= -5.5e+44) {
tmp = x / (y * Math.exp(b));
} else if (b <= 0.016) {
tmp = x * (Math.pow(a, (t + -1.0)) * (Math.pow(z, y) / y));
} else {
tmp = x * (((1.0 / a) / Math.exp(b)) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -5.5e+44: tmp = x / (y * math.exp(b)) elif b <= 0.016: tmp = x * (math.pow(a, (t + -1.0)) * (math.pow(z, y) / y)) else: tmp = x * (((1.0 / a) / math.exp(b)) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -5.5e+44) tmp = Float64(x / Float64(y * exp(b))); elseif (b <= 0.016) tmp = Float64(x * Float64((a ^ Float64(t + -1.0)) * Float64((z ^ y) / y))); else tmp = Float64(x * Float64(Float64(Float64(1.0 / a) / exp(b)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -5.5e+44) tmp = x / (y * exp(b)); elseif (b <= 0.016) tmp = x * ((a ^ (t + -1.0)) * ((z ^ y) / y)); else tmp = x * (((1.0 / a) / exp(b)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -5.5e+44], N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 0.016], N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] * N[(N[Power[z, y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(N[(1.0 / a), $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.5 \cdot 10^{+44}:\\
\;\;\;\;\frac{x}{y \cdot e^{b}}\\
\mathbf{elif}\;b \leq 0.016:\\
\;\;\;\;x \cdot \left({a}^{\left(t + -1\right)} \cdot \frac{{z}^{y}}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\frac{\frac{1}{a}}{e^{b}}}{y}\\
\end{array}
\end{array}
if b < -5.5000000000000001e44Initial program 100.0%
*-commutative100.0%
associate-/l*89.6%
associate--l+89.6%
fma-define89.6%
sub-neg89.6%
metadata-eval89.6%
Simplified89.6%
Taylor expanded in b around inf 79.4%
neg-mul-179.4%
Simplified79.4%
exp-neg79.4%
frac-times85.6%
*-un-lft-identity85.6%
*-commutative85.6%
Applied egg-rr85.6%
if -5.5000000000000001e44 < b < 0.016Initial program 97.4%
associate-/l*97.0%
associate--l+97.0%
exp-sum83.5%
associate-/l*80.6%
*-commutative80.6%
exp-to-pow80.6%
exp-diff79.8%
*-commutative79.8%
exp-to-pow80.6%
sub-neg80.6%
metadata-eval80.6%
Simplified80.6%
Taylor expanded in b around 0 85.8%
associate-/l*85.8%
exp-to-pow86.5%
sub-neg86.5%
metadata-eval86.5%
Simplified86.5%
if 0.016 < b Initial program 99.9%
*-commutative99.9%
associate-/l*82.4%
associate--l+82.4%
fma-define82.4%
sub-neg82.4%
metadata-eval82.4%
Simplified82.4%
Taylor expanded in t around 0 92.0%
associate-/l*92.0%
+-commutative92.0%
mul-1-neg92.0%
unsub-neg92.0%
Simplified92.0%
Taylor expanded in y around 0 89.3%
+-commutative89.3%
distribute-neg-in89.3%
neg-mul-189.3%
sub-neg89.3%
exp-diff89.3%
neg-mul-189.3%
log-rec89.3%
rem-exp-log89.4%
Simplified89.4%
Final simplification87.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -3.2e-10)
(/ (* x (pow a t)) (* y a))
(if (<= t 1.55e+132)
(/ (* 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 <= -3.2e-10) {
tmp = (x * pow(a, t)) / (y * a);
} else if (t <= 1.55e+132) {
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 <= (-3.2d-10)) then
tmp = (x * (a ** t)) / (y * a)
else if (t <= 1.55d+132) 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 <= -3.2e-10) {
tmp = (x * Math.pow(a, t)) / (y * a);
} else if (t <= 1.55e+132) {
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 <= -3.2e-10: tmp = (x * math.pow(a, t)) / (y * a) elif t <= 1.55e+132: 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 (t <= -3.2e-10) tmp = Float64(Float64(x * (a ^ t)) / Float64(y * a)); elseif (t <= 1.55e+132) tmp = Float64(Float64(x * (z ^ y)) / Float64(a * Float64(y * exp(b)))); else tmp = Float64(x * Float64((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 <= -3.2e-10) tmp = (x * (a ^ t)) / (y * a); elseif (t <= 1.55e+132) 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[t, -3.2e-10], N[(N[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.55e+132], N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.2 \cdot 10^{-10}:\\
\;\;\;\;\frac{x \cdot {a}^{t}}{y \cdot a}\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{+132}:\\
\;\;\;\;\frac{x \cdot {z}^{y}}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{{a}^{\left(t + -1\right)}}{y}\\
\end{array}
\end{array}
if t < -3.19999999999999981e-10Initial program 98.5%
associate-/l*99.7%
associate--l+99.7%
exp-sum83.5%
associate-/l*83.5%
*-commutative83.5%
exp-to-pow83.5%
exp-diff61.5%
*-commutative61.5%
exp-to-pow61.4%
sub-neg61.4%
metadata-eval61.4%
Simplified61.4%
associate-/l/61.4%
unpow-prod-up61.7%
times-frac61.7%
unpow-161.7%
Applied egg-rr61.7%
Taylor expanded in y around 0 72.1%
Taylor expanded in b around 0 82.6%
*-commutative82.6%
Simplified82.6%
if -3.19999999999999981e-10 < t < 1.5499999999999999e132Initial program 98.4%
associate-/l*97.4%
associate--l+97.4%
exp-sum86.1%
associate-/l*83.4%
*-commutative83.4%
exp-to-pow83.4%
exp-diff80.7%
*-commutative80.7%
exp-to-pow81.4%
sub-neg81.4%
metadata-eval81.4%
Simplified81.4%
Taylor expanded in t around 0 86.1%
if 1.5499999999999999e132 < t Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum76.3%
associate-/l*76.3%
*-commutative76.3%
exp-to-pow76.3%
exp-diff65.8%
*-commutative65.8%
exp-to-pow65.8%
sub-neg65.8%
metadata-eval65.8%
Simplified65.8%
Taylor expanded in y around 0 84.3%
associate-/r*84.3%
exp-to-pow84.3%
sub-neg84.3%
metadata-eval84.3%
Simplified84.3%
Taylor expanded in b around 0 94.8%
Simplified94.8%
Final simplification86.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (+ t -1.0) -1e+16) (not (<= (+ t -1.0) 2e+93))) (* x (/ (pow a (+ t -1.0)) y)) (/ x (* a (* y (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t + -1.0) <= -1e+16) || !((t + -1.0) <= 2e+93)) {
tmp = x * (pow(a, (t + -1.0)) / y);
} else {
tmp = x / (a * (y * 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 (((t + (-1.0d0)) <= (-1d+16)) .or. (.not. ((t + (-1.0d0)) <= 2d+93))) then
tmp = x * ((a ** (t + (-1.0d0))) / y)
else
tmp = x / (a * (y * 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 (((t + -1.0) <= -1e+16) || !((t + -1.0) <= 2e+93)) {
tmp = x * (Math.pow(a, (t + -1.0)) / y);
} else {
tmp = x / (a * (y * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((t + -1.0) <= -1e+16) or not ((t + -1.0) <= 2e+93): tmp = x * (math.pow(a, (t + -1.0)) / y) else: tmp = x / (a * (y * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(t + -1.0) <= -1e+16) || !(Float64(t + -1.0) <= 2e+93)) tmp = Float64(x * Float64((a ^ Float64(t + -1.0)) / y)); else tmp = Float64(x / Float64(a * Float64(y * exp(b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((t + -1.0) <= -1e+16) || ~(((t + -1.0) <= 2e+93))) tmp = x * ((a ^ (t + -1.0)) / y); else tmp = x / (a * (y * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(t + -1.0), $MachinePrecision], -1e+16], N[Not[LessEqual[N[(t + -1.0), $MachinePrecision], 2e+93]], $MachinePrecision]], N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t + -1 \leq -1 \cdot 10^{+16} \lor \neg \left(t + -1 \leq 2 \cdot 10^{+93}\right):\\
\;\;\;\;x \cdot \frac{{a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
if (-.f64 t #s(literal 1 binary64)) < -1e16 or 2.00000000000000009e93 < (-.f64 t #s(literal 1 binary64)) Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum82.2%
associate-/l*82.2%
*-commutative82.2%
exp-to-pow82.2%
exp-diff64.5%
*-commutative64.5%
exp-to-pow64.5%
sub-neg64.5%
metadata-eval64.5%
Simplified64.5%
Taylor expanded in y around 0 76.7%
associate-/r*76.7%
exp-to-pow76.7%
sub-neg76.7%
metadata-eval76.7%
Simplified76.7%
Taylor expanded in b around 0 88.0%
Simplified88.0%
if -1e16 < (-.f64 t #s(literal 1 binary64)) < 2.00000000000000009e93Initial program 97.6%
associate-/l*97.3%
associate--l+97.3%
exp-sum85.2%
associate-/l*82.5%
*-commutative82.5%
exp-to-pow82.5%
exp-diff79.8%
*-commutative79.8%
exp-to-pow80.5%
sub-neg80.5%
metadata-eval80.5%
Simplified80.5%
Taylor expanded in y around 0 72.4%
associate-/r*67.7%
exp-to-pow68.4%
sub-neg68.4%
metadata-eval68.4%
Simplified68.4%
Taylor expanded in t around 0 77.1%
Final simplification81.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (exp b))))
(if (<= b -6.3e+44)
(/ x t_1)
(if (<= b 0.016) (* x (/ (/ (pow z y) a) y)) (/ x (* a t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * exp(b);
double tmp;
if (b <= -6.3e+44) {
tmp = x / t_1;
} else if (b <= 0.016) {
tmp = x * ((pow(z, y) / a) / y);
} else {
tmp = x / (a * 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 = y * exp(b)
if (b <= (-6.3d+44)) then
tmp = x / t_1
else if (b <= 0.016d0) then
tmp = x * (((z ** y) / a) / y)
else
tmp = x / (a * 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 = y * Math.exp(b);
double tmp;
if (b <= -6.3e+44) {
tmp = x / t_1;
} else if (b <= 0.016) {
tmp = x * ((Math.pow(z, y) / a) / y);
} else {
tmp = x / (a * t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * math.exp(b) tmp = 0 if b <= -6.3e+44: tmp = x / t_1 elif b <= 0.016: tmp = x * ((math.pow(z, y) / a) / y) else: tmp = x / (a * t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * exp(b)) tmp = 0.0 if (b <= -6.3e+44) tmp = Float64(x / t_1); elseif (b <= 0.016) tmp = Float64(x * Float64(Float64((z ^ y) / a) / y)); else tmp = Float64(x / Float64(a * t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * exp(b); tmp = 0.0; if (b <= -6.3e+44) tmp = x / t_1; elseif (b <= 0.016) tmp = x * (((z ^ y) / a) / y); else tmp = x / (a * t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -6.3e+44], N[(x / t$95$1), $MachinePrecision], If[LessEqual[b, 0.016], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot e^{b}\\
\mathbf{if}\;b \leq -6.3 \cdot 10^{+44}:\\
\;\;\;\;\frac{x}{t\_1}\\
\mathbf{elif}\;b \leq 0.016:\\
\;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot t\_1}\\
\end{array}
\end{array}
if b < -6.3e44Initial program 100.0%
*-commutative100.0%
associate-/l*89.6%
associate--l+89.6%
fma-define89.6%
sub-neg89.6%
metadata-eval89.6%
Simplified89.6%
Taylor expanded in b around inf 79.4%
neg-mul-179.4%
Simplified79.4%
exp-neg79.4%
frac-times85.6%
*-un-lft-identity85.6%
*-commutative85.6%
Applied egg-rr85.6%
if -6.3e44 < b < 0.016Initial program 97.4%
*-commutative97.4%
associate-/l*88.5%
associate--l+88.5%
fma-define88.5%
sub-neg88.5%
metadata-eval88.5%
Simplified88.5%
Taylor expanded in t around 0 73.1%
associate-/l*73.5%
+-commutative73.5%
mul-1-neg73.5%
unsub-neg73.5%
Simplified73.5%
Taylor expanded in b around 0 73.5%
div-exp73.5%
*-commutative73.5%
exp-to-pow73.5%
rem-exp-log74.3%
Simplified74.3%
if 0.016 < b Initial program 99.9%
associate-/l*100.0%
associate--l+100.0%
exp-sum85.1%
associate-/l*85.1%
*-commutative85.1%
exp-to-pow85.1%
exp-diff66.2%
*-commutative66.2%
exp-to-pow66.2%
sub-neg66.2%
metadata-eval66.2%
Simplified66.2%
Taylor expanded in y around 0 75.7%
associate-/r*68.9%
exp-to-pow69.0%
sub-neg69.0%
metadata-eval69.0%
Simplified69.0%
Taylor expanded in t around 0 89.3%
Final simplification80.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -2.3e+22) (not (<= b 460.0))) (/ x (* y (exp b))) (/ (/ x y) a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -2.3e+22) || !(b <= 460.0)) {
tmp = x / (y * exp(b));
} else {
tmp = (x / y) / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-2.3d+22)) .or. (.not. (b <= 460.0d0))) then
tmp = x / (y * exp(b))
else
tmp = (x / y) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -2.3e+22) || !(b <= 460.0)) {
tmp = x / (y * Math.exp(b));
} else {
tmp = (x / y) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -2.3e+22) or not (b <= 460.0): tmp = x / (y * math.exp(b)) else: tmp = (x / y) / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -2.3e+22) || !(b <= 460.0)) tmp = Float64(x / Float64(y * exp(b))); else tmp = Float64(Float64(x / y) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -2.3e+22) || ~((b <= 460.0))) tmp = x / (y * exp(b)); else tmp = (x / y) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -2.3e+22], N[Not[LessEqual[b, 460.0]], $MachinePrecision]], N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.3 \cdot 10^{+22} \lor \neg \left(b \leq 460\right):\\
\;\;\;\;\frac{x}{y \cdot e^{b}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{a}\\
\end{array}
\end{array}
if b < -2.3000000000000002e22 or 460 < b Initial program 100.0%
*-commutative100.0%
associate-/l*85.6%
associate--l+85.6%
fma-define85.6%
sub-neg85.6%
metadata-eval85.6%
Simplified85.6%
Taylor expanded in b around inf 75.4%
neg-mul-175.4%
Simplified75.4%
exp-neg75.4%
frac-times86.6%
*-un-lft-identity86.6%
*-commutative86.6%
Applied egg-rr86.6%
if -2.3000000000000002e22 < b < 460Initial program 97.3%
associate-/l*96.9%
associate--l+96.9%
exp-sum83.9%
associate-/l*80.8%
*-commutative80.8%
exp-to-pow80.8%
exp-diff80.8%
*-commutative80.8%
exp-to-pow81.6%
sub-neg81.6%
metadata-eval81.6%
Simplified81.6%
Taylor expanded in y around 0 73.9%
associate-/r*73.9%
exp-to-pow74.7%
sub-neg74.7%
metadata-eval74.7%
Simplified74.7%
Taylor expanded in b around 0 73.5%
Simplified74.2%
Taylor expanded in t around 0 41.6%
div-inv41.5%
Applied egg-rr41.5%
associate-*r/41.6%
*-commutative41.6%
*-rgt-identity41.6%
associate-/r*43.9%
Simplified43.9%
Final simplification64.7%
(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.6%
associate-/l*98.4%
associate--l+98.4%
exp-sum84.0%
associate-/l*82.4%
*-commutative82.4%
exp-to-pow82.4%
exp-diff73.4%
*-commutative73.4%
exp-to-pow73.8%
sub-neg73.8%
metadata-eval73.8%
Simplified73.8%
Taylor expanded in y around 0 74.2%
associate-/r*71.4%
exp-to-pow71.9%
sub-neg71.9%
metadata-eval71.9%
Simplified71.9%
Taylor expanded in t around 0 63.8%
Final simplification63.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b -7.5e+17) (/ (* x (+ 1.0 (* b (+ -1.0 (* b (+ 0.5 (* b -0.16666666666666666))))))) y) (/ (/ x y) a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -7.5e+17) {
tmp = (x * (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666))))))) / 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 (b <= (-7.5d+17)) then
tmp = (x * (1.0d0 + (b * ((-1.0d0) + (b * (0.5d0 + (b * (-0.16666666666666666d0)))))))) / 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 (b <= -7.5e+17) {
tmp = (x * (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666))))))) / y;
} else {
tmp = (x / y) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -7.5e+17: tmp = (x * (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666))))))) / y else: tmp = (x / y) / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -7.5e+17) tmp = Float64(Float64(x * Float64(1.0 + Float64(b * Float64(-1.0 + Float64(b * Float64(0.5 + Float64(b * -0.16666666666666666))))))) / y); else tmp = Float64(Float64(x / y) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -7.5e+17) tmp = (x * (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666))))))) / y; else tmp = (x / y) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -7.5e+17], N[(N[(x * N[(1.0 + N[(b * N[(-1.0 + N[(b * N[(0.5 + N[(b * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.5 \cdot 10^{+17}:\\
\;\;\;\;\frac{x \cdot \left(1 + b \cdot \left(-1 + b \cdot \left(0.5 + b \cdot -0.16666666666666666\right)\right)\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{a}\\
\end{array}
\end{array}
if b < -7.5e17Initial program 100.0%
*-commutative100.0%
associate-/l*90.6%
associate--l+90.6%
fma-define90.6%
sub-neg90.6%
metadata-eval90.6%
Simplified90.6%
Taylor expanded in b around inf 75.7%
neg-mul-175.7%
Simplified75.7%
Taylor expanded in b around 0 61.8%
Taylor expanded in y around 0 65.3%
Taylor expanded in x around 0 70.7%
if -7.5e17 < b Initial program 98.3%
associate-/l*98.0%
associate--l+98.0%
exp-sum84.7%
associate-/l*82.7%
*-commutative82.7%
exp-to-pow82.7%
exp-diff75.8%
*-commutative75.8%
exp-to-pow76.3%
sub-neg76.3%
metadata-eval76.3%
Simplified76.3%
Taylor expanded in y around 0 74.8%
associate-/r*72.3%
exp-to-pow72.9%
sub-neg72.9%
metadata-eval72.9%
Simplified72.9%
Taylor expanded in b around 0 60.1%
Simplified60.6%
Taylor expanded in t around 0 33.8%
div-inv33.8%
Applied egg-rr33.8%
associate-*r/33.8%
*-commutative33.8%
*-rgt-identity33.8%
associate-/r*35.1%
Simplified35.1%
Final simplification42.4%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.8e+52) (/ (+ x (* b (+ x (* x (* b 0.5))))) y) (/ (/ x y) a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.8e+52) {
tmp = (x + (b * (x + (x * (b * 0.5))))) / 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 (b <= (-1.8d+52)) then
tmp = (x + (b * (x + (x * (b * 0.5d0))))) / 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 (b <= -1.8e+52) {
tmp = (x + (b * (x + (x * (b * 0.5))))) / y;
} else {
tmp = (x / y) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.8e+52: tmp = (x + (b * (x + (x * (b * 0.5))))) / y else: tmp = (x / y) / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.8e+52) tmp = Float64(Float64(x + Float64(b * Float64(x + Float64(x * Float64(b * 0.5))))) / y); else tmp = Float64(Float64(x / y) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.8e+52) tmp = (x + (b * (x + (x * (b * 0.5))))) / y; else tmp = (x / y) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.8e+52], N[(N[(x + N[(b * N[(x + N[(x * N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.8 \cdot 10^{+52}:\\
\;\;\;\;\frac{x + b \cdot \left(x + x \cdot \left(b \cdot 0.5\right)\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{a}\\
\end{array}
\end{array}
if b < -1.8e52Initial program 100.0%
*-commutative100.0%
associate-/l*89.1%
associate--l+89.1%
fma-define89.1%
sub-neg89.1%
metadata-eval89.1%
Simplified89.1%
Taylor expanded in b around inf 78.5%
neg-mul-178.5%
Simplified78.5%
associate-*r/85.0%
add-sqr-sqrt85.0%
sqrt-unprod85.0%
sqr-neg85.0%
sqrt-unprod0.0%
add-sqr-sqrt16.5%
Applied egg-rr16.5%
Taylor expanded in b around 0 60.3%
associate-*r*60.3%
*-commutative60.3%
Simplified60.3%
if -1.8e52 < b Initial program 98.3%
associate-/l*98.1%
associate--l+98.1%
exp-sum84.2%
associate-/l*82.3%
*-commutative82.3%
exp-to-pow82.3%
exp-diff75.2%
*-commutative75.2%
exp-to-pow75.7%
sub-neg75.7%
metadata-eval75.7%
Simplified75.7%
Taylor expanded in y around 0 74.2%
associate-/r*71.9%
exp-to-pow72.4%
sub-neg72.4%
metadata-eval72.4%
Simplified72.4%
Taylor expanded in b around 0 59.6%
Simplified60.0%
Taylor expanded in t around 0 33.2%
div-inv33.2%
Applied egg-rr33.2%
associate-*r/33.2%
*-commutative33.2%
*-rgt-identity33.2%
associate-/r*34.4%
Simplified34.4%
Final simplification39.1%
(FPCore (x y z t a b) :precision binary64 (if (<= b -8.5e+52) (* x (/ b (- y))) (/ (/ x y) a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -8.5e+52) {
tmp = x * (b / -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 (b <= (-8.5d+52)) then
tmp = x * (b / -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 (b <= -8.5e+52) {
tmp = x * (b / -y);
} else {
tmp = (x / y) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -8.5e+52: tmp = x * (b / -y) else: tmp = (x / y) / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -8.5e+52) tmp = Float64(x * Float64(b / Float64(-y))); else tmp = Float64(Float64(x / y) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -8.5e+52) tmp = x * (b / -y); else tmp = (x / y) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -8.5e+52], N[(x * N[(b / (-y)), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.5 \cdot 10^{+52}:\\
\;\;\;\;x \cdot \frac{b}{-y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{a}\\
\end{array}
\end{array}
if b < -8.49999999999999994e52Initial program 100.0%
*-commutative100.0%
associate-/l*89.1%
associate--l+89.1%
fma-define89.1%
sub-neg89.1%
metadata-eval89.1%
Simplified89.1%
Taylor expanded in b around inf 78.5%
neg-mul-178.5%
Simplified78.5%
Taylor expanded in b around 0 43.6%
Taylor expanded in b around inf 43.6%
associate-*r/43.6%
associate-*r*43.6%
associate-*l/49.7%
associate-*r/49.7%
*-commutative49.7%
mul-1-neg49.7%
distribute-neg-frac249.7%
Simplified49.7%
if -8.49999999999999994e52 < b Initial program 98.3%
associate-/l*98.1%
associate--l+98.1%
exp-sum84.2%
associate-/l*82.3%
*-commutative82.3%
exp-to-pow82.3%
exp-diff75.2%
*-commutative75.2%
exp-to-pow75.7%
sub-neg75.7%
metadata-eval75.7%
Simplified75.7%
Taylor expanded in y around 0 74.2%
associate-/r*71.9%
exp-to-pow72.4%
sub-neg72.4%
metadata-eval72.4%
Simplified72.4%
Taylor expanded in b around 0 59.6%
Simplified60.0%
Taylor expanded in t around 0 33.2%
div-inv33.2%
Applied egg-rr33.2%
associate-*r/33.2%
*-commutative33.2%
*-rgt-identity33.2%
associate-/r*34.4%
Simplified34.4%
Final simplification37.2%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1.45e-58) (/ x (* y a)) (/ (/ x y) a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.45e-58) {
tmp = x / (y * a);
} else {
tmp = (x / y) / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-1.45d-58)) then
tmp = x / (y * a)
else
tmp = (x / y) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.45e-58) {
tmp = x / (y * a);
} else {
tmp = (x / y) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.45e-58: tmp = x / (y * a) else: tmp = (x / y) / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.45e-58) tmp = Float64(x / Float64(y * a)); else tmp = Float64(Float64(x / y) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.45e-58) tmp = x / (y * a); else tmp = (x / y) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.45e-58], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.45 \cdot 10^{-58}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{a}\\
\end{array}
\end{array}
if t < -1.44999999999999995e-58Initial program 98.6%
associate-/l*98.7%
associate--l+98.7%
exp-sum84.5%
associate-/l*84.5%
*-commutative84.5%
exp-to-pow84.5%
exp-diff66.6%
*-commutative66.6%
exp-to-pow66.6%
sub-neg66.6%
metadata-eval66.6%
Simplified66.6%
Taylor expanded in y around 0 71.6%
associate-/r*70.4%
exp-to-pow70.4%
sub-neg70.4%
metadata-eval70.4%
Simplified70.4%
Taylor expanded in b around 0 73.1%
Simplified73.1%
Taylor expanded in t around 0 36.1%
if -1.44999999999999995e-58 < t Initial program 98.6%
associate-/l*98.2%
associate--l+98.2%
exp-sum83.7%
associate-/l*81.4%
*-commutative81.4%
exp-to-pow81.4%
exp-diff76.7%
*-commutative76.7%
exp-to-pow77.3%
sub-neg77.3%
metadata-eval77.3%
Simplified77.3%
Taylor expanded in y around 0 75.5%
associate-/r*72.0%
exp-to-pow72.6%
sub-neg72.6%
metadata-eval72.6%
Simplified72.6%
Taylor expanded in b around 0 50.8%
Simplified51.4%
Taylor expanded in t around 0 30.0%
div-inv30.0%
Applied egg-rr30.0%
associate-*r/30.0%
*-commutative30.0%
*-rgt-identity30.0%
associate-/r*34.9%
Simplified34.9%
Final simplification35.3%
(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.6%
associate-/l*98.4%
associate--l+98.4%
exp-sum84.0%
associate-/l*82.4%
*-commutative82.4%
exp-to-pow82.4%
exp-diff73.4%
*-commutative73.4%
exp-to-pow73.8%
sub-neg73.8%
metadata-eval73.8%
Simplified73.8%
Taylor expanded in y around 0 74.2%
associate-/r*71.4%
exp-to-pow71.9%
sub-neg71.9%
metadata-eval71.9%
Simplified71.9%
Taylor expanded in b around 0 58.1%
Simplified58.5%
Taylor expanded in t around 0 32.0%
Final simplification32.0%
(FPCore (x y z t a b) :precision binary64 (/ x y))
double code(double x, double y, double z, double t, double a, double b) {
return x / 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 / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / y;
}
def code(x, y, z, t, a, b): return x / y
function code(x, y, z, t, a, b) return Float64(x / y) end
function tmp = code(x, y, z, t, a, b) tmp = x / y; end
code[x_, y_, z_, t_, a_, b_] := N[(x / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y}
\end{array}
Initial program 98.6%
*-commutative98.6%
associate-/l*86.9%
associate--l+86.9%
fma-define86.9%
sub-neg86.9%
metadata-eval86.9%
Simplified86.9%
Taylor expanded in b around inf 47.9%
neg-mul-147.9%
Simplified47.9%
Taylor expanded in b around 0 18.6%
Final simplification18.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 2024078
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2, A"
:precision binary64
:alt
(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))