
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (+ t -1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t + -1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t + (-1.0d0)) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t + -1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t + -1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t + -1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t + -1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t + -1\right) \cdot \log a\right) - b}}{y}
\end{array}
Initial program 98.3%
Final simplification98.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (+ t -1.0) -1.00001) (not (<= (+ t -1.0) 5e+23))) (/ (* x (exp (- (* (+ t -1.0) (log a)) 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 (((t + -1.0) <= -1.00001) || !((t + -1.0) <= 5e+23)) {
tmp = (x * exp((((t + -1.0) * log(a)) - 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 (((t + (-1.0d0)) <= (-1.00001d0)) .or. (.not. ((t + (-1.0d0)) <= 5d+23))) then
tmp = (x * exp((((t + (-1.0d0)) * log(a)) - 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 (((t + -1.0) <= -1.00001) || !((t + -1.0) <= 5e+23)) {
tmp = (x * Math.exp((((t + -1.0) * Math.log(a)) - 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 ((t + -1.0) <= -1.00001) or not ((t + -1.0) <= 5e+23): tmp = (x * math.exp((((t + -1.0) * math.log(a)) - 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 ((Float64(t + -1.0) <= -1.00001) || !(Float64(t + -1.0) <= 5e+23)) tmp = Float64(Float64(x * exp(Float64(Float64(Float64(t + -1.0) * log(a)) - 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 (((t + -1.0) <= -1.00001) || ~(((t + -1.0) <= 5e+23))) tmp = (x * exp((((t + -1.0) * log(a)) - 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[Or[LessEqual[N[(t + -1.0), $MachinePrecision], -1.00001], N[Not[LessEqual[N[(t + -1.0), $MachinePrecision], 5e+23]], $MachinePrecision]], N[(N[(x * N[Exp[N[(N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $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}\;t + -1 \leq -1.00001 \lor \neg \left(t + -1 \leq 5 \cdot 10^{+23}\right):\\
\;\;\;\;\frac{x \cdot e^{\left(t + -1\right) \cdot \log a - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z - \log a\right) - b}}{y}\\
\end{array}
\end{array}
if (-.f64 t 1) < -1.0000100000000001 or 4.9999999999999999e23 < (-.f64 t 1) Initial program 99.8%
Taylor expanded in y around 0 95.7%
if -1.0000100000000001 < (-.f64 t 1) < 4.9999999999999999e23Initial program 97.0%
Taylor expanded in t around 0 97.0%
+-commutative97.0%
mul-1-neg97.0%
unsub-neg97.0%
Simplified97.0%
Final simplification96.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (/ (pow a t) a)) y)))
(if (<= t -1.25e-10)
t_1
(if (<= t 2.3e-161)
(* (/ x a) (/ (pow z y) (* y (exp b))))
(if (<= t 0.00115) (/ x (/ y (* (pow z y) (pow a (+ t -1.0))))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * (pow(a, t) / a)) / y;
double tmp;
if (t <= -1.25e-10) {
tmp = t_1;
} else if (t <= 2.3e-161) {
tmp = (x / a) * (pow(z, y) / (y * exp(b)));
} else if (t <= 0.00115) {
tmp = x / (y / (pow(z, y) * pow(a, (t + -1.0))));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x * ((a ** t) / a)) / y
if (t <= (-1.25d-10)) then
tmp = t_1
else if (t <= 2.3d-161) then
tmp = (x / a) * ((z ** y) / (y * exp(b)))
else if (t <= 0.00115d0) then
tmp = x / (y / ((z ** y) * (a ** (t + (-1.0d0)))))
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(a, t) / a)) / y;
double tmp;
if (t <= -1.25e-10) {
tmp = t_1;
} else if (t <= 2.3e-161) {
tmp = (x / a) * (Math.pow(z, y) / (y * Math.exp(b)));
} else if (t <= 0.00115) {
tmp = x / (y / (Math.pow(z, y) * Math.pow(a, (t + -1.0))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * (math.pow(a, t) / a)) / y tmp = 0 if t <= -1.25e-10: tmp = t_1 elif t <= 2.3e-161: tmp = (x / a) * (math.pow(z, y) / (y * math.exp(b))) elif t <= 0.00115: tmp = x / (y / (math.pow(z, y) * math.pow(a, (t + -1.0)))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * Float64((a ^ t) / a)) / y) tmp = 0.0 if (t <= -1.25e-10) tmp = t_1; elseif (t <= 2.3e-161) tmp = Float64(Float64(x / a) * Float64((z ^ y) / Float64(y * exp(b)))); elseif (t <= 0.00115) tmp = Float64(x / Float64(y / Float64((z ^ y) * (a ^ Float64(t + -1.0))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x * ((a ^ t) / a)) / y; tmp = 0.0; if (t <= -1.25e-10) tmp = t_1; elseif (t <= 2.3e-161) tmp = (x / a) * ((z ^ y) / (y * exp(b))); elseif (t <= 0.00115) tmp = x / (y / ((z ^ y) * (a ^ (t + -1.0)))); 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[a, t], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t, -1.25e-10], t$95$1, If[LessEqual[t, 2.3e-161], N[(N[(x / a), $MachinePrecision] * N[(N[Power[z, y], $MachinePrecision] / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.00115], N[(x / N[(y / N[(N[Power[z, y], $MachinePrecision] * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot \frac{{a}^{t}}{a}}{y}\\
\mathbf{if}\;t \leq -1.25 \cdot 10^{-10}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-161}:\\
\;\;\;\;\frac{x}{a} \cdot \frac{{z}^{y}}{y \cdot e^{b}}\\
\mathbf{elif}\;t \leq 0.00115:\\
\;\;\;\;\frac{x}{\frac{y}{{z}^{y} \cdot {a}^{\left(t + -1\right)}}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.25000000000000008e-10 or 0.00115 < t Initial program 99.8%
associate-*l/85.4%
*-commutative85.4%
exp-diff66.1%
exp-sum54.0%
*-commutative54.0%
exp-to-pow54.0%
*-commutative54.0%
exp-to-pow54.0%
sub-neg54.0%
metadata-eval54.0%
Simplified54.0%
Taylor expanded in y around 0 74.0%
exp-to-pow74.1%
sub-neg74.1%
metadata-eval74.1%
Simplified74.1%
Taylor expanded in b around 0 88.0%
unpow-prod-up88.1%
unpow-188.1%
Applied egg-rr88.1%
associate-*r/88.1%
*-rgt-identity88.1%
Simplified88.1%
if -1.25000000000000008e-10 < t < 2.3e-161Initial program 97.5%
associate-*l/88.4%
*-commutative88.4%
exp-diff80.5%
exp-sum80.5%
*-commutative80.5%
exp-to-pow80.5%
*-commutative80.5%
exp-to-pow81.7%
sub-neg81.7%
metadata-eval81.7%
Simplified81.7%
Taylor expanded in t around 0 84.6%
times-frac87.2%
Simplified87.2%
if 2.3e-161 < t < 0.00115Initial program 95.0%
associate-*l/74.5%
*-commutative74.5%
exp-diff54.5%
exp-sum54.7%
*-commutative54.7%
exp-to-pow54.7%
*-commutative54.7%
exp-to-pow56.6%
sub-neg56.6%
metadata-eval56.6%
Simplified56.6%
Taylor expanded in b around 0 82.1%
associate-/l*85.0%
*-commutative85.0%
exp-to-pow86.5%
sub-neg86.5%
metadata-eval86.5%
Simplified86.5%
Final simplification87.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -7.2e+44) (not (<= y 1e+108))) (/ (* x (/ (pow z y) a)) y) (/ (* x (exp (- (* (+ t -1.0) (log a)) b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -7.2e+44) || !(y <= 1e+108)) {
tmp = (x * (pow(z, y) / a)) / y;
} else {
tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-7.2d+44)) .or. (.not. (y <= 1d+108))) then
tmp = (x * ((z ** y) / a)) / y
else
tmp = (x * exp((((t + (-1.0d0)) * log(a)) - b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -7.2e+44) || !(y <= 1e+108)) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else {
tmp = (x * Math.exp((((t + -1.0) * Math.log(a)) - b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -7.2e+44) or not (y <= 1e+108): tmp = (x * (math.pow(z, y) / a)) / y else: tmp = (x * math.exp((((t + -1.0) * math.log(a)) - b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -7.2e+44) || !(y <= 1e+108)) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = Float64(Float64(x * exp(Float64(Float64(Float64(t + -1.0) * log(a)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -7.2e+44) || ~((y <= 1e+108))) tmp = (x * ((z ^ y) / a)) / y; else tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -7.2e+44], N[Not[LessEqual[y, 1e+108]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.2 \cdot 10^{+44} \lor \neg \left(y \leq 10^{+108}\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(t + -1\right) \cdot \log a - b}}{y}\\
\end{array}
\end{array}
if y < -7.2e44 or 1e108 < y Initial program 100.0%
Taylor expanded in t around 0 95.9%
+-commutative95.9%
mul-1-neg95.9%
unsub-neg95.9%
Simplified95.9%
Taylor expanded in b around 0 91.8%
div-exp91.8%
*-commutative91.8%
exp-to-pow91.8%
rem-exp-log91.8%
Simplified91.8%
if -7.2e44 < y < 1e108Initial program 97.3%
Taylor expanded in y around 0 95.9%
Final simplification94.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (/ (pow a t) a)) y)))
(if (<= t -1.25e-10)
t_1
(if (<= t 2.2e-271)
(* (/ x a) (/ (pow z y) (* y (exp b))))
(if (<= t 6.5e-5) (/ (* x (/ (pow z y) a)) y) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * (pow(a, t) / a)) / y;
double tmp;
if (t <= -1.25e-10) {
tmp = t_1;
} else if (t <= 2.2e-271) {
tmp = (x / a) * (pow(z, y) / (y * exp(b)));
} else if (t <= 6.5e-5) {
tmp = (x * (pow(z, y) / a)) / y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x * ((a ** t) / a)) / y
if (t <= (-1.25d-10)) then
tmp = t_1
else if (t <= 2.2d-271) then
tmp = (x / a) * ((z ** y) / (y * exp(b)))
else if (t <= 6.5d-5) then
tmp = (x * ((z ** y) / a)) / y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * (Math.pow(a, t) / a)) / y;
double tmp;
if (t <= -1.25e-10) {
tmp = t_1;
} else if (t <= 2.2e-271) {
tmp = (x / a) * (Math.pow(z, y) / (y * Math.exp(b)));
} else if (t <= 6.5e-5) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * (math.pow(a, t) / a)) / y tmp = 0 if t <= -1.25e-10: tmp = t_1 elif t <= 2.2e-271: tmp = (x / a) * (math.pow(z, y) / (y * math.exp(b))) elif t <= 6.5e-5: tmp = (x * (math.pow(z, y) / a)) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * Float64((a ^ t) / a)) / y) tmp = 0.0 if (t <= -1.25e-10) tmp = t_1; elseif (t <= 2.2e-271) tmp = Float64(Float64(x / a) * Float64((z ^ y) / Float64(y * exp(b)))); elseif (t <= 6.5e-5) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x * ((a ^ t) / a)) / y; tmp = 0.0; if (t <= -1.25e-10) tmp = t_1; elseif (t <= 2.2e-271) tmp = (x / a) * ((z ^ y) / (y * exp(b))); elseif (t <= 6.5e-5) tmp = (x * ((z ^ y) / a)) / y; 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[a, t], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t, -1.25e-10], t$95$1, If[LessEqual[t, 2.2e-271], N[(N[(x / a), $MachinePrecision] * N[(N[Power[z, y], $MachinePrecision] / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.5e-5], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot \frac{{a}^{t}}{a}}{y}\\
\mathbf{if}\;t \leq -1.25 \cdot 10^{-10}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{-271}:\\
\;\;\;\;\frac{x}{a} \cdot \frac{{z}^{y}}{y \cdot e^{b}}\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{-5}:\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.25000000000000008e-10 or 6.49999999999999943e-5 < t Initial program 99.8%
associate-*l/85.4%
*-commutative85.4%
exp-diff66.1%
exp-sum54.0%
*-commutative54.0%
exp-to-pow54.0%
*-commutative54.0%
exp-to-pow54.0%
sub-neg54.0%
metadata-eval54.0%
Simplified54.0%
Taylor expanded in y around 0 74.0%
exp-to-pow74.1%
sub-neg74.1%
metadata-eval74.1%
Simplified74.1%
Taylor expanded in b around 0 88.0%
unpow-prod-up88.1%
unpow-188.1%
Applied egg-rr88.1%
associate-*r/88.1%
*-rgt-identity88.1%
Simplified88.1%
if -1.25000000000000008e-10 < t < 2.1999999999999999e-271Initial program 96.8%
associate-*l/90.0%
*-commutative90.0%
exp-diff82.1%
exp-sum82.1%
*-commutative82.1%
exp-to-pow82.1%
*-commutative82.1%
exp-to-pow83.2%
sub-neg83.2%
metadata-eval83.2%
Simplified83.2%
Taylor expanded in t around 0 87.4%
times-frac87.4%
Simplified87.4%
if 2.1999999999999999e-271 < t < 6.49999999999999943e-5Initial program 97.0%
Taylor expanded in t around 0 97.0%
+-commutative97.0%
mul-1-neg97.0%
unsub-neg97.0%
Simplified97.0%
Taylor expanded in b around 0 85.0%
div-exp85.1%
*-commutative85.1%
exp-to-pow85.1%
rem-exp-log86.4%
Simplified86.4%
Final simplification87.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (/ (pow a t) a)) y)))
(if (<= t -9e+33)
t_1
(if (<= t 1.45e-292)
(/ x (* a (* y (exp b))))
(if (<= t 0.00105) (/ (* x (/ (pow z y) a)) y) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * (pow(a, t) / a)) / y;
double tmp;
if (t <= -9e+33) {
tmp = t_1;
} else if (t <= 1.45e-292) {
tmp = x / (a * (y * exp(b)));
} else if (t <= 0.00105) {
tmp = (x * (pow(z, y) / a)) / y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x * ((a ** t) / a)) / y
if (t <= (-9d+33)) then
tmp = t_1
else if (t <= 1.45d-292) then
tmp = x / (a * (y * exp(b)))
else if (t <= 0.00105d0) then
tmp = (x * ((z ** y) / a)) / y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * (Math.pow(a, t) / a)) / y;
double tmp;
if (t <= -9e+33) {
tmp = t_1;
} else if (t <= 1.45e-292) {
tmp = x / (a * (y * Math.exp(b)));
} else if (t <= 0.00105) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * (math.pow(a, t) / a)) / y tmp = 0 if t <= -9e+33: tmp = t_1 elif t <= 1.45e-292: tmp = x / (a * (y * math.exp(b))) elif t <= 0.00105: tmp = (x * (math.pow(z, y) / a)) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * Float64((a ^ t) / a)) / y) tmp = 0.0 if (t <= -9e+33) tmp = t_1; elseif (t <= 1.45e-292) tmp = Float64(x / Float64(a * Float64(y * exp(b)))); elseif (t <= 0.00105) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x * ((a ^ t) / a)) / y; tmp = 0.0; if (t <= -9e+33) tmp = t_1; elseif (t <= 1.45e-292) tmp = x / (a * (y * exp(b))); elseif (t <= 0.00105) tmp = (x * ((z ^ y) / a)) / y; 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[a, t], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t, -9e+33], t$95$1, If[LessEqual[t, 1.45e-292], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.00105], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot \frac{{a}^{t}}{a}}{y}\\
\mathbf{if}\;t \leq -9 \cdot 10^{+33}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{-292}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{elif}\;t \leq 0.00105:\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -9.0000000000000001e33 or 0.00104999999999999994 < t Initial program 100.0%
associate-*l/86.8%
*-commutative86.8%
exp-diff66.7%
exp-sum54.4%
*-commutative54.4%
exp-to-pow54.4%
*-commutative54.4%
exp-to-pow54.4%
sub-neg54.4%
metadata-eval54.4%
Simplified54.4%
Taylor expanded in y around 0 73.7%
exp-to-pow73.7%
sub-neg73.7%
metadata-eval73.7%
Simplified73.7%
Taylor expanded in b around 0 89.6%
unpow-prod-up89.6%
unpow-189.6%
Applied egg-rr89.6%
associate-*r/89.6%
*-rgt-identity89.6%
Simplified89.6%
if -9.0000000000000001e33 < t < 1.44999999999999996e-292Initial program 96.6%
associate-*l/86.7%
*-commutative86.7%
exp-diff77.3%
exp-sum75.8%
*-commutative75.8%
exp-to-pow75.8%
*-commutative75.8%
exp-to-pow76.8%
sub-neg76.8%
metadata-eval76.8%
Simplified76.8%
Taylor expanded in t around 0 83.5%
times-frac82.0%
Simplified82.0%
Taylor expanded in y around 0 85.4%
if 1.44999999999999996e-292 < t < 0.00104999999999999994Initial program 97.3%
Taylor expanded in t around 0 97.3%
+-commutative97.3%
mul-1-neg97.3%
unsub-neg97.3%
Simplified97.3%
Taylor expanded in b around 0 84.3%
div-exp84.4%
*-commutative84.4%
exp-to-pow84.4%
rem-exp-log85.6%
Simplified85.6%
Final simplification87.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (/ (pow a t) a)) y)))
(if (<= t -3.7e+34)
t_1
(if (<= t 6e-290)
(/ 1.0 (* (* y a) (/ (exp b) x)))
(if (<= t 0.00115) (/ (* x (/ (pow z y) a)) y) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * (pow(a, t) / a)) / y;
double tmp;
if (t <= -3.7e+34) {
tmp = t_1;
} else if (t <= 6e-290) {
tmp = 1.0 / ((y * a) * (exp(b) / x));
} else if (t <= 0.00115) {
tmp = (x * (pow(z, y) / a)) / y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x * ((a ** t) / a)) / y
if (t <= (-3.7d+34)) then
tmp = t_1
else if (t <= 6d-290) then
tmp = 1.0d0 / ((y * a) * (exp(b) / x))
else if (t <= 0.00115d0) then
tmp = (x * ((z ** y) / a)) / y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * (Math.pow(a, t) / a)) / y;
double tmp;
if (t <= -3.7e+34) {
tmp = t_1;
} else if (t <= 6e-290) {
tmp = 1.0 / ((y * a) * (Math.exp(b) / x));
} else if (t <= 0.00115) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * (math.pow(a, t) / a)) / y tmp = 0 if t <= -3.7e+34: tmp = t_1 elif t <= 6e-290: tmp = 1.0 / ((y * a) * (math.exp(b) / x)) elif t <= 0.00115: tmp = (x * (math.pow(z, y) / a)) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * Float64((a ^ t) / a)) / y) tmp = 0.0 if (t <= -3.7e+34) tmp = t_1; elseif (t <= 6e-290) tmp = Float64(1.0 / Float64(Float64(y * a) * Float64(exp(b) / x))); elseif (t <= 0.00115) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x * ((a ^ t) / a)) / y; tmp = 0.0; if (t <= -3.7e+34) tmp = t_1; elseif (t <= 6e-290) tmp = 1.0 / ((y * a) * (exp(b) / x)); elseif (t <= 0.00115) tmp = (x * ((z ^ y) / a)) / y; 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[a, t], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t, -3.7e+34], t$95$1, If[LessEqual[t, 6e-290], N[(1.0 / N[(N[(y * a), $MachinePrecision] * N[(N[Exp[b], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.00115], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot \frac{{a}^{t}}{a}}{y}\\
\mathbf{if}\;t \leq -3.7 \cdot 10^{+34}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-290}:\\
\;\;\;\;\frac{1}{\left(y \cdot a\right) \cdot \frac{e^{b}}{x}}\\
\mathbf{elif}\;t \leq 0.00115:\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -3.70000000000000009e34 or 0.00115 < t Initial program 100.0%
associate-*l/87.6%
*-commutative87.6%
exp-diff67.3%
exp-sum54.9%
*-commutative54.9%
exp-to-pow54.9%
*-commutative54.9%
exp-to-pow54.9%
sub-neg54.9%
metadata-eval54.9%
Simplified54.9%
Taylor expanded in y around 0 74.4%
exp-to-pow74.4%
sub-neg74.4%
metadata-eval74.4%
Simplified74.4%
Taylor expanded in b around 0 90.4%
unpow-prod-up90.4%
unpow-190.4%
Applied egg-rr90.4%
associate-*r/90.4%
*-rgt-identity90.4%
Simplified90.4%
if -3.70000000000000009e34 < t < 5.99999999999999985e-290Initial program 96.6%
associate-*l/85.4%
*-commutative85.4%
exp-diff76.1%
exp-sum74.6%
*-commutative74.6%
exp-to-pow74.6%
*-commutative74.6%
exp-to-pow75.6%
sub-neg75.6%
metadata-eval75.6%
Simplified75.6%
Taylor expanded in y around 0 75.8%
exp-to-pow77.3%
sub-neg77.3%
metadata-eval77.3%
Simplified77.3%
clear-num77.2%
inv-pow77.2%
*-commutative77.2%
Applied egg-rr77.2%
unpow-177.2%
times-frac84.5%
Simplified84.5%
Taylor expanded in t around 0 84.1%
*-commutative84.1%
Simplified84.1%
if 5.99999999999999985e-290 < t < 0.00115Initial program 97.3%
Taylor expanded in t around 0 97.3%
+-commutative97.3%
mul-1-neg97.3%
unsub-neg97.3%
Simplified97.3%
Taylor expanded in b around 0 84.3%
div-exp84.4%
*-commutative84.4%
exp-to-pow84.4%
rem-exp-log85.6%
Simplified85.6%
Final simplification87.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.05e+33) (not (<= t 1.7e-16))) (/ (* x (/ (pow a t) a)) 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.05e+33) || !(t <= 1.7e-16)) {
tmp = (x * (pow(a, t) / a)) / 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.05d+33)) .or. (.not. (t <= 1.7d-16))) then
tmp = (x * ((a ** t) / a)) / 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.05e+33) || !(t <= 1.7e-16)) {
tmp = (x * (Math.pow(a, t) / a)) / y;
} else {
tmp = x / (a * (y * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.05e+33) or not (t <= 1.7e-16): tmp = (x * (math.pow(a, t) / a)) / 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.05e+33) || !(t <= 1.7e-16)) tmp = Float64(Float64(x * Float64((a ^ t) / a)) / 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.05e+33) || ~((t <= 1.7e-16))) tmp = (x * ((a ^ t) / a)) / 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.05e+33], N[Not[LessEqual[t, 1.7e-16]], $MachinePrecision]], N[(N[(x * N[(N[Power[a, t], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $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.05 \cdot 10^{+33} \lor \neg \left(t \leq 1.7 \cdot 10^{-16}\right):\\
\;\;\;\;\frac{x \cdot \frac{{a}^{t}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
if t < -1.05e33 or 1.7e-16 < t Initial program 100.0%
associate-*l/85.5%
*-commutative85.5%
exp-diff65.8%
exp-sum53.8%
*-commutative53.8%
exp-to-pow53.8%
*-commutative53.8%
exp-to-pow53.8%
sub-neg53.8%
metadata-eval53.8%
Simplified53.8%
Taylor expanded in y around 0 72.7%
exp-to-pow72.7%
sub-neg72.7%
metadata-eval72.7%
Simplified72.7%
Taylor expanded in b around 0 88.2%
unpow-prod-up88.2%
unpow-188.2%
Applied egg-rr88.2%
associate-*r/88.2%
*-rgt-identity88.2%
Simplified88.2%
if -1.05e33 < t < 1.7e-16Initial program 96.9%
associate-*l/85.2%
*-commutative85.2%
exp-diff74.4%
exp-sum73.7%
*-commutative73.7%
exp-to-pow73.7%
*-commutative73.7%
exp-to-pow75.0%
sub-neg75.0%
metadata-eval75.0%
Simplified75.0%
Taylor expanded in t around 0 81.1%
times-frac79.5%
Simplified79.5%
Taylor expanded in y around 0 76.3%
Final simplification81.8%
(FPCore (x y z t a b) :precision binary64 (/ x (* a (* y (exp b)))))
double code(double x, double y, double z, double t, double a, double b) {
return x / (a * (y * exp(b)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x / (a * (y * exp(b)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / (a * (y * Math.exp(b)));
}
def code(x, y, z, t, a, b): return x / (a * (y * math.exp(b)))
function code(x, y, z, t, a, b) return Float64(x / Float64(a * Float64(y * exp(b)))) end
function tmp = code(x, y, z, t, a, b) tmp = x / (a * (y * exp(b))); end
code[x_, y_, z_, t_, a_, b_] := N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{a \cdot \left(y \cdot e^{b}\right)}
\end{array}
Initial program 98.3%
associate-*l/85.3%
*-commutative85.3%
exp-diff70.5%
exp-sum64.6%
*-commutative64.6%
exp-to-pow64.6%
*-commutative64.6%
exp-to-pow65.3%
sub-neg65.3%
metadata-eval65.3%
Simplified65.3%
Taylor expanded in t around 0 70.5%
times-frac67.3%
Simplified67.3%
Taylor expanded in y around 0 64.3%
Final simplification64.3%
(FPCore (x y z t a b) :precision binary64 (if (<= b -2.4e+20) (/ (- (/ x a) (* 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 <= -2.4e+20) {
tmp = ((x / a) - (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 <= (-2.4d+20)) then
tmp = ((x / a) - (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 <= -2.4e+20) {
tmp = ((x / a) - (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 <= -2.4e+20: tmp = ((x / a) - (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 <= -2.4e+20) tmp = Float64(Float64(Float64(x / a) - Float64(x * Float64(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 <= -2.4e+20) tmp = ((x / a) - (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, -2.4e+20], N[(N[(N[(x / a), $MachinePrecision] - N[(x * N[(b / a), $MachinePrecision]), $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 -2.4 \cdot 10^{+20}:\\
\;\;\;\;\frac{\frac{x}{a} - x \cdot \frac{b}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\end{array}
\end{array}
if b < -2.4e20Initial program 100.0%
associate-*l/81.5%
*-commutative81.5%
exp-diff49.2%
exp-sum46.2%
*-commutative46.2%
exp-to-pow46.2%
*-commutative46.2%
exp-to-pow46.2%
sub-neg46.2%
metadata-eval46.2%
Simplified46.2%
Taylor expanded in t around 0 64.8%
times-frac57.1%
Simplified57.1%
Taylor expanded in y around 0 80.3%
Taylor expanded in b around 0 33.2%
Taylor expanded in y around 0 40.5%
+-commutative40.5%
mul-1-neg40.5%
unsub-neg40.5%
*-commutative40.5%
associate-*r/43.6%
Simplified43.6%
if -2.4e20 < b Initial program 97.8%
associate-*l/86.6%
*-commutative86.6%
exp-diff77.7%
exp-sum70.9%
*-commutative70.9%
exp-to-pow70.9%
*-commutative70.9%
exp-to-pow71.8%
sub-neg71.8%
metadata-eval71.8%
Simplified71.8%
Taylor expanded in t around 0 72.4%
times-frac70.8%
Simplified70.8%
Taylor expanded in y around 0 58.8%
Taylor expanded in b around 0 44.2%
distribute-lft-out46.8%
*-commutative46.8%
Simplified46.8%
Final simplification46.0%
(FPCore (x y z t a b) :precision binary64 (if (<= b -5.2e+127) (* x (/ (- b) (* y a))) (if (<= b 45000000000000.0) (/ x (* y a)) (/ x (* a (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -5.2e+127) {
tmp = x * (-b / (y * a));
} else if (b <= 45000000000000.0) {
tmp = x / (y * a);
} else {
tmp = x / (a * (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 <= (-5.2d+127)) then
tmp = x * (-b / (y * a))
else if (b <= 45000000000000.0d0) then
tmp = x / (y * a)
else
tmp = x / (a * (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 <= -5.2e+127) {
tmp = x * (-b / (y * a));
} else if (b <= 45000000000000.0) {
tmp = x / (y * a);
} else {
tmp = x / (a * (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -5.2e+127: tmp = x * (-b / (y * a)) elif b <= 45000000000000.0: tmp = x / (y * a) else: tmp = x / (a * (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -5.2e+127) tmp = Float64(x * Float64(Float64(-b) / Float64(y * a))); elseif (b <= 45000000000000.0) tmp = Float64(x / Float64(y * a)); else tmp = Float64(x / Float64(a * Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -5.2e+127) tmp = x * (-b / (y * a)); elseif (b <= 45000000000000.0) tmp = x / (y * a); else tmp = x / (a * (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -5.2e+127], N[(x * N[((-b) / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 45000000000000.0], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.2 \cdot 10^{+127}:\\
\;\;\;\;x \cdot \frac{-b}{y \cdot a}\\
\mathbf{elif}\;b \leq 45000000000000:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot b\right)}\\
\end{array}
\end{array}
if b < -5.2000000000000004e127Initial program 100.0%
associate-*l/75.0%
*-commutative75.0%
exp-diff52.5%
exp-sum47.5%
*-commutative47.5%
exp-to-pow47.5%
*-commutative47.5%
exp-to-pow47.5%
sub-neg47.5%
metadata-eval47.5%
Simplified47.5%
Taylor expanded in t around 0 67.6%
times-frac57.6%
Simplified57.6%
Taylor expanded in y around 0 90.2%
Taylor expanded in b around 0 32.6%
Taylor expanded in b around inf 32.6%
associate-*r/32.6%
*-commutative32.6%
neg-mul-132.6%
distribute-rgt-neg-out32.6%
associate-*r/34.8%
Simplified34.8%
if -5.2000000000000004e127 < b < 4.5e13Initial program 97.3%
associate-*l/90.3%
*-commutative90.3%
exp-diff78.5%
exp-sum74.2%
*-commutative74.2%
exp-to-pow74.2%
*-commutative74.2%
exp-to-pow75.3%
sub-neg75.3%
metadata-eval75.3%
Simplified75.3%
Taylor expanded in t around 0 70.4%
times-frac70.9%
Simplified70.9%
Taylor expanded in y around 0 52.4%
Taylor expanded in b around 0 46.5%
*-commutative46.5%
Simplified46.5%
if 4.5e13 < b Initial program 100.0%
associate-*l/78.2%
*-commutative78.2%
exp-diff60.0%
exp-sum49.1%
*-commutative49.1%
exp-to-pow49.1%
*-commutative49.1%
exp-to-pow49.1%
sub-neg49.1%
metadata-eval49.1%
Simplified49.1%
Taylor expanded in y around 0 63.8%
exp-to-pow63.8%
sub-neg63.8%
metadata-eval63.8%
Simplified63.8%
Taylor expanded in t around 0 71.2%
Taylor expanded in b around 0 38.2%
Taylor expanded in b around inf 39.9%
*-commutative39.9%
Simplified39.9%
Final simplification43.3%
(FPCore (x y z t a b) :precision binary64 (if (<= b -2.5e+97) (* (/ x y) (/ (- b) a)) (if (<= b 45000000000000.0) (/ x (* y a)) (/ x (* a (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.5e+97) {
tmp = (x / y) * (-b / a);
} else if (b <= 45000000000000.0) {
tmp = x / (y * a);
} else {
tmp = x / (a * (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 <= (-2.5d+97)) then
tmp = (x / y) * (-b / a)
else if (b <= 45000000000000.0d0) then
tmp = x / (y * a)
else
tmp = x / (a * (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 <= -2.5e+97) {
tmp = (x / y) * (-b / a);
} else if (b <= 45000000000000.0) {
tmp = x / (y * a);
} else {
tmp = x / (a * (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -2.5e+97: tmp = (x / y) * (-b / a) elif b <= 45000000000000.0: tmp = x / (y * a) else: tmp = x / (a * (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.5e+97) tmp = Float64(Float64(x / y) * Float64(Float64(-b) / a)); elseif (b <= 45000000000000.0) tmp = Float64(x / Float64(y * a)); else tmp = Float64(x / Float64(a * Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -2.5e+97) tmp = (x / y) * (-b / a); elseif (b <= 45000000000000.0) tmp = x / (y * a); else tmp = x / (a * (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.5e+97], N[(N[(x / y), $MachinePrecision] * N[((-b) / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 45000000000000.0], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.5 \cdot 10^{+97}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{-b}{a}\\
\mathbf{elif}\;b \leq 45000000000000:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot b\right)}\\
\end{array}
\end{array}
if b < -2.49999999999999999e97Initial program 100.0%
associate-*l/80.0%
*-commutative80.0%
exp-diff56.0%
exp-sum52.0%
*-commutative52.0%
exp-to-pow52.0%
*-commutative52.0%
exp-to-pow52.0%
sub-neg52.0%
metadata-eval52.0%
Simplified52.0%
Taylor expanded in t around 0 70.1%
times-frac62.1%
Simplified62.1%
Taylor expanded in y around 0 88.2%
Taylor expanded in b around 0 32.7%
Taylor expanded in b around inf 32.7%
mul-1-neg32.7%
times-frac36.2%
distribute-lft-neg-out36.2%
*-commutative36.2%
distribute-neg-frac36.2%
Simplified36.2%
if -2.49999999999999999e97 < b < 4.5e13Initial program 97.2%
associate-*l/89.7%
*-commutative89.7%
exp-diff79.1%
exp-sum74.5%
*-commutative74.5%
exp-to-pow74.5%
*-commutative74.5%
exp-to-pow75.6%
sub-neg75.6%
metadata-eval75.6%
Simplified75.6%
Taylor expanded in t around 0 69.7%
times-frac70.3%
Simplified70.3%
Taylor expanded in y around 0 50.5%
Taylor expanded in b around 0 47.9%
*-commutative47.9%
Simplified47.9%
if 4.5e13 < b Initial program 100.0%
associate-*l/78.2%
*-commutative78.2%
exp-diff60.0%
exp-sum49.1%
*-commutative49.1%
exp-to-pow49.1%
*-commutative49.1%
exp-to-pow49.1%
sub-neg49.1%
metadata-eval49.1%
Simplified49.1%
Taylor expanded in y around 0 63.8%
exp-to-pow63.8%
sub-neg63.8%
metadata-eval63.8%
Simplified63.8%
Taylor expanded in t around 0 71.2%
Taylor expanded in b around 0 38.2%
Taylor expanded in b around inf 39.9%
*-commutative39.9%
Simplified39.9%
Final simplification43.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b -2e+20) (* (/ x y) (/ (- b) a)) (/ x (* a (+ y (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2e+20) {
tmp = (x / y) * (-b / 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 <= (-2d+20)) then
tmp = (x / y) * (-b / 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 <= -2e+20) {
tmp = (x / y) * (-b / a);
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -2e+20: tmp = (x / y) * (-b / a) else: tmp = x / (a * (y + (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2e+20) tmp = Float64(Float64(x / y) * Float64(Float64(-b) / 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 <= -2e+20) tmp = (x / y) * (-b / a); else tmp = x / (a * (y + (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2e+20], N[(N[(x / y), $MachinePrecision] * N[((-b) / a), $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 -2 \cdot 10^{+20}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{-b}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\end{array}
\end{array}
if b < -2e20Initial program 100.0%
associate-*l/81.5%
*-commutative81.5%
exp-diff49.2%
exp-sum46.2%
*-commutative46.2%
exp-to-pow46.2%
*-commutative46.2%
exp-to-pow46.2%
sub-neg46.2%
metadata-eval46.2%
Simplified46.2%
Taylor expanded in t around 0 64.8%
times-frac57.1%
Simplified57.1%
Taylor expanded in y around 0 80.3%
Taylor expanded in b around 0 33.2%
Taylor expanded in b around inf 33.2%
mul-1-neg33.2%
times-frac34.5%
distribute-lft-neg-out34.5%
*-commutative34.5%
distribute-neg-frac34.5%
Simplified34.5%
if -2e20 < b Initial program 97.8%
associate-*l/86.6%
*-commutative86.6%
exp-diff77.7%
exp-sum70.9%
*-commutative70.9%
exp-to-pow70.9%
*-commutative70.9%
exp-to-pow71.8%
sub-neg71.8%
metadata-eval71.8%
Simplified71.8%
Taylor expanded in t around 0 72.4%
times-frac70.8%
Simplified70.8%
Taylor expanded in y around 0 58.8%
Taylor expanded in b around 0 44.2%
distribute-lft-out46.8%
*-commutative46.8%
Simplified46.8%
Final simplification43.6%
(FPCore (x y z t a b) :precision binary64 (if (<= t 1.7e-222) (/ x (* y a)) (* (/ x y) (/ 1.0 a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 1.7e-222) {
tmp = x / (y * a);
} else {
tmp = (x / y) * (1.0 / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= 1.7d-222) then
tmp = x / (y * a)
else
tmp = (x / y) * (1.0d0 / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 1.7e-222) {
tmp = x / (y * a);
} else {
tmp = (x / y) * (1.0 / a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= 1.7e-222: tmp = x / (y * a) else: tmp = (x / y) * (1.0 / a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= 1.7e-222) tmp = Float64(x / Float64(y * a)); else tmp = Float64(Float64(x / y) * Float64(1.0 / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= 1.7e-222) tmp = x / (y * a); else tmp = (x / y) * (1.0 / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, 1.7e-222], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] * N[(1.0 / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.7 \cdot 10^{-222}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{1}{a}\\
\end{array}
\end{array}
if t < 1.7000000000000001e-222Initial program 98.4%
associate-*l/85.5%
*-commutative85.5%
exp-diff74.1%
exp-sum68.7%
*-commutative68.7%
exp-to-pow68.7%
*-commutative68.7%
exp-to-pow69.3%
sub-neg69.3%
metadata-eval69.3%
Simplified69.3%
Taylor expanded in t around 0 77.6%
times-frac75.1%
Simplified75.1%
Taylor expanded in y around 0 70.9%
Taylor expanded in b around 0 44.2%
*-commutative44.2%
Simplified44.2%
if 1.7000000000000001e-222 < t Initial program 98.3%
associate-*l/85.1%
*-commutative85.1%
exp-diff65.4%
exp-sum58.9%
*-commutative58.9%
exp-to-pow58.9%
*-commutative58.9%
exp-to-pow59.8%
sub-neg59.8%
metadata-eval59.8%
Simplified59.8%
Taylor expanded in t around 0 60.5%
times-frac56.4%
Simplified56.4%
Taylor expanded in y around 0 55.1%
Taylor expanded in b around 0 25.8%
*-commutative25.8%
Simplified25.8%
associate-/r*29.9%
div-inv29.8%
Applied egg-rr29.8%
Final simplification38.2%
(FPCore (x y z t a b) :precision binary64 (if (<= t 1.8e-222) (/ x (* y a)) (/ 1.0 (* a (/ y x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 1.8e-222) {
tmp = x / (y * a);
} else {
tmp = 1.0 / (a * (y / x));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= 1.8d-222) then
tmp = x / (y * a)
else
tmp = 1.0d0 / (a * (y / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 1.8e-222) {
tmp = x / (y * a);
} else {
tmp = 1.0 / (a * (y / x));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= 1.8e-222: tmp = x / (y * a) else: tmp = 1.0 / (a * (y / x)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= 1.8e-222) tmp = Float64(x / Float64(y * a)); else tmp = Float64(1.0 / Float64(a * Float64(y / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= 1.8e-222) tmp = x / (y * a); else tmp = 1.0 / (a * (y / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, 1.8e-222], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.8 \cdot 10^{-222}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{a \cdot \frac{y}{x}}\\
\end{array}
\end{array}
if t < 1.79999999999999987e-222Initial program 98.4%
associate-*l/85.5%
*-commutative85.5%
exp-diff74.1%
exp-sum68.7%
*-commutative68.7%
exp-to-pow68.7%
*-commutative68.7%
exp-to-pow69.3%
sub-neg69.3%
metadata-eval69.3%
Simplified69.3%
Taylor expanded in t around 0 77.6%
times-frac75.1%
Simplified75.1%
Taylor expanded in y around 0 70.9%
Taylor expanded in b around 0 44.2%
*-commutative44.2%
Simplified44.2%
if 1.79999999999999987e-222 < t Initial program 98.3%
associate-*l/85.1%
*-commutative85.1%
exp-diff65.4%
exp-sum58.9%
*-commutative58.9%
exp-to-pow58.9%
*-commutative58.9%
exp-to-pow59.8%
sub-neg59.8%
metadata-eval59.8%
Simplified59.8%
Taylor expanded in t around 0 60.5%
times-frac56.4%
Simplified56.4%
Taylor expanded in y around 0 55.1%
Taylor expanded in b around 0 25.8%
*-commutative25.8%
Simplified25.8%
*-commutative25.8%
associate-/r*28.2%
clear-num28.7%
inv-pow28.7%
Applied egg-rr28.7%
unpow-128.7%
associate-/r/31.4%
Simplified31.4%
Final simplification38.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b 45000000000000.0) (/ x (* y a)) (/ x (* a (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 45000000000000.0) {
tmp = x / (y * a);
} else {
tmp = x / (a * (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 <= 45000000000000.0d0) then
tmp = x / (y * a)
else
tmp = x / (a * (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 <= 45000000000000.0) {
tmp = x / (y * a);
} else {
tmp = x / (a * (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 45000000000000.0: tmp = x / (y * a) else: tmp = x / (a * (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 45000000000000.0) tmp = Float64(x / Float64(y * a)); else tmp = Float64(x / Float64(a * Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 45000000000000.0) tmp = x / (y * a); else tmp = x / (a * (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 45000000000000.0], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 45000000000000:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot b\right)}\\
\end{array}
\end{array}
if b < 4.5e13Initial program 97.9%
associate-*l/87.3%
*-commutative87.3%
exp-diff73.3%
exp-sum68.9%
*-commutative68.9%
exp-to-pow68.9%
*-commutative68.9%
exp-to-pow69.8%
sub-neg69.8%
metadata-eval69.8%
Simplified69.8%
Taylor expanded in t around 0 69.8%
times-frac68.3%
Simplified68.3%
Taylor expanded in y around 0 59.9%
Taylor expanded in b around 0 41.2%
*-commutative41.2%
Simplified41.2%
if 4.5e13 < b Initial program 100.0%
associate-*l/78.2%
*-commutative78.2%
exp-diff60.0%
exp-sum49.1%
*-commutative49.1%
exp-to-pow49.1%
*-commutative49.1%
exp-to-pow49.1%
sub-neg49.1%
metadata-eval49.1%
Simplified49.1%
Taylor expanded in y around 0 63.8%
exp-to-pow63.8%
sub-neg63.8%
metadata-eval63.8%
Simplified63.8%
Taylor expanded in t around 0 71.2%
Taylor expanded in b around 0 38.2%
Taylor expanded in b around inf 39.9%
*-commutative39.9%
Simplified39.9%
Final simplification40.9%
(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/85.3%
*-commutative85.3%
exp-diff70.5%
exp-sum64.6%
*-commutative64.6%
exp-to-pow64.6%
*-commutative64.6%
exp-to-pow65.3%
sub-neg65.3%
metadata-eval65.3%
Simplified65.3%
Taylor expanded in t around 0 70.5%
times-frac67.3%
Simplified67.3%
Taylor expanded in y around 0 64.3%
Taylor expanded in b around 0 36.5%
*-commutative36.5%
Simplified36.5%
Final simplification36.5%
(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 2023336
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2, A"
:precision binary64
:herbie-target
(if (< t -0.8845848504127471) (/ (* x (/ (pow a (- t 1.0)) y)) (- (+ b 1.0) (* y (log z)))) (if (< t 852031.2288374073) (/ (* (/ x y) (pow a (- t 1.0))) (exp (- b (* (log z) y)))) (/ (* x (/ (pow a (- t 1.0)) y)) (- (+ b 1.0) (* y (log z))))))
(/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))