
(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 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (+ t -1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t + -1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t + (-1.0d0)) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t + -1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t + -1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t + -1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t + -1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t + -1\right) \cdot \log a\right) - b}}{y}
\end{array}
Initial program 98.3%
Final simplification98.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.7e+42) (not (<= y 2e+96))) (/ (* x (exp (- (- (* y (log z)) (log a)) b))) y) (/ (* x (exp (- (* (+ t -1.0) (log a)) b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.7e+42) || !(y <= 2e+96)) {
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y;
} else {
tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-3.7d+42)) .or. (.not. (y <= 2d+96))) then
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y
else
tmp = (x * exp((((t + (-1.0d0)) * log(a)) - b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.7e+42) || !(y <= 2e+96)) {
tmp = (x * Math.exp((((y * Math.log(z)) - Math.log(a)) - b))) / y;
} else {
tmp = (x * Math.exp((((t + -1.0) * Math.log(a)) - b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.7e+42) or not (y <= 2e+96): tmp = (x * math.exp((((y * math.log(z)) - math.log(a)) - b))) / y else: tmp = (x * math.exp((((t + -1.0) * math.log(a)) - b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.7e+42) || !(y <= 2e+96)) tmp = Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) - log(a)) - b))) / y); else tmp = Float64(Float64(x * exp(Float64(Float64(Float64(t + -1.0) * log(a)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3.7e+42) || ~((y <= 2e+96))) tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y; else tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.7e+42], N[Not[LessEqual[y, 2e+96]], $MachinePrecision]], N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] - N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.7 \cdot 10^{+42} \lor \neg \left(y \leq 2 \cdot 10^{+96}\right):\\
\;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z - \log a\right) - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(t + -1\right) \cdot \log a - b}}{y}\\
\end{array}
\end{array}
if y < -3.69999999999999996e42 or 2.0000000000000001e96 < y Initial program 100.0%
Taylor expanded in t around 0 94.3%
+-commutative94.3%
mul-1-neg94.3%
unsub-neg94.3%
Simplified94.3%
if -3.69999999999999996e42 < y < 2.0000000000000001e96Initial program 97.2%
Taylor expanded in y around 0 94.4%
Final simplification94.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.15e+126) (not (<= y 5e+110))) (* x (/ (/ (pow z y) a) y)) (/ (* x (exp (- (* (+ t -1.0) (log a)) b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.15e+126) || !(y <= 5e+110)) {
tmp = x * ((pow(z, y) / a) / y);
} else {
tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-2.15d+126)) .or. (.not. (y <= 5d+110))) then
tmp = x * (((z ** y) / a) / y)
else
tmp = (x * exp((((t + (-1.0d0)) * log(a)) - b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.15e+126) || !(y <= 5e+110)) {
tmp = x * ((Math.pow(z, y) / a) / y);
} else {
tmp = (x * Math.exp((((t + -1.0) * Math.log(a)) - b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.15e+126) or not (y <= 5e+110): tmp = x * ((math.pow(z, y) / a) / y) else: tmp = (x * math.exp((((t + -1.0) * math.log(a)) - b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.15e+126) || !(y <= 5e+110)) tmp = Float64(x * Float64(Float64((z ^ y) / a) / y)); else tmp = Float64(Float64(x * exp(Float64(Float64(Float64(t + -1.0) * log(a)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2.15e+126) || ~((y <= 5e+110))) tmp = x * (((z ^ y) / a) / y); else tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.15e+126], N[Not[LessEqual[y, 5e+110]], $MachinePrecision]], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.15 \cdot 10^{+126} \lor \neg \left(y \leq 5 \cdot 10^{+110}\right):\\
\;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(t + -1\right) \cdot \log a - b}}{y}\\
\end{array}
\end{array}
if y < -2.1500000000000001e126 or 4.99999999999999978e110 < y Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum64.7%
associate-/l*60.0%
*-commutative60.0%
exp-to-pow60.0%
exp-diff52.9%
*-commutative52.9%
exp-to-pow52.9%
sub-neg52.9%
metadata-eval52.9%
Simplified52.9%
Taylor expanded in t around 0 71.8%
Taylor expanded in x around 0 70.6%
*-rgt-identity70.6%
associate-*r/70.6%
associate-*l*70.6%
associate-/r*71.8%
rem-exp-log71.8%
log-rec71.8%
rem-exp-log31.8%
exp-sum31.8%
+-commutative31.8%
exp-diff31.8%
associate--r+31.8%
exp-diff31.8%
exp-diff31.8%
log-rec31.8%
rem-exp-log31.8%
associate-/r*31.8%
*-commutative31.8%
rem-exp-log71.8%
Simplified77.7%
Taylor expanded in b around 0 88.4%
if -2.1500000000000001e126 < y < 4.99999999999999978e110Initial program 97.5%
Taylor expanded in y around 0 92.7%
Final simplification91.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -6.5e+70) (not (<= t 1.9))) (/ (* x (exp (- (* t (log a)) b))) y) (* x (/ (/ (pow z y) (* a (exp b))) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -6.5e+70) || !(t <= 1.9)) {
tmp = (x * exp(((t * log(a)) - b))) / y;
} else {
tmp = x * ((pow(z, y) / (a * exp(b))) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-6.5d+70)) .or. (.not. (t <= 1.9d0))) then
tmp = (x * exp(((t * log(a)) - b))) / y
else
tmp = x * (((z ** y) / (a * exp(b))) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -6.5e+70) || !(t <= 1.9)) {
tmp = (x * Math.exp(((t * Math.log(a)) - b))) / y;
} else {
tmp = x * ((Math.pow(z, y) / (a * Math.exp(b))) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -6.5e+70) or not (t <= 1.9): tmp = (x * math.exp(((t * math.log(a)) - b))) / y else: tmp = x * ((math.pow(z, y) / (a * math.exp(b))) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -6.5e+70) || !(t <= 1.9)) tmp = Float64(Float64(x * exp(Float64(Float64(t * log(a)) - b))) / y); else tmp = Float64(x * Float64(Float64((z ^ y) / Float64(a * exp(b))) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -6.5e+70) || ~((t <= 1.9))) tmp = (x * exp(((t * log(a)) - b))) / y; else tmp = x * (((z ^ y) / (a * exp(b))) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -6.5e+70], N[Not[LessEqual[t, 1.9]], $MachinePrecision]], N[(N[(x * N[Exp[N[(N[(t * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{+70} \lor \neg \left(t \leq 1.9\right):\\
\;\;\;\;\frac{x \cdot e^{t \cdot \log a - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a \cdot e^{b}}}{y}\\
\end{array}
\end{array}
if t < -6.49999999999999978e70 or 1.8999999999999999 < t Initial program 100.0%
Taylor expanded in y around 0 89.7%
Taylor expanded in t around inf 89.7%
if -6.49999999999999978e70 < t < 1.8999999999999999Initial program 96.9%
associate-/l*98.1%
associate--l+98.1%
exp-sum83.2%
associate-/l*80.4%
*-commutative80.4%
exp-to-pow80.4%
exp-diff76.1%
*-commutative76.1%
exp-to-pow77.2%
sub-neg77.2%
metadata-eval77.2%
Simplified77.2%
Taylor expanded in t around 0 83.9%
Taylor expanded in x around 0 83.8%
*-rgt-identity83.8%
associate-*r/83.1%
associate-*l*83.1%
associate-/r*83.9%
rem-exp-log82.8%
log-rec82.8%
rem-exp-log38.3%
exp-sum38.3%
+-commutative38.3%
exp-diff38.2%
associate--r+38.2%
exp-diff38.3%
exp-diff38.3%
log-rec38.3%
rem-exp-log38.2%
associate-/r*38.2%
*-commutative38.2%
rem-exp-log83.9%
Simplified86.7%
Final simplification88.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -10500.0) (not (<= t 0.65))) (/ (* x (exp (- (* t (log a)) b))) y) (* x (/ (/ (pow z y) a) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -10500.0) || !(t <= 0.65)) {
tmp = (x * exp(((t * log(a)) - b))) / y;
} else {
tmp = x * ((pow(z, y) / a) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-10500.0d0)) .or. (.not. (t <= 0.65d0))) then
tmp = (x * exp(((t * log(a)) - b))) / y
else
tmp = x * (((z ** y) / a) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -10500.0) || !(t <= 0.65)) {
tmp = (x * Math.exp(((t * Math.log(a)) - b))) / y;
} else {
tmp = x * ((Math.pow(z, y) / a) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -10500.0) or not (t <= 0.65): tmp = (x * math.exp(((t * math.log(a)) - b))) / y else: tmp = x * ((math.pow(z, y) / a) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -10500.0) || !(t <= 0.65)) tmp = Float64(Float64(x * exp(Float64(Float64(t * log(a)) - b))) / y); else tmp = Float64(x * Float64(Float64((z ^ y) / a) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -10500.0) || ~((t <= 0.65))) tmp = (x * exp(((t * log(a)) - b))) / y; else tmp = x * (((z ^ y) / a) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -10500.0], N[Not[LessEqual[t, 0.65]], $MachinePrecision]], N[(N[(x * N[Exp[N[(N[(t * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -10500 \lor \neg \left(t \leq 0.65\right):\\
\;\;\;\;\frac{x \cdot e^{t \cdot \log a - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\
\end{array}
\end{array}
if t < -10500 or 0.650000000000000022 < t Initial program 100.0%
Taylor expanded in y around 0 87.1%
Taylor expanded in t around inf 87.1%
if -10500 < t < 0.650000000000000022Initial program 96.3%
associate-/l*97.7%
associate--l+97.7%
exp-sum85.1%
associate-/l*81.8%
*-commutative81.8%
exp-to-pow81.8%
exp-diff81.8%
*-commutative81.8%
exp-to-pow83.0%
sub-neg83.0%
metadata-eval83.0%
Simplified83.0%
Taylor expanded in t around 0 83.3%
Taylor expanded in x around 0 84.0%
*-rgt-identity84.0%
associate-*r/83.3%
associate-*l*83.3%
associate-/r*83.3%
rem-exp-log82.1%
log-rec82.1%
rem-exp-log39.4%
exp-sum39.4%
+-commutative39.4%
exp-diff39.3%
associate--r+39.3%
exp-diff39.4%
exp-diff39.4%
log-rec39.4%
rem-exp-log39.4%
associate-/r*39.4%
*-commutative39.4%
rem-exp-log83.3%
Simplified86.7%
Taylor expanded in b around 0 79.0%
Final simplification83.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -2.3e+77)
(* x (/ (pow a t) y))
(if (<= t -1.55e-116)
(* x (/ (/ (pow z y) a) y))
(if (<= t 8e-130)
(/ x (* a (* y (exp b))))
(if (<= t 0.000215)
(*
x
(*
(pow z y)
(/ (+ (/ 1.0 a) (* b (+ (* 0.5 (/ b a)) (/ -1.0 a)))) y)))
(/ (* x (pow a (+ t -1.0))) y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.3e+77) {
tmp = x * (pow(a, t) / y);
} else if (t <= -1.55e-116) {
tmp = x * ((pow(z, y) / a) / y);
} else if (t <= 8e-130) {
tmp = x / (a * (y * exp(b)));
} else if (t <= 0.000215) {
tmp = x * (pow(z, y) * (((1.0 / a) + (b * ((0.5 * (b / a)) + (-1.0 / a)))) / y));
} else {
tmp = (x * pow(a, (t + -1.0))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-2.3d+77)) then
tmp = x * ((a ** t) / y)
else if (t <= (-1.55d-116)) then
tmp = x * (((z ** y) / a) / y)
else if (t <= 8d-130) then
tmp = x / (a * (y * exp(b)))
else if (t <= 0.000215d0) then
tmp = x * ((z ** y) * (((1.0d0 / a) + (b * ((0.5d0 * (b / a)) + ((-1.0d0) / a)))) / y))
else
tmp = (x * (a ** (t + (-1.0d0)))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.3e+77) {
tmp = x * (Math.pow(a, t) / y);
} else if (t <= -1.55e-116) {
tmp = x * ((Math.pow(z, y) / a) / y);
} else if (t <= 8e-130) {
tmp = x / (a * (y * Math.exp(b)));
} else if (t <= 0.000215) {
tmp = x * (Math.pow(z, y) * (((1.0 / a) + (b * ((0.5 * (b / a)) + (-1.0 / a)))) / y));
} else {
tmp = (x * Math.pow(a, (t + -1.0))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.3e+77: tmp = x * (math.pow(a, t) / y) elif t <= -1.55e-116: tmp = x * ((math.pow(z, y) / a) / y) elif t <= 8e-130: tmp = x / (a * (y * math.exp(b))) elif t <= 0.000215: tmp = x * (math.pow(z, y) * (((1.0 / a) + (b * ((0.5 * (b / a)) + (-1.0 / a)))) / y)) else: tmp = (x * math.pow(a, (t + -1.0))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.3e+77) tmp = Float64(x * Float64((a ^ t) / y)); elseif (t <= -1.55e-116) tmp = Float64(x * Float64(Float64((z ^ y) / a) / y)); elseif (t <= 8e-130) tmp = Float64(x / Float64(a * Float64(y * exp(b)))); elseif (t <= 0.000215) tmp = Float64(x * Float64((z ^ y) * Float64(Float64(Float64(1.0 / a) + Float64(b * Float64(Float64(0.5 * Float64(b / a)) + Float64(-1.0 / a)))) / y))); else tmp = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -2.3e+77) tmp = x * ((a ^ t) / y); elseif (t <= -1.55e-116) tmp = x * (((z ^ y) / a) / y); elseif (t <= 8e-130) tmp = x / (a * (y * exp(b))); elseif (t <= 0.000215) tmp = x * ((z ^ y) * (((1.0 / a) + (b * ((0.5 * (b / a)) + (-1.0 / a)))) / y)); else tmp = (x * (a ^ (t + -1.0))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.3e+77], N[(x * N[(N[Power[a, t], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.55e-116], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8e-130], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.000215], N[(x * N[(N[Power[z, y], $MachinePrecision] * N[(N[(N[(1.0 / a), $MachinePrecision] + N[(b * N[(N[(0.5 * N[(b / a), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.3 \cdot 10^{+77}:\\
\;\;\;\;x \cdot \frac{{a}^{t}}{y}\\
\mathbf{elif}\;t \leq -1.55 \cdot 10^{-116}:\\
\;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\
\mathbf{elif}\;t \leq 8 \cdot 10^{-130}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{elif}\;t \leq 0.000215:\\
\;\;\;\;x \cdot \left({z}^{y} \cdot \frac{\frac{1}{a} + b \cdot \left(0.5 \cdot \frac{b}{a} + \frac{-1}{a}\right)}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\end{array}
\end{array}
if t < -2.29999999999999995e77Initial program 100.0%
Taylor expanded in y around 0 93.7%
Taylor expanded in t around inf 93.7%
Taylor expanded in b around 0 87.4%
associate-/l*87.4%
Simplified87.4%
if -2.29999999999999995e77 < t < -1.55000000000000009e-116Initial program 97.3%
associate-/l*99.2%
associate--l+99.2%
exp-sum75.2%
associate-/l*70.9%
*-commutative70.9%
exp-to-pow70.9%
exp-diff57.8%
*-commutative57.8%
exp-to-pow58.5%
sub-neg58.5%
metadata-eval58.5%
Simplified58.5%
Taylor expanded in t around 0 78.4%
Taylor expanded in x around 0 76.2%
*-rgt-identity76.2%
associate-*r/76.2%
associate-*l*76.2%
associate-/r*78.4%
rem-exp-log77.7%
log-rec77.7%
rem-exp-log40.8%
exp-sum40.8%
+-commutative40.8%
exp-diff40.8%
associate--r+40.8%
exp-diff40.8%
exp-diff40.8%
log-rec40.8%
rem-exp-log40.8%
associate-/r*40.8%
*-commutative40.8%
rem-exp-log78.4%
Simplified82.7%
Taylor expanded in b around 0 74.6%
if -1.55000000000000009e-116 < t < 8.0000000000000007e-130Initial program 96.3%
associate-/l*97.4%
associate--l+97.4%
exp-sum82.3%
associate-/l*79.6%
*-commutative79.6%
exp-to-pow79.6%
exp-diff79.6%
*-commutative79.6%
exp-to-pow80.8%
sub-neg80.8%
metadata-eval80.8%
Simplified80.8%
Taylor expanded in y around 0 72.2%
times-frac76.3%
exp-to-pow77.4%
sub-neg77.4%
metadata-eval77.4%
Simplified77.4%
Taylor expanded in t around 0 82.4%
if 8.0000000000000007e-130 < t < 2.14999999999999995e-4Initial program 98.8%
associate-/l*98.8%
associate--l+98.8%
exp-sum98.8%
associate-/l*98.8%
*-commutative98.8%
exp-to-pow98.8%
exp-diff98.8%
*-commutative98.8%
exp-to-pow99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around 0 99.9%
Taylor expanded in b around 0 95.8%
if 2.14999999999999995e-4 < t Initial program 99.8%
Taylor expanded in y around 0 87.9%
Taylor expanded in b around 0 80.5%
exp-to-pow80.5%
sub-neg80.5%
metadata-eval80.5%
+-commutative80.5%
Simplified80.5%
Final simplification82.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (/ (/ (pow z y) a) y))))
(if (<= y -2.5e+42)
t_1
(if (<= y 2.7e-296)
(* (/ x y) (/ (pow a t) a))
(if (<= y 5.9e-226)
(/ x (* a (* y (exp b))))
(if (<= y 210000000.0) (/ (* x (pow a (+ t -1.0))) y) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * ((pow(z, y) / a) / y);
double tmp;
if (y <= -2.5e+42) {
tmp = t_1;
} else if (y <= 2.7e-296) {
tmp = (x / y) * (pow(a, t) / a);
} else if (y <= 5.9e-226) {
tmp = x / (a * (y * exp(b)));
} else if (y <= 210000000.0) {
tmp = (x * pow(a, (t + -1.0))) / y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x * (((z ** y) / a) / y)
if (y <= (-2.5d+42)) then
tmp = t_1
else if (y <= 2.7d-296) then
tmp = (x / y) * ((a ** t) / a)
else if (y <= 5.9d-226) then
tmp = x / (a * (y * exp(b)))
else if (y <= 210000000.0d0) then
tmp = (x * (a ** (t + (-1.0d0)))) / y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * ((Math.pow(z, y) / a) / y);
double tmp;
if (y <= -2.5e+42) {
tmp = t_1;
} else if (y <= 2.7e-296) {
tmp = (x / y) * (Math.pow(a, t) / a);
} else if (y <= 5.9e-226) {
tmp = x / (a * (y * Math.exp(b)));
} else if (y <= 210000000.0) {
tmp = (x * Math.pow(a, (t + -1.0))) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * ((math.pow(z, y) / a) / y) tmp = 0 if y <= -2.5e+42: tmp = t_1 elif y <= 2.7e-296: tmp = (x / y) * (math.pow(a, t) / a) elif y <= 5.9e-226: tmp = x / (a * (y * math.exp(b))) elif y <= 210000000.0: tmp = (x * math.pow(a, (t + -1.0))) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64(Float64((z ^ y) / a) / y)) tmp = 0.0 if (y <= -2.5e+42) tmp = t_1; elseif (y <= 2.7e-296) tmp = Float64(Float64(x / y) * Float64((a ^ t) / a)); elseif (y <= 5.9e-226) tmp = Float64(x / Float64(a * Float64(y * exp(b)))); elseif (y <= 210000000.0) tmp = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * (((z ^ y) / a) / y); tmp = 0.0; if (y <= -2.5e+42) tmp = t_1; elseif (y <= 2.7e-296) tmp = (x / y) * ((a ^ t) / a); elseif (y <= 5.9e-226) tmp = x / (a * (y * exp(b))); elseif (y <= 210000000.0) tmp = (x * (a ^ (t + -1.0))) / y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.5e+42], t$95$1, If[LessEqual[y, 2.7e-296], N[(N[(x / y), $MachinePrecision] * N[(N[Power[a, t], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.9e-226], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 210000000.0], N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\
\mathbf{if}\;y \leq -2.5 \cdot 10^{+42}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{-296}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{{a}^{t}}{a}\\
\mathbf{elif}\;y \leq 5.9 \cdot 10^{-226}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{elif}\;y \leq 210000000:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.50000000000000003e42 or 2.1e8 < y Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum61.3%
associate-/l*58.0%
*-commutative58.0%
exp-to-pow58.0%
exp-diff50.4%
*-commutative50.4%
exp-to-pow50.4%
sub-neg50.4%
metadata-eval50.4%
Simplified50.4%
Taylor expanded in t around 0 69.0%
Taylor expanded in x around 0 68.1%
*-rgt-identity68.1%
associate-*r/68.1%
associate-*l*68.1%
associate-/r*69.0%
rem-exp-log69.0%
log-rec69.0%
rem-exp-log32.0%
exp-sum32.0%
+-commutative32.0%
exp-diff32.0%
associate--r+32.0%
exp-diff32.0%
exp-diff32.0%
log-rec32.0%
rem-exp-log32.0%
associate-/r*32.0%
*-commutative32.0%
rem-exp-log69.0%
Simplified73.2%
Taylor expanded in b around 0 82.6%
if -2.50000000000000003e42 < y < 2.69999999999999999e-296Initial program 96.6%
associate-/l*98.8%
associate--l+98.8%
exp-sum93.4%
associate-/l*93.4%
*-commutative93.4%
exp-to-pow93.4%
exp-diff77.2%
*-commutative77.2%
exp-to-pow78.3%
sub-neg78.3%
metadata-eval78.3%
Simplified78.3%
Taylor expanded in y around 0 78.6%
times-frac76.9%
exp-to-pow77.8%
sub-neg77.8%
metadata-eval77.8%
Simplified77.8%
Taylor expanded in b around 0 79.2%
exp-to-pow79.9%
sub-neg79.9%
metadata-eval79.9%
Simplified79.9%
unpow-prod-up80.0%
unpow-180.0%
Applied egg-rr80.0%
associate-*r/80.0%
*-rgt-identity80.0%
Simplified80.0%
if 2.69999999999999999e-296 < y < 5.9e-226Initial program 93.4%
associate-/l*97.6%
associate--l+97.6%
exp-sum97.6%
associate-/l*97.6%
*-commutative97.6%
exp-to-pow97.6%
exp-diff87.6%
*-commutative87.6%
exp-to-pow89.4%
sub-neg89.4%
metadata-eval89.4%
Simplified89.4%
Taylor expanded in y around 0 78.4%
times-frac50.4%
exp-to-pow51.0%
sub-neg51.0%
metadata-eval51.0%
Simplified51.0%
Taylor expanded in t around 0 89.8%
if 5.9e-226 < y < 2.1e8Initial program 98.9%
Taylor expanded in y around 0 98.9%
Taylor expanded in b around 0 83.2%
exp-to-pow84.2%
sub-neg84.2%
metadata-eval84.2%
+-commutative84.2%
Simplified84.2%
Final simplification82.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (/ (/ (pow z y) a) y))) (t_2 (* x (/ (pow a t) y))))
(if (<= t -1.1e+77)
t_2
(if (<= t -4.1e-116)
t_1
(if (<= t 1.45e-142)
(/ x (* a (* y (exp b))))
(if (<= t 1.25e+44) 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) / a) / y);
double t_2 = x * (pow(a, t) / y);
double tmp;
if (t <= -1.1e+77) {
tmp = t_2;
} else if (t <= -4.1e-116) {
tmp = t_1;
} else if (t <= 1.45e-142) {
tmp = x / (a * (y * exp(b)));
} else if (t <= 1.25e+44) {
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) / a) / y)
t_2 = x * ((a ** t) / y)
if (t <= (-1.1d+77)) then
tmp = t_2
else if (t <= (-4.1d-116)) then
tmp = t_1
else if (t <= 1.45d-142) then
tmp = x / (a * (y * exp(b)))
else if (t <= 1.25d+44) 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) / a) / y);
double t_2 = x * (Math.pow(a, t) / y);
double tmp;
if (t <= -1.1e+77) {
tmp = t_2;
} else if (t <= -4.1e-116) {
tmp = t_1;
} else if (t <= 1.45e-142) {
tmp = x / (a * (y * Math.exp(b)));
} else if (t <= 1.25e+44) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * ((math.pow(z, y) / a) / y) t_2 = x * (math.pow(a, t) / y) tmp = 0 if t <= -1.1e+77: tmp = t_2 elif t <= -4.1e-116: tmp = t_1 elif t <= 1.45e-142: tmp = x / (a * (y * math.exp(b))) elif t <= 1.25e+44: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64(Float64((z ^ y) / a) / y)) t_2 = Float64(x * Float64((a ^ t) / y)) tmp = 0.0 if (t <= -1.1e+77) tmp = t_2; elseif (t <= -4.1e-116) tmp = t_1; elseif (t <= 1.45e-142) tmp = Float64(x / Float64(a * Float64(y * exp(b)))); elseif (t <= 1.25e+44) 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) / a) / y); t_2 = x * ((a ^ t) / y); tmp = 0.0; if (t <= -1.1e+77) tmp = t_2; elseif (t <= -4.1e-116) tmp = t_1; elseif (t <= 1.45e-142) tmp = x / (a * (y * exp(b))); elseif (t <= 1.25e+44) 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[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[Power[a, t], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.1e+77], t$95$2, If[LessEqual[t, -4.1e-116], t$95$1, If[LessEqual[t, 1.45e-142], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.25e+44], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\
t_2 := x \cdot \frac{{a}^{t}}{y}\\
\mathbf{if}\;t \leq -1.1 \cdot 10^{+77}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -4.1 \cdot 10^{-116}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{-142}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.1e77 or 1.2499999999999999e44 < t Initial program 100.0%
Taylor expanded in y around 0 90.4%
Taylor expanded in t around inf 90.4%
Taylor expanded in b around 0 85.7%
associate-/l*85.7%
Simplified85.7%
if -1.1e77 < t < -4.0999999999999999e-116 or 1.44999999999999995e-142 < t < 1.2499999999999999e44Initial program 98.0%
associate-/l*99.1%
associate--l+99.1%
exp-sum83.2%
associate-/l*80.8%
*-commutative80.8%
exp-to-pow80.8%
exp-diff69.8%
*-commutative69.8%
exp-to-pow70.5%
sub-neg70.5%
metadata-eval70.5%
Simplified70.5%
Taylor expanded in t around 0 84.5%
Taylor expanded in x around 0 83.3%
*-rgt-identity83.3%
associate-*r/83.3%
associate-*l*83.3%
associate-/r*84.5%
rem-exp-log83.8%
log-rec83.8%
rem-exp-log36.2%
exp-sum36.2%
+-commutative36.2%
exp-diff36.1%
associate--r+36.1%
exp-diff36.2%
exp-diff36.2%
log-rec36.2%
rem-exp-log36.1%
associate-/r*36.1%
*-commutative36.1%
rem-exp-log84.5%
Simplified87.0%
Taylor expanded in b around 0 77.7%
if -4.0999999999999999e-116 < t < 1.44999999999999995e-142Initial program 96.2%
associate-/l*97.3%
associate--l+97.3%
exp-sum81.8%
associate-/l*79.0%
*-commutative79.0%
exp-to-pow79.0%
exp-diff79.0%
*-commutative79.0%
exp-to-pow80.2%
sub-neg80.2%
metadata-eval80.2%
Simplified80.2%
Taylor expanded in y around 0 71.4%
times-frac75.7%
exp-to-pow76.7%
sub-neg76.7%
metadata-eval76.7%
Simplified76.7%
Taylor expanded in t around 0 81.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.45e+40) (not (<= t 2e+91))) (* x (/ (pow a t) 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.45e+40) || !(t <= 2e+91)) {
tmp = x * (pow(a, t) / 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.45d+40)) .or. (.not. (t <= 2d+91))) then
tmp = x * ((a ** t) / 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.45e+40) || !(t <= 2e+91)) {
tmp = x * (Math.pow(a, t) / y);
} else {
tmp = x / (a * (y * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.45e+40) or not (t <= 2e+91): tmp = x * (math.pow(a, t) / y) else: tmp = x / (a * (y * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.45e+40) || !(t <= 2e+91)) tmp = Float64(x * Float64((a ^ t) / 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.45e+40) || ~((t <= 2e+91))) tmp = x * ((a ^ t) / y); else tmp = x / (a * (y * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.45e+40], N[Not[LessEqual[t, 2e+91]], $MachinePrecision]], N[(x * N[(N[Power[a, t], $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 \leq -1.45 \cdot 10^{+40} \lor \neg \left(t \leq 2 \cdot 10^{+91}\right):\\
\;\;\;\;x \cdot \frac{{a}^{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
if t < -1.45000000000000009e40 or 2.00000000000000016e91 < t Initial program 100.0%
Taylor expanded in y around 0 88.2%
Taylor expanded in t around inf 88.2%
Taylor expanded in b around 0 83.6%
associate-/l*83.6%
Simplified83.6%
if -1.45000000000000009e40 < t < 2.00000000000000016e91Initial program 97.1%
associate-/l*98.2%
associate--l+98.2%
exp-sum82.6%
associate-/l*79.9%
*-commutative79.9%
exp-to-pow79.9%
exp-diff74.5%
*-commutative74.5%
exp-to-pow75.5%
sub-neg75.5%
metadata-eval75.5%
Simplified75.5%
Taylor expanded in y around 0 66.3%
times-frac65.8%
exp-to-pow66.6%
sub-neg66.6%
metadata-eval66.6%
Simplified66.6%
Taylor expanded in t around 0 72.8%
Final simplification77.4%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= t -265000000000.0) (not (<= t 1.6)))
(* x (/ (pow a t) y))
(/
x
(*
a
(* y (+ 1.0 (* b (+ 1.0 (* b (+ 0.5 (* b 0.16666666666666666)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -265000000000.0) || !(t <= 1.6)) {
tmp = x * (pow(a, t) / y);
} else {
tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666))))))));
}
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 <= (-265000000000.0d0)) .or. (.not. (t <= 1.6d0))) then
tmp = x * ((a ** t) / y)
else
tmp = x / (a * (y * (1.0d0 + (b * (1.0d0 + (b * (0.5d0 + (b * 0.16666666666666666d0))))))))
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 <= -265000000000.0) || !(t <= 1.6)) {
tmp = x * (Math.pow(a, t) / y);
} else {
tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666))))))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -265000000000.0) or not (t <= 1.6): tmp = x * (math.pow(a, t) / y) else: tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -265000000000.0) || !(t <= 1.6)) tmp = Float64(x * Float64((a ^ t) / y)); else tmp = Float64(x / Float64(a * Float64(y * Float64(1.0 + Float64(b * Float64(1.0 + Float64(b * Float64(0.5 + Float64(b * 0.16666666666666666))))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -265000000000.0) || ~((t <= 1.6))) tmp = x * ((a ^ t) / y); else tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -265000000000.0], N[Not[LessEqual[t, 1.6]], $MachinePrecision]], N[(x * N[(N[Power[a, t], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * N[(1.0 + N[(b * N[(1.0 + N[(b * N[(0.5 + N[(b * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -265000000000 \lor \neg \left(t \leq 1.6\right):\\
\;\;\;\;x \cdot \frac{{a}^{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(1 + b \cdot \left(1 + b \cdot \left(0.5 + b \cdot 0.16666666666666666\right)\right)\right)\right)}\\
\end{array}
\end{array}
if t < -2.65e11 or 1.6000000000000001 < t Initial program 100.0%
Taylor expanded in y around 0 87.0%
Taylor expanded in t around inf 87.0%
Taylor expanded in b around 0 76.8%
associate-/l*76.8%
Simplified76.8%
if -2.65e11 < t < 1.6000000000000001Initial program 96.4%
associate-/l*97.8%
associate--l+97.8%
exp-sum85.2%
associate-/l*81.9%
*-commutative81.9%
exp-to-pow81.9%
exp-diff81.9%
*-commutative81.9%
exp-to-pow83.2%
sub-neg83.2%
metadata-eval83.2%
Simplified83.2%
Taylor expanded in y around 0 70.1%
times-frac69.4%
exp-to-pow70.4%
sub-neg70.4%
metadata-eval70.4%
Simplified70.4%
Taylor expanded in t around 0 76.2%
Taylor expanded in b around 0 63.0%
*-commutative63.0%
Simplified63.0%
Final simplification70.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -1.44e+54)
(/ (* x (+ 1.0 (* b (+ -1.0 (* b (+ 0.5 (* b -0.16666666666666666))))))) y)
(if (<= b -7.8e-111)
(/ (/ (- x (* x b)) a) y)
(/
x
(*
a
(* y (+ 1.0 (* b (+ 1.0 (* b (+ 0.5 (* b 0.16666666666666666))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.44e+54) {
tmp = (x * (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666))))))) / y;
} else if (b <= -7.8e-111) {
tmp = ((x - (x * b)) / a) / y;
} else {
tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666))))))));
}
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.44d+54)) then
tmp = (x * (1.0d0 + (b * ((-1.0d0) + (b * (0.5d0 + (b * (-0.16666666666666666d0)))))))) / y
else if (b <= (-7.8d-111)) then
tmp = ((x - (x * b)) / a) / y
else
tmp = x / (a * (y * (1.0d0 + (b * (1.0d0 + (b * (0.5d0 + (b * 0.16666666666666666d0))))))))
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.44e+54) {
tmp = (x * (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666))))))) / y;
} else if (b <= -7.8e-111) {
tmp = ((x - (x * b)) / a) / y;
} else {
tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666))))))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.44e+54: tmp = (x * (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666))))))) / y elif b <= -7.8e-111: tmp = ((x - (x * b)) / a) / y else: tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.44e+54) tmp = Float64(Float64(x * Float64(1.0 + Float64(b * Float64(-1.0 + Float64(b * Float64(0.5 + Float64(b * -0.16666666666666666))))))) / y); elseif (b <= -7.8e-111) tmp = Float64(Float64(Float64(x - Float64(x * b)) / a) / y); else tmp = Float64(x / Float64(a * Float64(y * Float64(1.0 + Float64(b * Float64(1.0 + Float64(b * Float64(0.5 + Float64(b * 0.16666666666666666))))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.44e+54) tmp = (x * (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666))))))) / y; elseif (b <= -7.8e-111) tmp = ((x - (x * b)) / a) / y; else tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.44e+54], 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], If[LessEqual[b, -7.8e-111], N[(N[(N[(x - N[(x * b), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(a * N[(y * N[(1.0 + N[(b * N[(1.0 + N[(b * N[(0.5 + N[(b * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.44 \cdot 10^{+54}:\\
\;\;\;\;\frac{x \cdot \left(1 + b \cdot \left(-1 + b \cdot \left(0.5 + b \cdot -0.16666666666666666\right)\right)\right)}{y}\\
\mathbf{elif}\;b \leq -7.8 \cdot 10^{-111}:\\
\;\;\;\;\frac{\frac{x - x \cdot b}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(1 + b \cdot \left(1 + b \cdot \left(0.5 + b \cdot 0.16666666666666666\right)\right)\right)\right)}\\
\end{array}
\end{array}
if b < -1.44e54Initial program 100.0%
Taylor expanded in y around 0 88.8%
Taylor expanded in t around inf 88.8%
Taylor expanded in t around 0 84.3%
Taylor expanded in b around 0 84.3%
if -1.44e54 < b < -7.8000000000000006e-111Initial program 96.6%
associate-/l*99.0%
associate--l+99.0%
exp-sum73.3%
associate-/l*73.3%
*-commutative73.3%
exp-to-pow73.3%
exp-diff67.7%
*-commutative67.7%
exp-to-pow68.5%
sub-neg68.5%
metadata-eval68.5%
Simplified68.5%
Taylor expanded in y around 0 68.4%
times-frac62.5%
exp-to-pow63.3%
sub-neg63.3%
metadata-eval63.3%
Simplified63.3%
Taylor expanded in t around 0 44.5%
Taylor expanded in b around 0 35.2%
+-commutative35.2%
mul-1-neg35.2%
unsub-neg35.2%
associate-/l*35.2%
Simplified35.2%
Taylor expanded in y around 0 44.7%
div-sub44.7%
*-commutative44.7%
Simplified44.7%
if -7.8000000000000006e-111 < b Initial program 98.2%
associate-/l*98.7%
associate--l+98.7%
exp-sum80.6%
associate-/l*78.3%
*-commutative78.3%
exp-to-pow78.3%
exp-diff68.7%
*-commutative68.7%
exp-to-pow69.4%
sub-neg69.4%
metadata-eval69.4%
Simplified69.4%
Taylor expanded in y around 0 65.7%
times-frac60.2%
exp-to-pow60.7%
sub-neg60.7%
metadata-eval60.7%
Simplified60.7%
Taylor expanded in t around 0 58.1%
Taylor expanded in b around 0 55.4%
*-commutative55.4%
Simplified55.4%
Final simplification58.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.7e+57) (/ (* x (+ 1.0 (* b (+ -1.0 (* b (+ 0.5 (* b -0.16666666666666666))))))) y) (/ x (* a (* y (+ 1.0 (* b (+ 1.0 (* b 0.5)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.7e+57) {
tmp = (x * (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666))))))) / y;
} else {
tmp = x / (a * (y * (1.0 + (b * (1.0 + (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.7d+57)) then
tmp = (x * (1.0d0 + (b * ((-1.0d0) + (b * (0.5d0 + (b * (-0.16666666666666666d0)))))))) / y
else
tmp = x / (a * (y * (1.0d0 + (b * (1.0d0 + (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.7e+57) {
tmp = (x * (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666))))))) / y;
} else {
tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * 0.5))))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.7e+57: tmp = (x * (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666))))))) / y else: tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * 0.5)))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.7e+57) 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(x / Float64(a * Float64(y * Float64(1.0 + Float64(b * Float64(1.0 + Float64(b * 0.5))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.7e+57) tmp = (x * (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666))))))) / y; else tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * 0.5)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.7e+57], 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[(x / N[(a * N[(y * N[(1.0 + N[(b * N[(1.0 + N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.7 \cdot 10^{+57}:\\
\;\;\;\;\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{x}{a \cdot \left(y \cdot \left(1 + b \cdot \left(1 + b \cdot 0.5\right)\right)\right)}\\
\end{array}
\end{array}
if b < -1.69999999999999996e57Initial program 100.0%
Taylor expanded in y around 0 88.8%
Taylor expanded in t around inf 88.8%
Taylor expanded in t around 0 84.3%
Taylor expanded in b around 0 84.3%
if -1.69999999999999996e57 < b Initial program 97.9%
associate-/l*98.7%
associate--l+98.7%
exp-sum79.4%
associate-/l*77.5%
*-commutative77.5%
exp-to-pow77.5%
exp-diff68.6%
*-commutative68.6%
exp-to-pow69.3%
sub-neg69.3%
metadata-eval69.3%
Simplified69.3%
Taylor expanded in y around 0 66.2%
times-frac60.6%
exp-to-pow61.2%
sub-neg61.2%
metadata-eval61.2%
Simplified61.2%
Taylor expanded in t around 0 55.8%
Taylor expanded in b around 0 49.9%
*-commutative49.9%
Simplified49.9%
Final simplification55.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b -3.4e+124) (/ (* x (+ 1.0 (* b (+ -1.0 (* b 0.5))))) y) (/ x (* a (* y (+ 1.0 (* b (+ 1.0 (* b 0.5)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -3.4e+124) {
tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y;
} else {
tmp = x / (a * (y * (1.0 + (b * (1.0 + (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.4d+124)) then
tmp = (x * (1.0d0 + (b * ((-1.0d0) + (b * 0.5d0))))) / y
else
tmp = x / (a * (y * (1.0d0 + (b * (1.0d0 + (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.4e+124) {
tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y;
} else {
tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * 0.5))))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -3.4e+124: tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y else: tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * 0.5)))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -3.4e+124) tmp = Float64(Float64(x * Float64(1.0 + Float64(b * Float64(-1.0 + Float64(b * 0.5))))) / y); else tmp = Float64(x / Float64(a * Float64(y * Float64(1.0 + Float64(b * Float64(1.0 + Float64(b * 0.5))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -3.4e+124) tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y; else tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * 0.5)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -3.4e+124], N[(N[(x * N[(1.0 + N[(b * N[(-1.0 + N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(a * N[(y * N[(1.0 + N[(b * N[(1.0 + N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.4 \cdot 10^{+124}:\\
\;\;\;\;\frac{x \cdot \left(1 + b \cdot \left(-1 + b \cdot 0.5\right)\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(1 + b \cdot \left(1 + b \cdot 0.5\right)\right)\right)}\\
\end{array}
\end{array}
if b < -3.4e124Initial program 100.0%
Taylor expanded in y around 0 96.7%
Taylor expanded in t around inf 96.7%
Taylor expanded in t around 0 93.4%
Taylor expanded in b around 0 83.8%
if -3.4e124 < b Initial program 98.1%
associate-/l*98.8%
associate--l+98.8%
exp-sum78.9%
associate-/l*77.1%
*-commutative77.1%
exp-to-pow77.1%
exp-diff67.4%
*-commutative67.4%
exp-to-pow68.1%
sub-neg68.1%
metadata-eval68.1%
Simplified68.1%
Taylor expanded in y around 0 65.2%
times-frac60.0%
exp-to-pow60.5%
sub-neg60.5%
metadata-eval60.5%
Simplified60.5%
Taylor expanded in t around 0 56.4%
Taylor expanded in b around 0 50.4%
*-commutative50.4%
Simplified50.4%
Final simplification54.3%
(FPCore (x y z t a b) :precision binary64 (if (<= b -5e+125) (/ (* x (+ 1.0 (* b (+ -1.0 (* b 0.5))))) y) (if (<= b -6.6e-112) (/ (/ (- x (* x b)) a) y) (/ x (* a (+ y (* y b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -5e+125) {
tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y;
} else if (b <= -6.6e-112) {
tmp = ((x - (x * b)) / a) / 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 <= (-5d+125)) then
tmp = (x * (1.0d0 + (b * ((-1.0d0) + (b * 0.5d0))))) / y
else if (b <= (-6.6d-112)) then
tmp = ((x - (x * b)) / a) / 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 <= -5e+125) {
tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y;
} else if (b <= -6.6e-112) {
tmp = ((x - (x * b)) / a) / y;
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -5e+125: tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y elif b <= -6.6e-112: tmp = ((x - (x * b)) / a) / y else: tmp = x / (a * (y + (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -5e+125) tmp = Float64(Float64(x * Float64(1.0 + Float64(b * Float64(-1.0 + Float64(b * 0.5))))) / y); elseif (b <= -6.6e-112) tmp = Float64(Float64(Float64(x - Float64(x * b)) / a) / 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 <= -5e+125) tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y; elseif (b <= -6.6e-112) tmp = ((x - (x * b)) / a) / y; else tmp = x / (a * (y + (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -5e+125], N[(N[(x * N[(1.0 + N[(b * N[(-1.0 + N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, -6.6e-112], N[(N[(N[(x - N[(x * b), $MachinePrecision]), $MachinePrecision] / a), $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 -5 \cdot 10^{+125}:\\
\;\;\;\;\frac{x \cdot \left(1 + b \cdot \left(-1 + b \cdot 0.5\right)\right)}{y}\\
\mathbf{elif}\;b \leq -6.6 \cdot 10^{-112}:\\
\;\;\;\;\frac{\frac{x - x \cdot b}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\end{array}
\end{array}
if b < -4.99999999999999962e125Initial program 100.0%
Taylor expanded in y around 0 96.7%
Taylor expanded in t around inf 96.7%
Taylor expanded in t around 0 93.4%
Taylor expanded in b around 0 83.8%
if -4.99999999999999962e125 < b < -6.6000000000000002e-112Initial program 97.6%
associate-/l*99.3%
associate--l+99.3%
exp-sum72.8%
associate-/l*72.8%
*-commutative72.8%
exp-to-pow72.8%
exp-diff62.6%
*-commutative62.6%
exp-to-pow63.2%
sub-neg63.2%
metadata-eval63.2%
Simplified63.2%
Taylor expanded in y around 0 63.2%
times-frac59.0%
exp-to-pow59.6%
sub-neg59.6%
metadata-eval59.6%
Simplified59.6%
Taylor expanded in t around 0 50.3%
Taylor expanded in b around 0 38.0%
+-commutative38.0%
mul-1-neg38.0%
unsub-neg38.0%
associate-/l*36.0%
Simplified36.0%
Taylor expanded in y around 0 44.7%
div-sub44.7%
*-commutative44.7%
Simplified44.7%
if -6.6000000000000002e-112 < b Initial program 98.2%
associate-/l*98.7%
associate--l+98.7%
exp-sum80.6%
associate-/l*78.3%
*-commutative78.3%
exp-to-pow78.3%
exp-diff68.7%
*-commutative68.7%
exp-to-pow69.4%
sub-neg69.4%
metadata-eval69.4%
Simplified69.4%
Taylor expanded in y around 0 65.7%
times-frac60.2%
exp-to-pow60.7%
sub-neg60.7%
metadata-eval60.7%
Simplified60.7%
Taylor expanded in t around 0 58.1%
Taylor expanded in b around 0 46.1%
Final simplification50.3%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.9e-111) (/ (/ (- x (* x b)) a) y) (/ x (* a (+ y (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.9e-111) {
tmp = ((x - (x * b)) / a) / 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 <= (-1.9d-111)) then
tmp = ((x - (x * b)) / a) / 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 <= -1.9e-111) {
tmp = ((x - (x * b)) / a) / y;
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.9e-111: tmp = ((x - (x * b)) / a) / y else: tmp = x / (a * (y + (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.9e-111) tmp = Float64(Float64(Float64(x - Float64(x * b)) / a) / 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 <= -1.9e-111) tmp = ((x - (x * b)) / a) / y; else tmp = x / (a * (y + (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.9e-111], N[(N[(N[(x - N[(x * b), $MachinePrecision]), $MachinePrecision] / a), $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 -1.9 \cdot 10^{-111}:\\
\;\;\;\;\frac{\frac{x - x \cdot b}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\end{array}
\end{array}
if b < -1.90000000000000011e-111Initial program 98.5%
associate-/l*99.6%
associate--l+99.6%
exp-sum74.3%
associate-/l*74.3%
*-commutative74.3%
exp-to-pow74.3%
exp-diff61.6%
*-commutative61.6%
exp-to-pow62.0%
sub-neg62.0%
metadata-eval62.0%
Simplified62.0%
Taylor expanded in y around 0 68.3%
times-frac61.9%
exp-to-pow62.3%
sub-neg62.3%
metadata-eval62.3%
Simplified62.3%
Taylor expanded in t around 0 66.7%
Taylor expanded in b around 0 39.5%
+-commutative39.5%
mul-1-neg39.5%
unsub-neg39.5%
associate-/l*37.1%
Simplified37.1%
Taylor expanded in y around 0 47.3%
div-sub47.3%
*-commutative47.3%
Simplified47.3%
if -1.90000000000000011e-111 < b Initial program 98.2%
associate-/l*98.7%
associate--l+98.7%
exp-sum80.6%
associate-/l*78.3%
*-commutative78.3%
exp-to-pow78.3%
exp-diff68.7%
*-commutative68.7%
exp-to-pow69.4%
sub-neg69.4%
metadata-eval69.4%
Simplified69.4%
Taylor expanded in y around 0 65.7%
times-frac60.2%
exp-to-pow60.7%
sub-neg60.7%
metadata-eval60.7%
Simplified60.7%
Taylor expanded in t around 0 58.1%
Taylor expanded in b around 0 46.1%
Final simplification46.5%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.55e+20) (* (/ b a) (/ x (- y))) (/ x (* a (+ y (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.55e+20) {
tmp = (b / a) * (x / -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 <= (-1.55d+20)) then
tmp = (b / a) * (x / -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 <= -1.55e+20) {
tmp = (b / a) * (x / -y);
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.55e+20: tmp = (b / a) * (x / -y) else: tmp = x / (a * (y + (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.55e+20) tmp = Float64(Float64(b / a) * Float64(x / Float64(-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 <= -1.55e+20) tmp = (b / a) * (x / -y); else tmp = x / (a * (y + (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.55e+20], N[(N[(b / a), $MachinePrecision] * N[(x / (-y)), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.55 \cdot 10^{+20}:\\
\;\;\;\;\frac{b}{a} \cdot \frac{x}{-y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\end{array}
\end{array}
if b < -1.55e20Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum71.7%
associate-/l*71.7%
*-commutative71.7%
exp-to-pow71.7%
exp-diff54.7%
*-commutative54.7%
exp-to-pow54.7%
sub-neg54.7%
metadata-eval54.7%
Simplified54.7%
Taylor expanded in y around 0 66.2%
times-frac60.5%
exp-to-pow60.5%
sub-neg60.5%
metadata-eval60.5%
Simplified60.5%
Taylor expanded in t around 0 81.4%
Taylor expanded in b around 0 43.5%
+-commutative43.5%
mul-1-neg43.5%
unsub-neg43.5%
associate-/l*39.9%
Simplified39.9%
Taylor expanded in b around inf 43.5%
associate-*r/43.5%
neg-mul-143.5%
distribute-lft-neg-in43.5%
mul-1-neg43.5%
times-frac45.2%
mul-1-neg45.2%
Simplified45.2%
if -1.55e20 < b Initial program 97.9%
associate-/l*98.7%
associate--l+98.7%
exp-sum80.4%
associate-/l*78.5%
*-commutative78.5%
exp-to-pow78.5%
exp-diff69.6%
*-commutative69.6%
exp-to-pow70.4%
sub-neg70.4%
metadata-eval70.4%
Simplified70.4%
Taylor expanded in y around 0 66.6%
times-frac60.8%
exp-to-pow61.4%
sub-neg61.4%
metadata-eval61.4%
Simplified61.4%
Taylor expanded in t around 0 55.3%
Taylor expanded in b around 0 44.7%
Final simplification44.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.12e+56) (/ (- x (* x b)) y) (/ x (* y a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.12e+56) {
tmp = (x - (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 <= (-1.12d+56)) then
tmp = (x - (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 <= -1.12e+56) {
tmp = (x - (x * b)) / y;
} else {
tmp = x / (y * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.12e+56: tmp = (x - (x * b)) / y else: tmp = x / (y * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.12e+56) tmp = Float64(Float64(x - Float64(x * b)) / 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 (b <= -1.12e+56) tmp = (x - (x * b)) / y; else tmp = x / (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.12e+56], N[(N[(x - N[(x * b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.12 \cdot 10^{+56}:\\
\;\;\;\;\frac{x - x \cdot b}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\end{array}
\end{array}
if b < -1.12e56Initial program 100.0%
Taylor expanded in y around 0 88.8%
Taylor expanded in t around inf 88.8%
Taylor expanded in t around 0 84.3%
Taylor expanded in b around 0 45.4%
neg-mul-145.4%
sub-neg45.4%
*-commutative45.4%
Simplified45.4%
if -1.12e56 < b Initial program 97.9%
associate-/l*98.7%
associate--l+98.7%
exp-sum79.4%
associate-/l*77.5%
*-commutative77.5%
exp-to-pow77.5%
exp-diff68.6%
*-commutative68.6%
exp-to-pow69.3%
sub-neg69.3%
metadata-eval69.3%
Simplified69.3%
Taylor expanded in y around 0 66.2%
times-frac60.6%
exp-to-pow61.2%
sub-neg61.2%
metadata-eval61.2%
Simplified61.2%
Taylor expanded in t around 0 55.8%
Taylor expanded in b around 0 36.1%
Final simplification37.7%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1.4e-116) (* (/ 1.0 y) (/ x a)) (* (/ 1.0 a) (/ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.4e-116) {
tmp = (1.0 / y) * (x / a);
} else {
tmp = (1.0 / a) * (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.4d-116)) then
tmp = (1.0d0 / y) * (x / a)
else
tmp = (1.0d0 / a) * (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.4e-116) {
tmp = (1.0 / y) * (x / a);
} else {
tmp = (1.0 / a) * (x / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.4e-116: tmp = (1.0 / y) * (x / a) else: tmp = (1.0 / a) * (x / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.4e-116) tmp = Float64(Float64(1.0 / y) * Float64(x / a)); else tmp = Float64(Float64(1.0 / a) * Float64(x / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.4e-116) tmp = (1.0 / y) * (x / a); else tmp = (1.0 / a) * (x / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.4e-116], N[(N[(1.0 / y), $MachinePrecision] * N[(x / a), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / a), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.4 \cdot 10^{-116}:\\
\;\;\;\;\frac{1}{y} \cdot \frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{a} \cdot \frac{x}{y}\\
\end{array}
\end{array}
if t < -1.3999999999999999e-116Initial program 98.7%
associate-/l*99.6%
associate--l+99.6%
exp-sum74.8%
associate-/l*72.7%
*-commutative72.7%
exp-to-pow72.7%
exp-diff57.6%
*-commutative57.6%
exp-to-pow58.0%
sub-neg58.0%
metadata-eval58.0%
Simplified58.0%
Taylor expanded in y around 0 62.1%
times-frac51.4%
exp-to-pow51.6%
sub-neg51.6%
metadata-eval51.6%
Simplified51.6%
Taylor expanded in t around 0 54.7%
Taylor expanded in b around 0 30.3%
*-un-lft-identity30.3%
*-commutative30.3%
times-frac35.4%
Applied egg-rr35.4%
if -1.3999999999999999e-116 < t Initial program 98.1%
associate-/l*98.6%
associate--l+98.6%
exp-sum80.8%
associate-/l*79.6%
*-commutative79.6%
exp-to-pow79.6%
exp-diff71.6%
*-commutative71.6%
exp-to-pow72.3%
sub-neg72.3%
metadata-eval72.3%
Simplified72.3%
Taylor expanded in y around 0 69.1%
times-frac66.1%
exp-to-pow66.7%
sub-neg66.7%
metadata-eval66.7%
Simplified66.7%
Taylor expanded in b around 0 57.8%
exp-to-pow58.4%
sub-neg58.4%
metadata-eval58.4%
Simplified58.4%
Taylor expanded in t around 0 37.9%
Final simplification37.0%
(FPCore (x y z t a b) :precision binary64 (if (<= a 3.5e+178) (* (/ 1.0 y) (/ x a)) (/ x (* y a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 3.5e+178) {
tmp = (1.0 / y) * (x / 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 (a <= 3.5d+178) then
tmp = (1.0d0 / y) * (x / 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 (a <= 3.5e+178) {
tmp = (1.0 / y) * (x / a);
} else {
tmp = x / (y * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= 3.5e+178: tmp = (1.0 / y) * (x / a) else: tmp = x / (y * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= 3.5e+178) tmp = Float64(Float64(1.0 / y) * Float64(x / 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 (a <= 3.5e+178) tmp = (1.0 / y) * (x / a); else tmp = x / (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, 3.5e+178], N[(N[(1.0 / y), $MachinePrecision] * N[(x / a), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.5 \cdot 10^{+178}:\\
\;\;\;\;\frac{1}{y} \cdot \frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\end{array}
\end{array}
if a < 3.5e178Initial program 99.5%
associate-/l*99.1%
associate--l+99.1%
exp-sum79.9%
associate-/l*79.0%
*-commutative79.0%
exp-to-pow79.0%
exp-diff68.7%
*-commutative68.7%
exp-to-pow69.1%
sub-neg69.1%
metadata-eval69.1%
Simplified69.1%
Taylor expanded in y around 0 67.5%
times-frac61.6%
exp-to-pow62.1%
sub-neg62.1%
metadata-eval62.1%
Simplified62.1%
Taylor expanded in t around 0 57.2%
Taylor expanded in b around 0 30.0%
*-un-lft-identity30.0%
*-commutative30.0%
times-frac32.4%
Applied egg-rr32.4%
if 3.5e178 < a Initial program 93.7%
associate-/l*98.6%
associate--l+98.6%
exp-sum73.5%
associate-/l*69.7%
*-commutative69.7%
exp-to-pow69.7%
exp-diff58.2%
*-commutative58.2%
exp-to-pow59.4%
sub-neg59.4%
metadata-eval59.4%
Simplified59.4%
Taylor expanded in y around 0 62.8%
times-frac57.3%
exp-to-pow57.8%
sub-neg57.8%
metadata-eval57.8%
Simplified57.8%
Taylor expanded in t around 0 74.5%
Taylor expanded in b around 0 51.2%
Final simplification36.2%
(FPCore (x y z t a b) :precision binary64 (/ x (* y a)))
double code(double x, double y, double z, double t, double a, double b) {
return x / (y * a);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x / (y * a)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / (y * a);
}
def code(x, y, z, t, a, b): return x / (y * a)
function code(x, y, z, t, a, b) return Float64(x / Float64(y * a)) end
function tmp = code(x, y, z, t, a, b) tmp = x / (y * a); end
code[x_, y_, z_, t_, a_, b_] := N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y \cdot a}
\end{array}
Initial program 98.3%
associate-/l*99.0%
associate--l+99.0%
exp-sum78.6%
associate-/l*77.1%
*-commutative77.1%
exp-to-pow77.1%
exp-diff66.5%
*-commutative66.5%
exp-to-pow67.1%
sub-neg67.1%
metadata-eval67.1%
Simplified67.1%
Taylor expanded in y around 0 66.5%
times-frac60.7%
exp-to-pow61.2%
sub-neg61.2%
metadata-eval61.2%
Simplified61.2%
Taylor expanded in t around 0 60.7%
Taylor expanded in b around 0 34.3%
Final simplification34.3%
(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.3%
Taylor expanded in y around 0 80.6%
Taylor expanded in t around inf 69.7%
Taylor expanded in t around 0 48.1%
Taylor expanded in b around 0 17.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 2024110
(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))