
(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)) (* (log a) (+ t -1.0))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + (log(a) * (t + -1.0))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + (log(a) * (t + (-1.0d0)))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + (Math.log(a) * (t + -1.0))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + (math.log(a) * (t + -1.0))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(log(a) * Float64(t + -1.0))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + (log(a) * (t + -1.0))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[Log[a], $MachinePrecision] * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \log a \cdot \left(t + -1\right)\right) - b}}{y}
\end{array}
Initial program 96.6%
Final simplification96.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -2.45e+92)
(/ (* x (/ (pow z y) a)) y)
(if (<= y 5.8e+53)
(/ (* x (exp (- (* (log a) (+ t -1.0)) b))) y)
(/ (* x (exp (- (- (* y (log z)) (log a)) b))) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.45e+92) {
tmp = (x * (pow(z, y) / a)) / y;
} else if (y <= 5.8e+53) {
tmp = (x * exp(((log(a) * (t + -1.0)) - b))) / y;
} else {
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-2.45d+92)) then
tmp = (x * ((z ** y) / a)) / y
else if (y <= 5.8d+53) then
tmp = (x * exp(((log(a) * (t + (-1.0d0))) - b))) / y
else
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.45e+92) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else if (y <= 5.8e+53) {
tmp = (x * Math.exp(((Math.log(a) * (t + -1.0)) - b))) / y;
} else {
tmp = (x * Math.exp((((y * Math.log(z)) - Math.log(a)) - b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.45e+92: tmp = (x * (math.pow(z, y) / a)) / y elif y <= 5.8e+53: tmp = (x * math.exp(((math.log(a) * (t + -1.0)) - b))) / y else: tmp = (x * math.exp((((y * math.log(z)) - math.log(a)) - b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.45e+92) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); elseif (y <= 5.8e+53) tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * Float64(t + -1.0)) - b))) / y); else tmp = Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) - log(a)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.45e+92) tmp = (x * ((z ^ y) / a)) / y; elseif (y <= 5.8e+53) tmp = (x * exp(((log(a) * (t + -1.0)) - b))) / y; else tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.45e+92], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 5.8e+53], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * N[(t + -1.0), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] - N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.45 \cdot 10^{+92}:\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{+53}:\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot \left(t + -1\right) - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z - \log a\right) - b}}{y}\\
\end{array}
\end{array}
if y < -2.4500000000000001e92Initial program 100.0%
Taylor expanded in t around 0 92.0%
+-commutative92.0%
mul-1-neg92.0%
unsub-neg92.0%
Simplified92.0%
Taylor expanded in b around 0 92.0%
exp-diff92.0%
*-commutative92.0%
exp-to-pow92.0%
rem-exp-log92.0%
Simplified92.0%
if -2.4500000000000001e92 < y < 5.8000000000000004e53Initial program 94.3%
Taylor expanded in y around 0 90.6%
if 5.8000000000000004e53 < y Initial program 100.0%
Taylor expanded in t around 0 96.3%
+-commutative96.3%
mul-1-neg96.3%
unsub-neg96.3%
Simplified96.3%
Final simplification92.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -7.5e+186) (not (<= b 90000000000000.0))) (/ x (* a (* y (exp b)))) (* x (* (/ (pow z y) y) (pow a (+ t -1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -7.5e+186) || !(b <= 90000000000000.0)) {
tmp = x / (a * (y * exp(b)));
} else {
tmp = x * ((pow(z, y) / y) * pow(a, (t + -1.0)));
}
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+186)) .or. (.not. (b <= 90000000000000.0d0))) then
tmp = x / (a * (y * exp(b)))
else
tmp = x * (((z ** y) / y) * (a ** (t + (-1.0d0))))
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+186) || !(b <= 90000000000000.0)) {
tmp = x / (a * (y * Math.exp(b)));
} else {
tmp = x * ((Math.pow(z, y) / y) * Math.pow(a, (t + -1.0)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -7.5e+186) or not (b <= 90000000000000.0): tmp = x / (a * (y * math.exp(b))) else: tmp = x * ((math.pow(z, y) / y) * math.pow(a, (t + -1.0))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -7.5e+186) || !(b <= 90000000000000.0)) tmp = Float64(x / Float64(a * Float64(y * exp(b)))); else tmp = Float64(x * Float64(Float64((z ^ y) / y) * (a ^ Float64(t + -1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -7.5e+186) || ~((b <= 90000000000000.0))) tmp = x / (a * (y * exp(b))); else tmp = x * (((z ^ y) / y) * (a ^ (t + -1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -7.5e+186], N[Not[LessEqual[b, 90000000000000.0]], $MachinePrecision]], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / y), $MachinePrecision] * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.5 \cdot 10^{+186} \lor \neg \left(b \leq 90000000000000\right):\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{{z}^{y}}{y} \cdot {a}^{\left(t + -1\right)}\right)\\
\end{array}
\end{array}
if b < -7.4999999999999998e186 or 9e13 < b Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum77.5%
associate-/l*77.5%
*-commutative77.5%
exp-to-pow77.5%
exp-diff60.0%
*-commutative60.0%
exp-to-pow60.0%
sub-neg60.0%
metadata-eval60.0%
Simplified60.0%
Taylor expanded in t around 0 76.3%
Taylor expanded in y around 0 90.2%
if -7.4999999999999998e186 < b < 9e13Initial program 95.0%
associate-/l*98.7%
associate--l+98.7%
exp-sum81.6%
associate-/l*79.4%
*-commutative79.4%
exp-to-pow79.4%
exp-diff74.8%
*-commutative74.8%
exp-to-pow75.9%
sub-neg75.9%
metadata-eval75.9%
Simplified75.9%
Taylor expanded in b around 0 81.2%
associate-/l*81.2%
exp-to-pow82.1%
sub-neg82.1%
metadata-eval82.1%
Simplified82.1%
Final simplification84.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.65e+96) (not (<= y 1.05e+54))) (/ (* x (/ (pow z y) a)) y) (/ (* x (exp (- (* (log a) (+ t -1.0)) b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.65e+96) || !(y <= 1.05e+54)) {
tmp = (x * (pow(z, y) / a)) / y;
} else {
tmp = (x * exp(((log(a) * (t + -1.0)) - b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-3.65d+96)) .or. (.not. (y <= 1.05d+54))) then
tmp = (x * ((z ** y) / a)) / y
else
tmp = (x * exp(((log(a) * (t + (-1.0d0))) - b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.65e+96) || !(y <= 1.05e+54)) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else {
tmp = (x * Math.exp(((Math.log(a) * (t + -1.0)) - b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.65e+96) or not (y <= 1.05e+54): tmp = (x * (math.pow(z, y) / a)) / y else: tmp = (x * math.exp(((math.log(a) * (t + -1.0)) - b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.65e+96) || !(y <= 1.05e+54)) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * Float64(t + -1.0)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3.65e+96) || ~((y <= 1.05e+54))) tmp = (x * ((z ^ y) / a)) / y; else tmp = (x * exp(((log(a) * (t + -1.0)) - b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.65e+96], N[Not[LessEqual[y, 1.05e+54]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * N[(t + -1.0), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.65 \cdot 10^{+96} \lor \neg \left(y \leq 1.05 \cdot 10^{+54}\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot \left(t + -1\right) - b}}{y}\\
\end{array}
\end{array}
if y < -3.65e96 or 1.04999999999999993e54 < y Initial program 100.0%
Taylor expanded in t around 0 94.2%
+-commutative94.2%
mul-1-neg94.2%
unsub-neg94.2%
Simplified94.2%
Taylor expanded in b around 0 90.3%
exp-diff90.3%
*-commutative90.3%
exp-to-pow90.3%
rem-exp-log90.3%
Simplified90.3%
if -3.65e96 < y < 1.04999999999999993e54Initial program 94.3%
Taylor expanded in y around 0 90.6%
Final simplification90.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.8e+60) (not (<= y 0.09))) (/ (* x (/ (pow z y) a)) y) (* x (/ (pow a t) (* y (* a (exp b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.8e+60) || !(y <= 0.09)) {
tmp = (x * (pow(z, y) / a)) / y;
} else {
tmp = x * (pow(a, t) / (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 <= (-2.8d+60)) .or. (.not. (y <= 0.09d0))) then
tmp = (x * ((z ** y) / a)) / y
else
tmp = x * ((a ** t) / (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 <= -2.8e+60) || !(y <= 0.09)) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else {
tmp = x * (Math.pow(a, t) / (y * (a * Math.exp(b))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.8e+60) or not (y <= 0.09): tmp = (x * (math.pow(z, y) / a)) / y else: tmp = x * (math.pow(a, t) / (y * (a * math.exp(b)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.8e+60) || !(y <= 0.09)) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = Float64(x * Float64((a ^ t) / Float64(y * Float64(a * exp(b))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2.8e+60) || ~((y <= 0.09))) tmp = (x * ((z ^ y) / a)) / y; else tmp = x * ((a ^ t) / (y * (a * exp(b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.8e+60], N[Not[LessEqual[y, 0.09]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x * N[(N[Power[a, t], $MachinePrecision] / N[(y * N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{+60} \lor \neg \left(y \leq 0.09\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{{a}^{t}}{y \cdot \left(a \cdot e^{b}\right)}\\
\end{array}
\end{array}
if y < -2.8e60 or 0.089999999999999997 < y Initial program 99.9%
Taylor expanded in t around 0 88.5%
+-commutative88.5%
mul-1-neg88.5%
unsub-neg88.5%
Simplified88.5%
Taylor expanded in b around 0 85.3%
exp-diff85.2%
*-commutative85.2%
exp-to-pow85.2%
rem-exp-log85.3%
Simplified85.3%
if -2.8e60 < y < 0.089999999999999997Initial program 93.5%
associate-/l*98.4%
associate--l+98.4%
exp-sum92.5%
associate-/l*92.5%
*-commutative92.5%
exp-to-pow92.5%
exp-diff81.3%
*-commutative81.3%
exp-to-pow82.6%
sub-neg82.6%
metadata-eval82.6%
Simplified82.6%
associate-/l/82.6%
unpow-prod-up82.8%
associate-/l*78.4%
unpow-178.4%
Applied egg-rr78.4%
associate-*r/82.8%
times-frac82.0%
associate-*l/82.8%
associate-/l/82.8%
associate-*r/82.8%
*-rgt-identity82.8%
Simplified82.8%
Taylor expanded in y around 0 81.3%
associate-*r*77.6%
*-commutative77.6%
associate-*r*81.3%
Simplified81.3%
Final simplification83.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (/ (pow z y) (* y a)))) (t_2 (/ x (* a (* y (exp b))))))
(if (<= b -1.6e-8)
t_2
(if (<= b -3.1e-171)
t_1
(if (<= b 8.6e-239)
(* x (/ (pow a t) (* y a)))
(if (<= b 60000.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (pow(z, y) / (y * a));
double t_2 = x / (a * (y * exp(b)));
double tmp;
if (b <= -1.6e-8) {
tmp = t_2;
} else if (b <= -3.1e-171) {
tmp = t_1;
} else if (b <= 8.6e-239) {
tmp = x * (pow(a, t) / (y * a));
} else if (b <= 60000.0) {
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 * ((z ** y) / (y * a))
t_2 = x / (a * (y * exp(b)))
if (b <= (-1.6d-8)) then
tmp = t_2
else if (b <= (-3.1d-171)) then
tmp = t_1
else if (b <= 8.6d-239) then
tmp = x * ((a ** t) / (y * a))
else if (b <= 60000.0d0) 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(z, y) / (y * a));
double t_2 = x / (a * (y * Math.exp(b)));
double tmp;
if (b <= -1.6e-8) {
tmp = t_2;
} else if (b <= -3.1e-171) {
tmp = t_1;
} else if (b <= 8.6e-239) {
tmp = x * (Math.pow(a, t) / (y * a));
} else if (b <= 60000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * (math.pow(z, y) / (y * a)) t_2 = x / (a * (y * math.exp(b))) tmp = 0 if b <= -1.6e-8: tmp = t_2 elif b <= -3.1e-171: tmp = t_1 elif b <= 8.6e-239: tmp = x * (math.pow(a, t) / (y * a)) elif b <= 60000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64((z ^ y) / Float64(y * a))) t_2 = Float64(x / Float64(a * Float64(y * exp(b)))) tmp = 0.0 if (b <= -1.6e-8) tmp = t_2; elseif (b <= -3.1e-171) tmp = t_1; elseif (b <= 8.6e-239) tmp = Float64(x * Float64((a ^ t) / Float64(y * a))); elseif (b <= 60000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * ((z ^ y) / (y * a)); t_2 = x / (a * (y * exp(b))); tmp = 0.0; if (b <= -1.6e-8) tmp = t_2; elseif (b <= -3.1e-171) tmp = t_1; elseif (b <= 8.6e-239) tmp = x * ((a ^ t) / (y * a)); elseif (b <= 60000.0) 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[Power[z, y], $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.6e-8], t$95$2, If[LessEqual[b, -3.1e-171], t$95$1, If[LessEqual[b, 8.6e-239], N[(x * N[(N[Power[a, t], $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 60000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{{z}^{y}}{y \cdot a}\\
t_2 := \frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{if}\;b \leq -1.6 \cdot 10^{-8}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -3.1 \cdot 10^{-171}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 8.6 \cdot 10^{-239}:\\
\;\;\;\;x \cdot \frac{{a}^{t}}{y \cdot a}\\
\mathbf{elif}\;b \leq 60000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -1.6000000000000001e-8 or 6e4 < b Initial program 99.9%
associate-/l*99.9%
associate--l+99.9%
exp-sum79.9%
associate-/l*79.9%
*-commutative79.9%
exp-to-pow79.9%
exp-diff62.3%
*-commutative62.3%
exp-to-pow62.4%
sub-neg62.4%
metadata-eval62.4%
Simplified62.4%
Taylor expanded in t around 0 73.7%
Taylor expanded in y around 0 82.7%
if -1.6000000000000001e-8 < b < -3.1e-171 or 8.6000000000000001e-239 < b < 6e4Initial program 93.5%
associate-/l*98.4%
associate--l+98.4%
exp-sum82.4%
associate-/l*81.1%
*-commutative81.1%
exp-to-pow81.1%
exp-diff81.1%
*-commutative81.1%
exp-to-pow82.4%
sub-neg82.4%
metadata-eval82.4%
Simplified82.4%
Taylor expanded in t around 0 69.0%
Taylor expanded in b around 0 69.3%
if -3.1e-171 < b < 8.6000000000000001e-239Initial program 93.1%
associate-/l*98.1%
associate--l+98.1%
exp-sum78.1%
associate-/l*72.1%
*-commutative72.1%
exp-to-pow72.1%
exp-diff72.1%
*-commutative72.1%
exp-to-pow73.6%
sub-neg73.6%
metadata-eval73.6%
Simplified73.6%
associate-/l/73.6%
unpow-prod-up73.9%
associate-/l*71.9%
unpow-171.9%
Applied egg-rr71.9%
associate-*r/73.9%
times-frac73.9%
associate-*l/73.9%
associate-/l/73.9%
associate-*r/73.8%
*-rgt-identity73.8%
Simplified73.8%
Taylor expanded in y around 0 79.8%
associate-*r*79.8%
*-commutative79.8%
associate-*r*79.8%
Simplified79.8%
Taylor expanded in b around 0 79.8%
Final simplification77.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -1.35e-5)
(* x (/ (pow a t) (* y a)))
(if (<= t 4.5e-147)
(* x (/ (pow z y) (* y a)))
(if (<= t 8e+50)
(/ x (* a (* y (exp b))))
(* (pow a (+ t -1.0)) (/ x y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.35e-5) {
tmp = x * (pow(a, t) / (y * a));
} else if (t <= 4.5e-147) {
tmp = x * (pow(z, y) / (y * a));
} else if (t <= 8e+50) {
tmp = x / (a * (y * exp(b)));
} else {
tmp = pow(a, (t + -1.0)) * (x / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-1.35d-5)) then
tmp = x * ((a ** t) / (y * a))
else if (t <= 4.5d-147) then
tmp = x * ((z ** y) / (y * a))
else if (t <= 8d+50) then
tmp = x / (a * (y * exp(b)))
else
tmp = (a ** (t + (-1.0d0))) * (x / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.35e-5) {
tmp = x * (Math.pow(a, t) / (y * a));
} else if (t <= 4.5e-147) {
tmp = x * (Math.pow(z, y) / (y * a));
} else if (t <= 8e+50) {
tmp = x / (a * (y * Math.exp(b)));
} else {
tmp = Math.pow(a, (t + -1.0)) * (x / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.35e-5: tmp = x * (math.pow(a, t) / (y * a)) elif t <= 4.5e-147: tmp = x * (math.pow(z, y) / (y * a)) elif t <= 8e+50: tmp = x / (a * (y * math.exp(b))) else: tmp = math.pow(a, (t + -1.0)) * (x / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.35e-5) tmp = Float64(x * Float64((a ^ t) / Float64(y * a))); elseif (t <= 4.5e-147) tmp = Float64(x * Float64((z ^ y) / Float64(y * a))); elseif (t <= 8e+50) tmp = Float64(x / Float64(a * Float64(y * exp(b)))); else tmp = Float64((a ^ Float64(t + -1.0)) * Float64(x / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.35e-5) tmp = x * ((a ^ t) / (y * a)); elseif (t <= 4.5e-147) tmp = x * ((z ^ y) / (y * a)); elseif (t <= 8e+50) tmp = x / (a * (y * exp(b))); else tmp = (a ^ (t + -1.0)) * (x / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.35e-5], N[(x * N[(N[Power[a, t], $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.5e-147], N[(x * N[(N[Power[z, y], $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8e+50], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.35 \cdot 10^{-5}:\\
\;\;\;\;x \cdot \frac{{a}^{t}}{y \cdot a}\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{-147}:\\
\;\;\;\;x \cdot \frac{{z}^{y}}{y \cdot a}\\
\mathbf{elif}\;t \leq 8 \cdot 10^{+50}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{else}:\\
\;\;\;\;{a}^{\left(t + -1\right)} \cdot \frac{x}{y}\\
\end{array}
\end{array}
if t < -1.3499999999999999e-5Initial program 98.4%
associate-/l*99.6%
associate--l+99.6%
exp-sum70.8%
associate-/l*70.8%
*-commutative70.8%
exp-to-pow70.8%
exp-diff54.2%
*-commutative54.2%
exp-to-pow54.4%
sub-neg54.4%
metadata-eval54.4%
Simplified54.4%
associate-/l/54.4%
unpow-prod-up54.5%
associate-/l*54.5%
unpow-154.5%
Applied egg-rr54.5%
associate-*r/54.5%
times-frac53.0%
associate-*l/54.5%
associate-/l/54.5%
associate-*r/54.5%
*-rgt-identity54.5%
Simplified54.5%
Taylor expanded in y around 0 69.8%
associate-*r*68.3%
*-commutative68.3%
associate-*r*69.8%
Simplified69.8%
Taylor expanded in b around 0 79.1%
if -1.3499999999999999e-5 < t < 4.49999999999999973e-147Initial program 93.1%
associate-/l*98.2%
associate--l+98.2%
exp-sum89.7%
associate-/l*85.5%
*-commutative85.5%
exp-to-pow85.5%
exp-diff85.5%
*-commutative85.5%
exp-to-pow87.2%
sub-neg87.2%
metadata-eval87.2%
Simplified87.2%
Taylor expanded in t around 0 87.3%
Taylor expanded in b around 0 76.9%
if 4.49999999999999973e-147 < t < 8.0000000000000006e50Initial program 96.4%
associate-/l*99.0%
associate--l+99.0%
exp-sum92.9%
associate-/l*92.9%
*-commutative92.9%
exp-to-pow92.9%
exp-diff80.8%
*-commutative80.8%
exp-to-pow81.2%
sub-neg81.2%
metadata-eval81.2%
Simplified81.2%
Taylor expanded in t around 0 87.3%
Taylor expanded in y around 0 81.6%
if 8.0000000000000006e50 < t Initial program 100.0%
Taylor expanded in y around 0 87.3%
Taylor expanded in b around 0 80.9%
*-commutative80.9%
exp-to-pow80.9%
sub-neg80.9%
metadata-eval80.9%
associate-*r/71.2%
+-commutative71.2%
Simplified71.2%
Final simplification76.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (/ (pow z y) a)) y)))
(if (<= y -1.6e+60)
t_1
(if (<= y -1.5e-194)
(* (pow a (+ t -1.0)) (/ x y))
(if (<= y 0.076) (/ x (* a (* y (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.6e+60) {
tmp = t_1;
} else if (y <= -1.5e-194) {
tmp = pow(a, (t + -1.0)) * (x / y);
} else if (y <= 0.076) {
tmp = x / (a * (y * 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.6d+60)) then
tmp = t_1
else if (y <= (-1.5d-194)) then
tmp = (a ** (t + (-1.0d0))) * (x / y)
else if (y <= 0.076d0) then
tmp = x / (a * (y * 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.6e+60) {
tmp = t_1;
} else if (y <= -1.5e-194) {
tmp = Math.pow(a, (t + -1.0)) * (x / y);
} else if (y <= 0.076) {
tmp = x / (a * (y * 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.6e+60: tmp = t_1 elif y <= -1.5e-194: tmp = math.pow(a, (t + -1.0)) * (x / y) elif y <= 0.076: tmp = x / (a * (y * 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.6e+60) tmp = t_1; elseif (y <= -1.5e-194) tmp = Float64((a ^ Float64(t + -1.0)) * Float64(x / y)); elseif (y <= 0.076) tmp = Float64(x / Float64(a * Float64(y * 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.6e+60) tmp = t_1; elseif (y <= -1.5e-194) tmp = (a ^ (t + -1.0)) * (x / y); elseif (y <= 0.076) tmp = x / (a * (y * 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.6e+60], t$95$1, If[LessEqual[y, -1.5e-194], N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.076], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $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.6 \cdot 10^{+60}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.5 \cdot 10^{-194}:\\
\;\;\;\;{a}^{\left(t + -1\right)} \cdot \frac{x}{y}\\
\mathbf{elif}\;y \leq 0.076:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.59999999999999995e60 or 0.0759999999999999981 < y Initial program 99.9%
Taylor expanded in t around 0 88.5%
+-commutative88.5%
mul-1-neg88.5%
unsub-neg88.5%
Simplified88.5%
Taylor expanded in b around 0 85.3%
exp-diff85.2%
*-commutative85.2%
exp-to-pow85.2%
rem-exp-log85.3%
Simplified85.3%
if -1.59999999999999995e60 < y < -1.5e-194Initial program 95.2%
Taylor expanded in y around 0 91.4%
Taylor expanded in b around 0 81.8%
*-commutative81.8%
exp-to-pow82.4%
sub-neg82.4%
metadata-eval82.4%
associate-*r/83.9%
+-commutative83.9%
Simplified83.9%
if -1.5e-194 < y < 0.0759999999999999981Initial program 92.5%
associate-/l*98.3%
associate--l+98.3%
exp-sum98.3%
associate-/l*98.3%
*-commutative98.3%
exp-to-pow98.3%
exp-diff85.2%
*-commutative85.2%
exp-to-pow86.7%
sub-neg86.7%
metadata-eval86.7%
Simplified86.7%
Taylor expanded in t around 0 75.9%
Taylor expanded in y around 0 76.0%
Final simplification82.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (/ (pow z y) a)) y)))
(if (<= y -7e+61)
t_1
(if (<= y -3.6e-252)
(/ (* x (pow a (+ t -1.0))) y)
(if (<= y 0.082) (/ x (* a (* y (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 <= -7e+61) {
tmp = t_1;
} else if (y <= -3.6e-252) {
tmp = (x * pow(a, (t + -1.0))) / y;
} else if (y <= 0.082) {
tmp = x / (a * (y * 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 <= (-7d+61)) then
tmp = t_1
else if (y <= (-3.6d-252)) then
tmp = (x * (a ** (t + (-1.0d0)))) / y
else if (y <= 0.082d0) then
tmp = x / (a * (y * 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 <= -7e+61) {
tmp = t_1;
} else if (y <= -3.6e-252) {
tmp = (x * Math.pow(a, (t + -1.0))) / y;
} else if (y <= 0.082) {
tmp = x / (a * (y * 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 <= -7e+61: tmp = t_1 elif y <= -3.6e-252: tmp = (x * math.pow(a, (t + -1.0))) / y elif y <= 0.082: tmp = x / (a * (y * 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 <= -7e+61) tmp = t_1; elseif (y <= -3.6e-252) tmp = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y); elseif (y <= 0.082) tmp = Float64(x / Float64(a * Float64(y * 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 <= -7e+61) tmp = t_1; elseif (y <= -3.6e-252) tmp = (x * (a ^ (t + -1.0))) / y; elseif (y <= 0.082) tmp = x / (a * (y * 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, -7e+61], t$95$1, If[LessEqual[y, -3.6e-252], N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 0.082], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $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 -7 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.6 \cdot 10^{-252}:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{elif}\;y \leq 0.082:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -7.00000000000000036e61 or 0.0820000000000000034 < y Initial program 99.9%
Taylor expanded in t around 0 88.5%
+-commutative88.5%
mul-1-neg88.5%
unsub-neg88.5%
Simplified88.5%
Taylor expanded in b around 0 85.3%
exp-diff85.2%
*-commutative85.2%
exp-to-pow85.2%
rem-exp-log85.3%
Simplified85.3%
if -7.00000000000000036e61 < y < -3.60000000000000023e-252Initial program 94.6%
Taylor expanded in y around 0 91.5%
Taylor expanded in b around 0 80.8%
exp-to-pow81.5%
sub-neg81.5%
metadata-eval81.5%
+-commutative81.5%
Simplified81.5%
if -3.60000000000000023e-252 < y < 0.0820000000000000034Initial program 92.6%
associate-/l*98.3%
associate--l+98.3%
exp-sum98.3%
associate-/l*98.3%
*-commutative98.3%
exp-to-pow98.3%
exp-diff87.0%
*-commutative87.0%
exp-to-pow88.5%
sub-neg88.5%
metadata-eval88.5%
Simplified88.5%
Taylor expanded in t around 0 77.0%
Taylor expanded in y around 0 77.1%
Final simplification82.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.55e-20) (not (<= b 9.4e-11))) (/ x (* a (* y (exp b)))) (* x (/ (pow a t) (* y a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.55e-20) || !(b <= 9.4e-11)) {
tmp = x / (a * (y * exp(b)));
} else {
tmp = x * (pow(a, t) / (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.55d-20)) .or. (.not. (b <= 9.4d-11))) then
tmp = x / (a * (y * exp(b)))
else
tmp = x * ((a ** t) / (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.55e-20) || !(b <= 9.4e-11)) {
tmp = x / (a * (y * Math.exp(b)));
} else {
tmp = x * (Math.pow(a, t) / (y * a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.55e-20) or not (b <= 9.4e-11): tmp = x / (a * (y * math.exp(b))) else: tmp = x * (math.pow(a, t) / (y * a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.55e-20) || !(b <= 9.4e-11)) tmp = Float64(x / Float64(a * Float64(y * exp(b)))); else tmp = Float64(x * Float64((a ^ t) / Float64(y * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -1.55e-20) || ~((b <= 9.4e-11))) tmp = x / (a * (y * exp(b))); else tmp = x * ((a ^ t) / (y * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.55e-20], N[Not[LessEqual[b, 9.4e-11]], $MachinePrecision]], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Power[a, t], $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.55 \cdot 10^{-20} \lor \neg \left(b \leq 9.4 \cdot 10^{-11}\right):\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{{a}^{t}}{y \cdot a}\\
\end{array}
\end{array}
if b < -1.55e-20 or 9.39999999999999985e-11 < b Initial program 99.9%
associate-/l*99.9%
associate--l+99.9%
exp-sum78.7%
associate-/l*78.7%
*-commutative78.7%
exp-to-pow78.7%
exp-diff62.0%
*-commutative62.0%
exp-to-pow62.1%
sub-neg62.1%
metadata-eval62.1%
Simplified62.1%
Taylor expanded in t around 0 73.6%
Taylor expanded in y around 0 79.9%
if -1.55e-20 < b < 9.39999999999999985e-11Initial program 93.0%
associate-/l*98.3%
associate--l+98.3%
exp-sum82.1%
associate-/l*78.9%
*-commutative78.9%
exp-to-pow78.9%
exp-diff78.9%
*-commutative78.9%
exp-to-pow80.3%
sub-neg80.3%
metadata-eval80.3%
Simplified80.3%
associate-/l/80.3%
unpow-prod-up80.5%
associate-/l*74.9%
unpow-174.9%
Applied egg-rr74.9%
associate-*r/80.5%
times-frac80.5%
associate-*l/80.5%
associate-/l/80.5%
associate-*r/80.5%
*-rgt-identity80.5%
Simplified80.5%
Taylor expanded in y around 0 65.8%
associate-*r*65.8%
*-commutative65.8%
associate-*r*65.8%
Simplified65.8%
Taylor expanded in b around 0 65.8%
Final simplification73.1%
(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 96.6%
associate-/l*99.1%
associate--l+99.1%
exp-sum80.3%
associate-/l*78.8%
*-commutative78.8%
exp-to-pow78.8%
exp-diff70.2%
*-commutative70.2%
exp-to-pow70.9%
sub-neg70.9%
metadata-eval70.9%
Simplified70.9%
Taylor expanded in t around 0 68.8%
Taylor expanded in y around 0 60.1%
Final simplification60.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -1.25e+173)
(* x (- (/ (/ b y) (- a)) (/ -1.0 (* y a))))
(if (<= b -1.5)
(/ (* a (- (* y (/ x y)) (* x b))) (* y (* a a)))
(/
x
(*
a
(+
y
(* b (+ y (* b (+ (* 0.16666666666666666 (* y b)) (* y 0.5)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.25e+173) {
tmp = x * (((b / y) / -a) - (-1.0 / (y * a)));
} else if (b <= -1.5) {
tmp = (a * ((y * (x / y)) - (x * b))) / (y * (a * a));
} else {
tmp = x / (a * (y + (b * (y + (b * ((0.16666666666666666 * (y * b)) + (y * 0.5)))))));
}
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.25d+173)) then
tmp = x * (((b / y) / -a) - ((-1.0d0) / (y * a)))
else if (b <= (-1.5d0)) then
tmp = (a * ((y * (x / y)) - (x * b))) / (y * (a * a))
else
tmp = x / (a * (y + (b * (y + (b * ((0.16666666666666666d0 * (y * b)) + (y * 0.5d0)))))))
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.25e+173) {
tmp = x * (((b / y) / -a) - (-1.0 / (y * a)));
} else if (b <= -1.5) {
tmp = (a * ((y * (x / y)) - (x * b))) / (y * (a * a));
} else {
tmp = x / (a * (y + (b * (y + (b * ((0.16666666666666666 * (y * b)) + (y * 0.5)))))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.25e+173: tmp = x * (((b / y) / -a) - (-1.0 / (y * a))) elif b <= -1.5: tmp = (a * ((y * (x / y)) - (x * b))) / (y * (a * a)) else: tmp = x / (a * (y + (b * (y + (b * ((0.16666666666666666 * (y * b)) + (y * 0.5))))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.25e+173) tmp = Float64(x * Float64(Float64(Float64(b / y) / Float64(-a)) - Float64(-1.0 / Float64(y * a)))); elseif (b <= -1.5) tmp = Float64(Float64(a * Float64(Float64(y * Float64(x / y)) - Float64(x * b))) / Float64(y * Float64(a * a))); else tmp = Float64(x / Float64(a * Float64(y + Float64(b * Float64(y + Float64(b * Float64(Float64(0.16666666666666666 * Float64(y * b)) + Float64(y * 0.5)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.25e+173) tmp = x * (((b / y) / -a) - (-1.0 / (y * a))); elseif (b <= -1.5) tmp = (a * ((y * (x / y)) - (x * b))) / (y * (a * a)); else tmp = x / (a * (y + (b * (y + (b * ((0.16666666666666666 * (y * b)) + (y * 0.5))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.25e+173], N[(x * N[(N[(N[(b / y), $MachinePrecision] / (-a)), $MachinePrecision] - N[(-1.0 / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1.5], N[(N[(a * N[(N[(y * N[(x / y), $MachinePrecision]), $MachinePrecision] - N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y + N[(b * N[(y + N[(b * N[(N[(0.16666666666666666 * N[(y * b), $MachinePrecision]), $MachinePrecision] + N[(y * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.25 \cdot 10^{+173}:\\
\;\;\;\;x \cdot \left(\frac{\frac{b}{y}}{-a} - \frac{-1}{y \cdot a}\right)\\
\mathbf{elif}\;b \leq -1.5:\\
\;\;\;\;\frac{a \cdot \left(y \cdot \frac{x}{y} - x \cdot b\right)}{y \cdot \left(a \cdot a\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + b \cdot \left(y + b \cdot \left(0.16666666666666666 \cdot \left(y \cdot b\right) + y \cdot 0.5\right)\right)\right)}\\
\end{array}
\end{array}
if b < -1.25000000000000009e173Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum88.0%
associate-/l*88.0%
*-commutative88.0%
exp-to-pow88.0%
exp-diff76.0%
*-commutative76.0%
exp-to-pow76.0%
sub-neg76.0%
metadata-eval76.0%
Simplified76.0%
Taylor expanded in t around 0 88.0%
Taylor expanded in y around 0 100.0%
Taylor expanded in b around 0 50.3%
Taylor expanded in x around -inf 54.2%
mul-1-neg54.2%
*-commutative54.2%
distribute-rgt-neg-in54.2%
sub-neg54.2%
*-commutative54.2%
associate-/r*69.4%
distribute-neg-frac69.4%
metadata-eval69.4%
Simplified69.4%
if -1.25000000000000009e173 < b < -1.5Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum81.6%
associate-/l*81.6%
*-commutative81.6%
exp-to-pow81.6%
exp-diff63.2%
*-commutative63.2%
exp-to-pow63.2%
sub-neg63.2%
metadata-eval63.2%
Simplified63.2%
Taylor expanded in t around 0 66.1%
Taylor expanded in y around 0 66.3%
Taylor expanded in b around 0 34.3%
+-commutative34.3%
*-un-lft-identity34.3%
frac-times31.8%
associate-*l/31.8%
*-un-lft-identity31.8%
associate-*r/31.8%
frac-add43.4%
Applied egg-rr43.4%
+-commutative43.4%
*-commutative43.4%
associate-*l*46.0%
distribute-lft-out46.0%
mul-1-neg46.0%
distribute-rgt-neg-in46.0%
associate-*r*48.1%
Simplified48.1%
if -1.5 < b Initial program 95.4%
associate-/l*98.8%
associate--l+98.8%
exp-sum79.1%
associate-/l*77.0%
*-commutative77.0%
exp-to-pow77.0%
exp-diff70.8%
*-commutative70.8%
exp-to-pow71.8%
sub-neg71.8%
metadata-eval71.8%
Simplified71.8%
Taylor expanded in t around 0 66.8%
Taylor expanded in y around 0 53.7%
Taylor expanded in b around 0 48.9%
Final simplification50.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -1.25e+173)
(* x (- (/ (/ b y) (- a)) (/ -1.0 (* y a))))
(if (<= b -1.12e+21)
(/ (* a (- (* y (/ x y)) (* x b))) (* y (* a a)))
(/ x (* a (+ y (* b (+ y (* (* y b) 0.5)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.25e+173) {
tmp = x * (((b / y) / -a) - (-1.0 / (y * a)));
} else if (b <= -1.12e+21) {
tmp = (a * ((y * (x / y)) - (x * b))) / (y * (a * a));
} else {
tmp = x / (a * (y + (b * (y + ((y * b) * 0.5)))));
}
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.25d+173)) then
tmp = x * (((b / y) / -a) - ((-1.0d0) / (y * a)))
else if (b <= (-1.12d+21)) then
tmp = (a * ((y * (x / y)) - (x * b))) / (y * (a * a))
else
tmp = x / (a * (y + (b * (y + ((y * b) * 0.5d0)))))
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.25e+173) {
tmp = x * (((b / y) / -a) - (-1.0 / (y * a)));
} else if (b <= -1.12e+21) {
tmp = (a * ((y * (x / y)) - (x * b))) / (y * (a * a));
} else {
tmp = x / (a * (y + (b * (y + ((y * b) * 0.5)))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.25e+173: tmp = x * (((b / y) / -a) - (-1.0 / (y * a))) elif b <= -1.12e+21: tmp = (a * ((y * (x / y)) - (x * b))) / (y * (a * a)) else: tmp = x / (a * (y + (b * (y + ((y * b) * 0.5))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.25e+173) tmp = Float64(x * Float64(Float64(Float64(b / y) / Float64(-a)) - Float64(-1.0 / Float64(y * a)))); elseif (b <= -1.12e+21) tmp = Float64(Float64(a * Float64(Float64(y * Float64(x / y)) - Float64(x * b))) / Float64(y * Float64(a * a))); else tmp = Float64(x / Float64(a * Float64(y + Float64(b * Float64(y + Float64(Float64(y * b) * 0.5)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.25e+173) tmp = x * (((b / y) / -a) - (-1.0 / (y * a))); elseif (b <= -1.12e+21) tmp = (a * ((y * (x / y)) - (x * b))) / (y * (a * a)); else tmp = x / (a * (y + (b * (y + ((y * b) * 0.5))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.25e+173], N[(x * N[(N[(N[(b / y), $MachinePrecision] / (-a)), $MachinePrecision] - N[(-1.0 / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1.12e+21], N[(N[(a * N[(N[(y * N[(x / y), $MachinePrecision]), $MachinePrecision] - N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y + N[(b * N[(y + N[(N[(y * b), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.25 \cdot 10^{+173}:\\
\;\;\;\;x \cdot \left(\frac{\frac{b}{y}}{-a} - \frac{-1}{y \cdot a}\right)\\
\mathbf{elif}\;b \leq -1.12 \cdot 10^{+21}:\\
\;\;\;\;\frac{a \cdot \left(y \cdot \frac{x}{y} - x \cdot b\right)}{y \cdot \left(a \cdot a\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + b \cdot \left(y + \left(y \cdot b\right) \cdot 0.5\right)\right)}\\
\end{array}
\end{array}
if b < -1.25000000000000009e173Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum88.0%
associate-/l*88.0%
*-commutative88.0%
exp-to-pow88.0%
exp-diff76.0%
*-commutative76.0%
exp-to-pow76.0%
sub-neg76.0%
metadata-eval76.0%
Simplified76.0%
Taylor expanded in t around 0 88.0%
Taylor expanded in y around 0 100.0%
Taylor expanded in b around 0 50.3%
Taylor expanded in x around -inf 54.2%
mul-1-neg54.2%
*-commutative54.2%
distribute-rgt-neg-in54.2%
sub-neg54.2%
*-commutative54.2%
associate-/r*69.4%
distribute-neg-frac69.4%
metadata-eval69.4%
Simplified69.4%
if -1.25000000000000009e173 < b < -1.12e21Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum84.4%
associate-/l*84.4%
*-commutative84.4%
exp-to-pow84.4%
exp-diff62.5%
*-commutative62.5%
exp-to-pow62.5%
sub-neg62.5%
metadata-eval62.5%
Simplified62.5%
Taylor expanded in t around 0 66.0%
Taylor expanded in y around 0 66.2%
Taylor expanded in b around 0 37.1%
+-commutative37.1%
*-un-lft-identity37.1%
frac-times34.1%
associate-*l/34.1%
*-un-lft-identity34.1%
associate-*r/34.1%
frac-add48.0%
Applied egg-rr48.0%
+-commutative48.0%
*-commutative48.0%
associate-*l*51.1%
distribute-lft-out51.1%
mul-1-neg51.1%
distribute-rgt-neg-in51.1%
associate-*r*53.6%
Simplified53.6%
if -1.12e21 < b Initial program 95.6%
associate-/l*98.8%
associate--l+98.8%
exp-sum78.7%
associate-/l*76.7%
*-commutative76.7%
exp-to-pow76.7%
exp-diff70.7%
*-commutative70.7%
exp-to-pow71.6%
sub-neg71.6%
metadata-eval71.6%
Simplified71.6%
Taylor expanded in t around 0 66.8%
Taylor expanded in y around 0 54.1%
Taylor expanded in b around 0 42.7%
Final simplification46.7%
(FPCore (x y z t a b) :precision binary64 (if (<= b -3.5e+115) (* x (- (/ (/ b y) (- a)) (/ -1.0 (* y a)))) (/ x (* a (+ y (* b (+ y (* (* y b) 0.5))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -3.5e+115) {
tmp = x * (((b / y) / -a) - (-1.0 / (y * a)));
} else {
tmp = x / (a * (y + (b * (y + ((y * b) * 0.5)))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-3.5d+115)) then
tmp = x * (((b / y) / -a) - ((-1.0d0) / (y * a)))
else
tmp = x / (a * (y + (b * (y + ((y * b) * 0.5d0)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -3.5e+115) {
tmp = x * (((b / y) / -a) - (-1.0 / (y * a)));
} else {
tmp = x / (a * (y + (b * (y + ((y * b) * 0.5)))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -3.5e+115: tmp = x * (((b / y) / -a) - (-1.0 / (y * a))) else: tmp = x / (a * (y + (b * (y + ((y * b) * 0.5))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -3.5e+115) tmp = Float64(x * Float64(Float64(Float64(b / y) / Float64(-a)) - Float64(-1.0 / Float64(y * a)))); else tmp = Float64(x / Float64(a * Float64(y + Float64(b * Float64(y + Float64(Float64(y * b) * 0.5)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -3.5e+115) tmp = x * (((b / y) / -a) - (-1.0 / (y * a))); else tmp = x / (a * (y + (b * (y + ((y * b) * 0.5))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -3.5e+115], N[(x * N[(N[(N[(b / y), $MachinePrecision] / (-a)), $MachinePrecision] - N[(-1.0 / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y + N[(b * N[(y + N[(N[(y * b), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.5 \cdot 10^{+115}:\\
\;\;\;\;x \cdot \left(\frac{\frac{b}{y}}{-a} - \frac{-1}{y \cdot a}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + b \cdot \left(y + \left(y \cdot b\right) \cdot 0.5\right)\right)}\\
\end{array}
\end{array}
if b < -3.50000000000000005e115Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum91.9%
associate-/l*91.9%
*-commutative91.9%
exp-to-pow91.9%
exp-diff70.3%
*-commutative70.3%
exp-to-pow70.3%
sub-neg70.3%
metadata-eval70.3%
Simplified70.3%
Taylor expanded in t around 0 81.2%
Taylor expanded in y around 0 89.4%
Taylor expanded in b around 0 53.5%
Taylor expanded in x around -inf 51.0%
mul-1-neg51.0%
*-commutative51.0%
distribute-rgt-neg-in51.0%
sub-neg51.0%
*-commutative51.0%
associate-/r*61.3%
distribute-neg-frac61.3%
metadata-eval61.3%
Simplified61.3%
if -3.50000000000000005e115 < b Initial program 96.0%
associate-/l*99.0%
associate--l+99.0%
exp-sum78.4%
associate-/l*76.6%
*-commutative76.6%
exp-to-pow76.6%
exp-diff70.2%
*-commutative70.2%
exp-to-pow71.0%
sub-neg71.0%
metadata-eval71.0%
Simplified71.0%
Taylor expanded in t around 0 66.7%
Taylor expanded in y around 0 55.1%
Taylor expanded in b around 0 41.8%
Final simplification44.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b -0.74) (/ (* (/ x a) (- (- -1.0) b)) y) (/ x (* a (+ y (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -0.74) {
tmp = ((x / a) * (-(-1.0) - b)) / y;
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-0.74d0)) then
tmp = ((x / a) * (-(-1.0d0) - b)) / y
else
tmp = x / (a * (y + (y * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -0.74) {
tmp = ((x / a) * (-(-1.0) - b)) / y;
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -0.74: tmp = ((x / a) * (-(-1.0) - b)) / y else: tmp = x / (a * (y + (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -0.74) tmp = Float64(Float64(Float64(x / a) * Float64(Float64(-(-1.0)) - b)) / y); else tmp = Float64(x / Float64(a * Float64(y + Float64(y * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -0.74) tmp = ((x / a) * (-(-1.0) - b)) / y; else tmp = x / (a * (y + (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -0.74], N[(N[(N[(x / a), $MachinePrecision] * N[((--1.0) - b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(a * N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -0.74:\\
\;\;\;\;\frac{\frac{x}{a} \cdot \left(\left(--1\right) - b\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\end{array}
\end{array}
if b < -0.73999999999999999Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum84.1%
associate-/l*84.1%
*-commutative84.1%
exp-to-pow84.1%
exp-diff68.3%
*-commutative68.3%
exp-to-pow68.3%
sub-neg68.3%
metadata-eval68.3%
Simplified68.3%
Taylor expanded in t around 0 74.8%
Taylor expanded in y around 0 79.7%
Taylor expanded in b around 0 40.7%
Taylor expanded in y around -inf 50.9%
mul-1-neg50.9%
distribute-neg-frac250.9%
+-commutative50.9%
associate-/l*47.9%
distribute-rgt-out47.9%
Simplified47.9%
if -0.73999999999999999 < b Initial program 95.4%
associate-/l*98.8%
associate--l+98.8%
exp-sum79.1%
associate-/l*77.0%
*-commutative77.0%
exp-to-pow77.0%
exp-diff70.8%
*-commutative70.8%
exp-to-pow71.8%
sub-neg71.8%
metadata-eval71.8%
Simplified71.8%
Taylor expanded in t around 0 66.8%
Taylor expanded in y around 0 53.7%
Taylor expanded in b around 0 37.9%
Final simplification40.3%
(FPCore (x y z t a b) :precision binary64 (if (<= b -0.85) (/ (* b (/ x (- y))) a) (/ x (* a (+ y (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -0.85) {
tmp = (b * (x / -y)) / a;
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-0.85d0)) then
tmp = (b * (x / -y)) / a
else
tmp = x / (a * (y + (y * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -0.85) {
tmp = (b * (x / -y)) / a;
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -0.85: tmp = (b * (x / -y)) / a else: tmp = x / (a * (y + (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -0.85) tmp = Float64(Float64(b * Float64(x / Float64(-y))) / a); else tmp = Float64(x / Float64(a * Float64(y + Float64(y * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -0.85) tmp = (b * (x / -y)) / a; else tmp = x / (a * (y + (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -0.85], N[(N[(b * N[(x / (-y)), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(x / N[(a * N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -0.85:\\
\;\;\;\;\frac{b \cdot \frac{x}{-y}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\end{array}
\end{array}
if b < -0.849999999999999978Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum84.1%
associate-/l*84.1%
*-commutative84.1%
exp-to-pow84.1%
exp-diff68.3%
*-commutative68.3%
exp-to-pow68.3%
sub-neg68.3%
metadata-eval68.3%
Simplified68.3%
Taylor expanded in t around 0 74.8%
Taylor expanded in y around 0 79.7%
Taylor expanded in b around 0 40.7%
Taylor expanded in b around inf 40.7%
times-frac42.1%
associate-*l/42.2%
associate-*r/36.4%
associate-*r*36.4%
associate-*r/42.2%
neg-mul-142.2%
Simplified42.2%
if -0.849999999999999978 < b Initial program 95.4%
associate-/l*98.8%
associate--l+98.8%
exp-sum79.1%
associate-/l*77.0%
*-commutative77.0%
exp-to-pow77.0%
exp-diff70.8%
*-commutative70.8%
exp-to-pow71.8%
sub-neg71.8%
metadata-eval71.8%
Simplified71.8%
Taylor expanded in t around 0 66.8%
Taylor expanded in y around 0 53.7%
Taylor expanded in b around 0 37.9%
Final simplification38.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b -5.1e-5) (* b (/ x (* y (- a)))) (/ (/ x y) a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -5.1e-5) {
tmp = b * (x / (y * -a));
} else {
tmp = (x / y) / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-5.1d-5)) then
tmp = b * (x / (y * -a))
else
tmp = (x / y) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -5.1e-5) {
tmp = b * (x / (y * -a));
} else {
tmp = (x / y) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -5.1e-5: tmp = b * (x / (y * -a)) else: tmp = (x / y) / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -5.1e-5) tmp = Float64(b * Float64(x / Float64(y * Float64(-a)))); else tmp = Float64(Float64(x / y) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -5.1e-5) tmp = b * (x / (y * -a)); else tmp = (x / y) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -5.1e-5], N[(b * N[(x / N[(y * (-a)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.1 \cdot 10^{-5}:\\
\;\;\;\;b \cdot \frac{x}{y \cdot \left(-a\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{a}\\
\end{array}
\end{array}
if b < -5.09999999999999996e-5Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum84.4%
associate-/l*84.4%
*-commutative84.4%
exp-to-pow84.4%
exp-diff68.8%
*-commutative68.8%
exp-to-pow68.8%
sub-neg68.8%
metadata-eval68.8%
Simplified68.8%
Taylor expanded in t around 0 75.2%
Taylor expanded in y around 0 80.0%
Taylor expanded in b around 0 41.6%
Taylor expanded in b around inf 41.6%
associate-*r/41.6%
mul-1-neg41.6%
distribute-rgt-neg-in41.6%
associate-*r/38.8%
Simplified38.8%
if -5.09999999999999996e-5 < b Initial program 95.4%
Taylor expanded in y around 0 72.0%
Taylor expanded in b around 0 60.8%
*-commutative60.8%
exp-to-pow61.3%
sub-neg61.3%
metadata-eval61.3%
associate-*r/59.2%
+-commutative59.2%
Simplified59.2%
Taylor expanded in t around 0 34.6%
Taylor expanded in a around 0 34.2%
associate-/l/34.6%
Simplified34.6%
Final simplification35.7%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.15e+136) (/ (* b (/ x (- y))) a) (/ x (* y a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.15e+136) {
tmp = (b * (x / -y)) / a;
} else {
tmp = x / (y * a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-1.15d+136)) then
tmp = (b * (x / -y)) / a
else
tmp = x / (y * a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.15e+136) {
tmp = (b * (x / -y)) / a;
} else {
tmp = x / (y * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.15e+136: tmp = (b * (x / -y)) / a else: tmp = x / (y * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.15e+136) tmp = Float64(Float64(b * Float64(x / Float64(-y))) / a); else tmp = Float64(x / Float64(y * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.15e+136) tmp = (b * (x / -y)) / a; else tmp = x / (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.15e+136], N[(N[(b * N[(x / (-y)), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.15 \cdot 10^{+136}:\\
\;\;\;\;\frac{b \cdot \frac{x}{-y}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\end{array}
\end{array}
if b < -1.15e136Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum90.9%
associate-/l*90.9%
*-commutative90.9%
exp-to-pow90.9%
exp-diff69.7%
*-commutative69.7%
exp-to-pow69.7%
sub-neg69.7%
metadata-eval69.7%
Simplified69.7%
Taylor expanded in t around 0 81.9%
Taylor expanded in y around 0 91.1%
Taylor expanded in b around 0 53.7%
Taylor expanded in b around inf 53.7%
times-frac53.8%
associate-*l/59.5%
associate-*r/48.4%
associate-*r*48.4%
associate-*r/59.5%
neg-mul-159.5%
Simplified59.5%
if -1.15e136 < b Initial program 96.1%
associate-/l*99.0%
associate--l+99.0%
exp-sum78.8%
associate-/l*77.0%
*-commutative77.0%
exp-to-pow77.0%
exp-diff70.3%
*-commutative70.3%
exp-to-pow71.1%
sub-neg71.1%
metadata-eval71.1%
Simplified71.1%
Taylor expanded in t around 0 66.9%
Taylor expanded in y around 0 55.5%
Taylor expanded in b around 0 33.4%
Final simplification36.8%
(FPCore (x y z t a b) :precision binary64 (if (<= a 4e-101) (/ (/ x a) y) (/ x (* y a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 4e-101) {
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 <= 4d-101) 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 <= 4e-101) {
tmp = (x / a) / y;
} else {
tmp = x / (y * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= 4e-101: tmp = (x / a) / y else: tmp = x / (y * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= 4e-101) 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 <= 4e-101) tmp = (x / a) / y; else tmp = x / (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, 4e-101], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 4 \cdot 10^{-101}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\end{array}
\end{array}
if a < 4.00000000000000021e-101Initial program 99.4%
Taylor expanded in t around 0 87.1%
+-commutative87.1%
mul-1-neg87.1%
unsub-neg87.1%
Simplified87.1%
Taylor expanded in b around 0 73.0%
exp-diff72.9%
*-commutative72.9%
exp-to-pow72.9%
rem-exp-log73.5%
Simplified73.5%
Taylor expanded in y around 0 42.9%
if 4.00000000000000021e-101 < a Initial program 95.3%
associate-/l*99.0%
associate--l+99.0%
exp-sum81.5%
associate-/l*79.2%
*-commutative79.2%
exp-to-pow79.2%
exp-diff67.4%
*-commutative67.4%
exp-to-pow68.1%
sub-neg68.1%
metadata-eval68.1%
Simplified68.1%
Taylor expanded in t around 0 64.4%
Taylor expanded in y around 0 56.6%
Taylor expanded in b around 0 31.7%
Final simplification35.1%
(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 96.6%
associate-/l*99.1%
associate--l+99.1%
exp-sum80.3%
associate-/l*78.8%
*-commutative78.8%
exp-to-pow78.8%
exp-diff70.2%
*-commutative70.2%
exp-to-pow70.9%
sub-neg70.9%
metadata-eval70.9%
Simplified70.9%
Taylor expanded in t around 0 68.8%
Taylor expanded in y around 0 60.1%
Taylor expanded in b around 0 32.9%
Final simplification32.9%
(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 2024082
(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))