
(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 22 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.0%
Final simplification98.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (+ t -1.0) -1e+70) (not (<= (+ t -1.0) 4e+93))) (/ (* 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) <= -1e+70) || !((t + -1.0) <= 4e+93)) {
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)) <= (-1d+70)) .or. (.not. ((t + (-1.0d0)) <= 4d+93))) 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) <= -1e+70) || !((t + -1.0) <= 4e+93)) {
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) <= -1e+70) or not ((t + -1.0) <= 4e+93): 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) <= -1e+70) || !(Float64(t + -1.0) <= 4e+93)) 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) <= -1e+70) || ~(((t + -1.0) <= 4e+93))) 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], -1e+70], N[Not[LessEqual[N[(t + -1.0), $MachinePrecision], 4e+93]], $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 \cdot 10^{+70} \lor \neg \left(t + -1 \leq 4 \cdot 10^{+93}\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 #s(literal 1 binary64)) < -1.00000000000000007e70 or 4.00000000000000017e93 < (-.f64 t #s(literal 1 binary64)) Initial program 100.0%
*-commutative100.0%
associate-/l*91.0%
associate--l+91.0%
fma-define91.0%
sub-neg91.0%
metadata-eval91.0%
Simplified91.0%
Taylor expanded in y around 0 96.1%
if -1.00000000000000007e70 < (-.f64 t #s(literal 1 binary64)) < 4.00000000000000017e93Initial program 96.8%
Taylor expanded in t around 0 94.0%
+-commutative94.0%
mul-1-neg94.0%
unsub-neg94.0%
Simplified94.0%
Final simplification94.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (+ t -1.0) -50000000000.0) (not (<= (+ t -1.0) -1.0))) (/ (* x (exp (- (* (+ t -1.0) (log a)) b))) y) (/ (* x (pow z y)) (* a (* y (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t + -1.0) <= -50000000000.0) || !((t + -1.0) <= -1.0)) {
tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y;
} else {
tmp = (x * pow(z, y)) / (a * (y * exp(b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (((t + (-1.0d0)) <= (-50000000000.0d0)) .or. (.not. ((t + (-1.0d0)) <= (-1.0d0)))) then
tmp = (x * exp((((t + (-1.0d0)) * log(a)) - b))) / y
else
tmp = (x * (z ** y)) / (a * (y * exp(b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t + -1.0) <= -50000000000.0) || !((t + -1.0) <= -1.0)) {
tmp = (x * Math.exp((((t + -1.0) * Math.log(a)) - b))) / y;
} else {
tmp = (x * Math.pow(z, y)) / (a * (y * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((t + -1.0) <= -50000000000.0) or not ((t + -1.0) <= -1.0): tmp = (x * math.exp((((t + -1.0) * math.log(a)) - b))) / y else: tmp = (x * math.pow(z, y)) / (a * (y * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(t + -1.0) <= -50000000000.0) || !(Float64(t + -1.0) <= -1.0)) tmp = Float64(Float64(x * exp(Float64(Float64(Float64(t + -1.0) * log(a)) - b))) / y); else tmp = Float64(Float64(x * (z ^ y)) / Float64(a * Float64(y * exp(b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((t + -1.0) <= -50000000000.0) || ~(((t + -1.0) <= -1.0))) tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y; else tmp = (x * (z ^ y)) / (a * (y * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(t + -1.0), $MachinePrecision], -50000000000.0], N[Not[LessEqual[N[(t + -1.0), $MachinePrecision], -1.0]], $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[Power[z, y], $MachinePrecision]), $MachinePrecision] / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t + -1 \leq -50000000000 \lor \neg \left(t + -1 \leq -1\right):\\
\;\;\;\;\frac{x \cdot e^{\left(t + -1\right) \cdot \log a - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot {z}^{y}}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
if (-.f64 t #s(literal 1 binary64)) < -5e10 or -1 < (-.f64 t #s(literal 1 binary64)) Initial program 99.9%
*-commutative99.9%
associate-/l*88.6%
associate--l+88.6%
fma-define88.6%
sub-neg88.6%
metadata-eval88.6%
Simplified88.6%
Taylor expanded in y around 0 91.0%
if -5e10 < (-.f64 t #s(literal 1 binary64)) < -1Initial program 96.0%
associate-/l*97.3%
associate--l+97.3%
exp-sum92.4%
associate-/l*91.6%
*-commutative91.6%
exp-to-pow91.6%
exp-diff91.6%
*-commutative91.6%
exp-to-pow92.6%
sub-neg92.6%
metadata-eval92.6%
Simplified92.6%
Taylor expanded in t around 0 92.1%
Final simplification91.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -8e+37) (not (<= y 2.9))) (/ (/ (* x (pow z y)) a) y) (/ (* x (/ (pow a t) (* a (exp b)))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -8e+37) || !(y <= 2.9)) {
tmp = ((x * pow(z, y)) / a) / y;
} else {
tmp = (x * (pow(a, t) / (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 ((y <= (-8d+37)) .or. (.not. (y <= 2.9d0))) then
tmp = ((x * (z ** y)) / a) / y
else
tmp = (x * ((a ** t) / (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 ((y <= -8e+37) || !(y <= 2.9)) {
tmp = ((x * Math.pow(z, y)) / a) / y;
} else {
tmp = (x * (Math.pow(a, t) / (a * Math.exp(b)))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -8e+37) or not (y <= 2.9): tmp = ((x * math.pow(z, y)) / a) / y else: tmp = (x * (math.pow(a, t) / (a * math.exp(b)))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -8e+37) || !(y <= 2.9)) tmp = Float64(Float64(Float64(x * (z ^ y)) / a) / y); else tmp = Float64(Float64(x * Float64((a ^ t) / Float64(a * exp(b)))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -8e+37) || ~((y <= 2.9))) tmp = ((x * (z ^ y)) / a) / y; else tmp = (x * ((a ^ t) / (a * exp(b)))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -8e+37], N[Not[LessEqual[y, 2.9]], $MachinePrecision]], N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[(N[Power[a, t], $MachinePrecision] / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+37} \lor \neg \left(y \leq 2.9\right):\\
\;\;\;\;\frac{\frac{x \cdot {z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \frac{{a}^{t}}{a \cdot e^{b}}}{y}\\
\end{array}
\end{array}
if y < -7.99999999999999963e37 or 2.89999999999999991 < y Initial program 100.0%
Taylor expanded in b around 0 92.5%
exp-sum70.5%
exp-to-pow70.5%
sub-neg70.5%
metadata-eval70.5%
*-commutative70.5%
exp-to-pow70.5%
Simplified70.5%
Taylor expanded in t around 0 80.6%
if -7.99999999999999963e37 < y < 2.89999999999999991Initial program 95.9%
*-commutative95.9%
associate-/l*89.0%
associate--l+89.0%
fma-define89.0%
sub-neg89.0%
metadata-eval89.0%
Simplified89.0%
Taylor expanded in y around 0 95.3%
exp-diff85.6%
sub-neg85.6%
metadata-eval85.6%
pow-to-exp86.3%
unpow-prod-up86.5%
inv-pow86.5%
div-inv86.5%
associate-/l/86.5%
Applied egg-rr86.5%
Final simplification83.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -1.92e+56)
(/ (* x (pow a (+ t -1.0))) y)
(if (<= t 1.6e-43)
(/ (* x (pow z y)) (* a (* y (exp b))))
(/ (/ (* x (pow a t)) a) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.92e+56) {
tmp = (x * pow(a, (t + -1.0))) / y;
} else if (t <= 1.6e-43) {
tmp = (x * pow(z, y)) / (a * (y * exp(b)));
} else {
tmp = ((x * pow(a, t)) / 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 <= (-1.92d+56)) then
tmp = (x * (a ** (t + (-1.0d0)))) / y
else if (t <= 1.6d-43) then
tmp = (x * (z ** y)) / (a * (y * exp(b)))
else
tmp = ((x * (a ** t)) / 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 <= -1.92e+56) {
tmp = (x * Math.pow(a, (t + -1.0))) / y;
} else if (t <= 1.6e-43) {
tmp = (x * Math.pow(z, y)) / (a * (y * Math.exp(b)));
} else {
tmp = ((x * Math.pow(a, t)) / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.92e+56: tmp = (x * math.pow(a, (t + -1.0))) / y elif t <= 1.6e-43: tmp = (x * math.pow(z, y)) / (a * (y * math.exp(b))) else: tmp = ((x * math.pow(a, t)) / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.92e+56) tmp = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y); elseif (t <= 1.6e-43) tmp = Float64(Float64(x * (z ^ y)) / Float64(a * Float64(y * exp(b)))); else tmp = Float64(Float64(Float64(x * (a ^ t)) / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.92e+56) tmp = (x * (a ^ (t + -1.0))) / y; elseif (t <= 1.6e-43) tmp = (x * (z ^ y)) / (a * (y * exp(b))); else tmp = ((x * (a ^ t)) / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.92e+56], N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 1.6e-43], N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.92 \cdot 10^{+56}:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-43}:\\
\;\;\;\;\frac{x \cdot {z}^{y}}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x \cdot {a}^{t}}{a}}{y}\\
\end{array}
\end{array}
if t < -1.9199999999999999e56Initial program 100.0%
*-commutative100.0%
associate-/l*85.9%
associate--l+85.9%
fma-define85.9%
sub-neg85.9%
metadata-eval85.9%
Simplified85.9%
Taylor expanded in y around 0 90.8%
Taylor expanded in b around 0 86.2%
exp-to-pow86.2%
sub-neg86.2%
metadata-eval86.2%
+-commutative86.2%
Simplified86.2%
if -1.9199999999999999e56 < t < 1.59999999999999992e-43Initial program 96.1%
associate-/l*97.4%
associate--l+97.4%
exp-sum93.5%
associate-/l*92.7%
*-commutative92.7%
exp-to-pow92.7%
exp-diff91.9%
*-commutative91.9%
exp-to-pow92.8%
sub-neg92.8%
metadata-eval92.8%
Simplified92.8%
Taylor expanded in t around 0 92.3%
if 1.59999999999999992e-43 < t Initial program 99.7%
*-commutative99.7%
associate-/l*92.1%
associate--l+92.1%
fma-define92.1%
sub-neg92.1%
metadata-eval92.1%
Simplified92.1%
Taylor expanded in y around 0 89.3%
exp-diff69.6%
sub-neg69.6%
metadata-eval69.6%
pow-to-exp69.7%
unpow-prod-up69.9%
inv-pow69.9%
div-inv69.9%
associate-/l/69.9%
Applied egg-rr69.9%
Taylor expanded in b around 0 83.3%
Final simplification88.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -1.32e-18)
(/ (/ (* x (pow a t)) a) y)
(if (<= t 1.06e-115)
(/ x (* a (* y (exp b))))
(if (<= t 2.1e+93)
(* (/ (* x (pow z y)) a) (/ 1.0 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 <= -1.32e-18) {
tmp = ((x * pow(a, t)) / a) / y;
} else if (t <= 1.06e-115) {
tmp = x / (a * (y * exp(b)));
} else if (t <= 2.1e+93) {
tmp = ((x * pow(z, y)) / a) * (1.0 / 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 <= (-1.32d-18)) then
tmp = ((x * (a ** t)) / a) / y
else if (t <= 1.06d-115) then
tmp = x / (a * (y * exp(b)))
else if (t <= 2.1d+93) then
tmp = ((x * (z ** y)) / a) * (1.0d0 / 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 <= -1.32e-18) {
tmp = ((x * Math.pow(a, t)) / a) / y;
} else if (t <= 1.06e-115) {
tmp = x / (a * (y * Math.exp(b)));
} else if (t <= 2.1e+93) {
tmp = ((x * Math.pow(z, y)) / a) * (1.0 / 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 <= -1.32e-18: tmp = ((x * math.pow(a, t)) / a) / y elif t <= 1.06e-115: tmp = x / (a * (y * math.exp(b))) elif t <= 2.1e+93: tmp = ((x * math.pow(z, y)) / a) * (1.0 / 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 <= -1.32e-18) tmp = Float64(Float64(Float64(x * (a ^ t)) / a) / y); elseif (t <= 1.06e-115) tmp = Float64(x / Float64(a * Float64(y * exp(b)))); elseif (t <= 2.1e+93) tmp = Float64(Float64(Float64(x * (z ^ y)) / a) * Float64(1.0 / 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 <= -1.32e-18) tmp = ((x * (a ^ t)) / a) / y; elseif (t <= 1.06e-115) tmp = x / (a * (y * exp(b))); elseif (t <= 2.1e+93) tmp = ((x * (z ^ y)) / a) * (1.0 / y); else tmp = (x * (a ^ (t + -1.0))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.32e-18], N[(N[(N[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 1.06e-115], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.1e+93], N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] * N[(1.0 / y), $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 -1.32 \cdot 10^{-18}:\\
\;\;\;\;\frac{\frac{x \cdot {a}^{t}}{a}}{y}\\
\mathbf{elif}\;t \leq 1.06 \cdot 10^{-115}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{+93}:\\
\;\;\;\;\frac{x \cdot {z}^{y}}{a} \cdot \frac{1}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\end{array}
\end{array}
if t < -1.3199999999999999e-18Initial program 99.8%
*-commutative99.8%
associate-/l*86.6%
associate--l+86.6%
fma-define86.6%
sub-neg86.6%
metadata-eval86.6%
Simplified86.6%
Taylor expanded in y around 0 90.7%
exp-diff65.7%
sub-neg65.7%
metadata-eval65.7%
pow-to-exp65.7%
unpow-prod-up65.9%
inv-pow65.9%
div-inv65.9%
associate-/l/65.9%
Applied egg-rr65.9%
Taylor expanded in b around 0 85.8%
if -1.3199999999999999e-18 < t < 1.06e-115Initial program 95.7%
*-commutative95.7%
associate-/l*85.5%
associate--l+85.5%
fma-define85.5%
sub-neg85.5%
metadata-eval85.5%
Simplified85.5%
Taylor expanded in y around 0 71.1%
div-exp71.1%
exp-to-pow72.2%
sub-neg72.2%
metadata-eval72.2%
Simplified72.2%
Taylor expanded in t around 0 80.5%
if 1.06e-115 < t < 2.0999999999999998e93Initial program 98.8%
Taylor expanded in b around 0 85.3%
exp-sum69.0%
exp-to-pow69.5%
sub-neg69.5%
metadata-eval69.5%
*-commutative69.5%
exp-to-pow69.8%
Simplified69.8%
div-inv69.8%
associate-*r*69.8%
Applied egg-rr69.8%
Taylor expanded in t around 0 73.7%
if 2.0999999999999998e93 < t Initial program 100.0%
*-commutative100.0%
associate-/l*94.9%
associate--l+94.9%
fma-define94.9%
sub-neg94.9%
metadata-eval94.9%
Simplified94.9%
Taylor expanded in y around 0 100.0%
Taylor expanded in b around 0 97.5%
exp-to-pow97.5%
sub-neg97.5%
metadata-eval97.5%
+-commutative97.5%
Simplified97.5%
Final simplification83.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -1.32e-18)
(/ (/ (* x (pow a t)) a) y)
(if (<= t 1.95e-115)
(/ x (* a (* y (exp b))))
(if (<= t 2.1e+93)
(/ (/ (* x (pow z y)) 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 <= -1.32e-18) {
tmp = ((x * pow(a, t)) / a) / y;
} else if (t <= 1.95e-115) {
tmp = x / (a * (y * exp(b)));
} else if (t <= 2.1e+93) {
tmp = ((x * pow(z, y)) / 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 <= (-1.32d-18)) then
tmp = ((x * (a ** t)) / a) / y
else if (t <= 1.95d-115) then
tmp = x / (a * (y * exp(b)))
else if (t <= 2.1d+93) then
tmp = ((x * (z ** y)) / 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 <= -1.32e-18) {
tmp = ((x * Math.pow(a, t)) / a) / y;
} else if (t <= 1.95e-115) {
tmp = x / (a * (y * Math.exp(b)));
} else if (t <= 2.1e+93) {
tmp = ((x * Math.pow(z, y)) / 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 <= -1.32e-18: tmp = ((x * math.pow(a, t)) / a) / y elif t <= 1.95e-115: tmp = x / (a * (y * math.exp(b))) elif t <= 2.1e+93: tmp = ((x * math.pow(z, y)) / 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 <= -1.32e-18) tmp = Float64(Float64(Float64(x * (a ^ t)) / a) / y); elseif (t <= 1.95e-115) tmp = Float64(x / Float64(a * Float64(y * exp(b)))); elseif (t <= 2.1e+93) tmp = Float64(Float64(Float64(x * (z ^ y)) / 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 <= -1.32e-18) tmp = ((x * (a ^ t)) / a) / y; elseif (t <= 1.95e-115) tmp = x / (a * (y * exp(b))); elseif (t <= 2.1e+93) tmp = ((x * (z ^ y)) / 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, -1.32e-18], N[(N[(N[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 1.95e-115], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.1e+93], N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $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 -1.32 \cdot 10^{-18}:\\
\;\;\;\;\frac{\frac{x \cdot {a}^{t}}{a}}{y}\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{-115}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{+93}:\\
\;\;\;\;\frac{\frac{x \cdot {z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\end{array}
\end{array}
if t < -1.3199999999999999e-18Initial program 99.8%
*-commutative99.8%
associate-/l*86.6%
associate--l+86.6%
fma-define86.6%
sub-neg86.6%
metadata-eval86.6%
Simplified86.6%
Taylor expanded in y around 0 90.7%
exp-diff65.7%
sub-neg65.7%
metadata-eval65.7%
pow-to-exp65.7%
unpow-prod-up65.9%
inv-pow65.9%
div-inv65.9%
associate-/l/65.9%
Applied egg-rr65.9%
Taylor expanded in b around 0 85.8%
if -1.3199999999999999e-18 < t < 1.9499999999999999e-115Initial program 95.7%
*-commutative95.7%
associate-/l*85.5%
associate--l+85.5%
fma-define85.5%
sub-neg85.5%
metadata-eval85.5%
Simplified85.5%
Taylor expanded in y around 0 71.1%
div-exp71.1%
exp-to-pow72.2%
sub-neg72.2%
metadata-eval72.2%
Simplified72.2%
Taylor expanded in t around 0 80.5%
if 1.9499999999999999e-115 < t < 2.0999999999999998e93Initial program 98.8%
Taylor expanded in b around 0 85.3%
exp-sum69.0%
exp-to-pow69.5%
sub-neg69.5%
metadata-eval69.5%
*-commutative69.5%
exp-to-pow69.8%
Simplified69.8%
Taylor expanded in t around 0 73.7%
if 2.0999999999999998e93 < t Initial program 100.0%
*-commutative100.0%
associate-/l*94.9%
associate--l+94.9%
fma-define94.9%
sub-neg94.9%
metadata-eval94.9%
Simplified94.9%
Taylor expanded in y around 0 100.0%
Taylor expanded in b around 0 97.5%
exp-to-pow97.5%
sub-neg97.5%
metadata-eval97.5%
+-commutative97.5%
Simplified97.5%
Final simplification83.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.32e-18) (not (<= t 1.6e-43))) (/ (/ (* 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.32e-18) || !(t <= 1.6e-43)) {
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.32d-18)) .or. (.not. (t <= 1.6d-43))) 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.32e-18) || !(t <= 1.6e-43)) {
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.32e-18) or not (t <= 1.6e-43): 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.32e-18) || !(t <= 1.6e-43)) tmp = Float64(Float64(Float64(x * (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.32e-18) || ~((t <= 1.6e-43))) 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.32e-18], N[Not[LessEqual[t, 1.6e-43]], $MachinePrecision]], N[(N[(N[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / a), $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.32 \cdot 10^{-18} \lor \neg \left(t \leq 1.6 \cdot 10^{-43}\right):\\
\;\;\;\;\frac{\frac{x \cdot {a}^{t}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
if t < -1.3199999999999999e-18 or 1.59999999999999992e-43 < t Initial program 99.7%
*-commutative99.7%
associate-/l*89.2%
associate--l+89.2%
fma-define89.2%
sub-neg89.2%
metadata-eval89.2%
Simplified89.2%
Taylor expanded in y around 0 90.0%
exp-diff67.5%
sub-neg67.5%
metadata-eval67.5%
pow-to-exp67.6%
unpow-prod-up67.7%
inv-pow67.7%
div-inv67.7%
associate-/l/67.7%
Applied egg-rr67.7%
Taylor expanded in b around 0 84.6%
if -1.3199999999999999e-18 < t < 1.59999999999999992e-43Initial program 95.9%
*-commutative95.9%
associate-/l*86.6%
associate--l+86.6%
fma-define86.6%
sub-neg86.6%
metadata-eval86.6%
Simplified86.6%
Taylor expanded in y around 0 67.6%
div-exp67.6%
exp-to-pow68.7%
sub-neg68.7%
metadata-eval68.7%
Simplified68.7%
Taylor expanded in t around 0 77.1%
Final simplification81.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.32e-18) (not (<= t 1.6e-43))) (/ (* x (pow a (+ t -1.0))) y) (/ x (* a (* y (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.32e-18) || !(t <= 1.6e-43)) {
tmp = (x * pow(a, (t + -1.0))) / y;
} else {
tmp = x / (a * (y * exp(b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-1.32d-18)) .or. (.not. (t <= 1.6d-43))) then
tmp = (x * (a ** (t + (-1.0d0)))) / y
else
tmp = x / (a * (y * exp(b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.32e-18) || !(t <= 1.6e-43)) {
tmp = (x * Math.pow(a, (t + -1.0))) / y;
} else {
tmp = x / (a * (y * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.32e-18) or not (t <= 1.6e-43): tmp = (x * math.pow(a, (t + -1.0))) / y else: tmp = x / (a * (y * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.32e-18) || !(t <= 1.6e-43)) tmp = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y); else tmp = Float64(x / Float64(a * Float64(y * exp(b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.32e-18) || ~((t <= 1.6e-43))) tmp = (x * (a ^ (t + -1.0))) / y; else tmp = x / (a * (y * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.32e-18], N[Not[LessEqual[t, 1.6e-43]], $MachinePrecision]], N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $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.32 \cdot 10^{-18} \lor \neg \left(t \leq 1.6 \cdot 10^{-43}\right):\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
if t < -1.3199999999999999e-18 or 1.59999999999999992e-43 < t Initial program 99.7%
*-commutative99.7%
associate-/l*89.2%
associate--l+89.2%
fma-define89.2%
sub-neg89.2%
metadata-eval89.2%
Simplified89.2%
Taylor expanded in y around 0 90.0%
Taylor expanded in b around 0 84.4%
exp-to-pow84.5%
sub-neg84.5%
metadata-eval84.5%
+-commutative84.5%
Simplified84.5%
if -1.3199999999999999e-18 < t < 1.59999999999999992e-43Initial program 95.9%
*-commutative95.9%
associate-/l*86.6%
associate--l+86.6%
fma-define86.6%
sub-neg86.6%
metadata-eval86.6%
Simplified86.6%
Taylor expanded in y around 0 67.6%
div-exp67.6%
exp-to-pow68.7%
sub-neg68.7%
metadata-eval68.7%
Simplified68.7%
Taylor expanded in t around 0 77.1%
Final simplification81.2%
(FPCore (x y z t a b) :precision binary64 (if (<= t 4e+167) (/ x (* a (* y (exp b)))) (/ x (* 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 <= 4e+167) {
tmp = x / (a * (y * exp(b)));
} else {
tmp = x / (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 <= 4d+167) then
tmp = x / (a * (y * exp(b)))
else
tmp = x / (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 <= 4e+167) {
tmp = x / (a * (y * Math.exp(b)));
} else {
tmp = x / (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 <= 4e+167: tmp = x / (a * (y * math.exp(b))) else: tmp = x / (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 <= 4e+167) tmp = Float64(x / Float64(a * Float64(y * exp(b)))); else tmp = Float64(x / 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 <= 4e+167) tmp = x / (a * (y * exp(b))); else tmp = x / (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[t, 4e+167], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / 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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 4 \cdot 10^{+167}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(1 + b \cdot \left(1 + b \cdot \left(0.5 + b \cdot 0.16666666666666666\right)\right)\right)}\\
\end{array}
\end{array}
if t < 4.0000000000000002e167Initial program 97.8%
*-commutative97.8%
associate-/l*86.7%
associate--l+86.7%
fma-define86.7%
sub-neg86.7%
metadata-eval86.7%
Simplified86.7%
Taylor expanded in y around 0 72.3%
div-exp62.7%
exp-to-pow63.3%
sub-neg63.3%
metadata-eval63.3%
Simplified63.3%
Taylor expanded in t around 0 63.9%
if 4.0000000000000002e167 < t Initial program 100.0%
*-commutative100.0%
associate-/l*100.0%
associate--l+100.0%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in b around inf 29.6%
neg-mul-129.6%
Simplified29.6%
exp-neg29.6%
frac-times29.8%
*-un-lft-identity29.8%
Applied egg-rr29.8%
Taylor expanded in b around 0 41.8%
*-commutative41.8%
Simplified41.8%
Final simplification61.8%
(FPCore (x y z t a b) :precision binary64 (/ x (* y (exp b))))
double code(double x, double y, double z, double t, double a, double b) {
return x / (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 / (y * exp(b))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / (y * Math.exp(b));
}
def code(x, y, z, t, a, b): return x / (y * math.exp(b))
function code(x, y, z, t, a, b) return Float64(x / Float64(y * exp(b))) end
function tmp = code(x, y, z, t, a, b) tmp = x / (y * exp(b)); end
code[x_, y_, z_, t_, a_, b_] := N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y \cdot e^{b}}
\end{array}
Initial program 98.0%
*-commutative98.0%
associate-/l*88.0%
associate--l+88.0%
fma-define88.0%
sub-neg88.0%
metadata-eval88.0%
Simplified88.0%
Taylor expanded in b around inf 42.1%
neg-mul-142.1%
Simplified42.1%
exp-neg42.1%
frac-times47.6%
*-un-lft-identity47.6%
Applied egg-rr47.6%
Final simplification47.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -8.2e+114)
(/ (* x (+ 1.0 (* b (+ -1.0 (* b 0.5))))) y)
(if (or (<= b -2e+49) (not (<= b 5.5e-192)))
(/ x (* y (+ 1.0 (* b (+ 1.0 (* b (+ 0.5 (* b 0.16666666666666666))))))))
(* b (- (/ x (* y b)) (/ x y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -8.2e+114) {
tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y;
} else if ((b <= -2e+49) || !(b <= 5.5e-192)) {
tmp = x / (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))));
} else {
tmp = b * ((x / (y * b)) - (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 (b <= (-8.2d+114)) then
tmp = (x * (1.0d0 + (b * ((-1.0d0) + (b * 0.5d0))))) / y
else if ((b <= (-2d+49)) .or. (.not. (b <= 5.5d-192))) then
tmp = x / (y * (1.0d0 + (b * (1.0d0 + (b * (0.5d0 + (b * 0.16666666666666666d0)))))))
else
tmp = b * ((x / (y * b)) - (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 (b <= -8.2e+114) {
tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y;
} else if ((b <= -2e+49) || !(b <= 5.5e-192)) {
tmp = x / (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))));
} else {
tmp = b * ((x / (y * b)) - (x / y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -8.2e+114: tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y elif (b <= -2e+49) or not (b <= 5.5e-192): tmp = x / (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666))))))) else: tmp = b * ((x / (y * b)) - (x / y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -8.2e+114) tmp = Float64(Float64(x * Float64(1.0 + Float64(b * Float64(-1.0 + Float64(b * 0.5))))) / y); elseif ((b <= -2e+49) || !(b <= 5.5e-192)) tmp = Float64(x / Float64(y * Float64(1.0 + Float64(b * Float64(1.0 + Float64(b * Float64(0.5 + Float64(b * 0.16666666666666666)))))))); else tmp = Float64(b * Float64(Float64(x / Float64(y * b)) - Float64(x / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -8.2e+114) tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y; elseif ((b <= -2e+49) || ~((b <= 5.5e-192))) tmp = x / (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666))))))); else tmp = b * ((x / (y * b)) - (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -8.2e+114], N[(N[(x * N[(1.0 + N[(b * N[(-1.0 + N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[Or[LessEqual[b, -2e+49], N[Not[LessEqual[b, 5.5e-192]], $MachinePrecision]], N[(x / 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], N[(b * N[(N[(x / N[(y * b), $MachinePrecision]), $MachinePrecision] - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.2 \cdot 10^{+114}:\\
\;\;\;\;\frac{x \cdot \left(1 + b \cdot \left(-1 + b \cdot 0.5\right)\right)}{y}\\
\mathbf{elif}\;b \leq -2 \cdot 10^{+49} \lor \neg \left(b \leq 5.5 \cdot 10^{-192}\right):\\
\;\;\;\;\frac{x}{y \cdot \left(1 + b \cdot \left(1 + b \cdot \left(0.5 + b \cdot 0.16666666666666666\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(\frac{x}{y \cdot b} - \frac{x}{y}\right)\\
\end{array}
\end{array}
if b < -8.2000000000000001e114Initial program 100.0%
*-commutative100.0%
associate-/l*83.3%
associate--l+83.3%
fma-define83.3%
sub-neg83.3%
metadata-eval83.3%
Simplified83.3%
Taylor expanded in b around inf 72.3%
neg-mul-172.3%
Simplified72.3%
Taylor expanded in b around 0 62.0%
Taylor expanded in x around 0 75.7%
if -8.2000000000000001e114 < b < -1.99999999999999989e49 or 5.49999999999999995e-192 < b Initial program 99.1%
*-commutative99.1%
associate-/l*88.8%
associate--l+88.8%
fma-define88.8%
sub-neg88.8%
metadata-eval88.8%
Simplified88.8%
Taylor expanded in b around inf 50.6%
neg-mul-150.6%
Simplified50.6%
exp-neg50.6%
frac-times56.8%
*-un-lft-identity56.8%
Applied egg-rr56.8%
Taylor expanded in b around 0 47.9%
*-commutative47.9%
Simplified47.9%
if -1.99999999999999989e49 < b < 5.49999999999999995e-192Initial program 95.8%
*-commutative95.8%
associate-/l*88.9%
associate--l+88.9%
fma-define88.9%
sub-neg88.9%
metadata-eval88.9%
Simplified88.9%
Taylor expanded in b around inf 18.4%
neg-mul-118.4%
Simplified18.4%
Taylor expanded in b around 0 15.4%
Taylor expanded in b around inf 23.3%
neg-mul-123.3%
+-commutative23.3%
unsub-neg23.3%
*-commutative23.3%
Simplified23.3%
Final simplification43.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -1e-109)
(/ (* x (+ 1.0 (* b (+ -1.0 (* b 0.5))))) y)
(if (<= b 1.95e-193)
(* b (- (/ x (* y b)) (/ x y)))
(/ x (* 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 <= -1e-109) {
tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y;
} else if (b <= 1.95e-193) {
tmp = b * ((x / (y * b)) - (x / y));
} else {
tmp = x / (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 <= (-1d-109)) then
tmp = (x * (1.0d0 + (b * ((-1.0d0) + (b * 0.5d0))))) / y
else if (b <= 1.95d-193) then
tmp = b * ((x / (y * b)) - (x / y))
else
tmp = x / (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 <= -1e-109) {
tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y;
} else if (b <= 1.95e-193) {
tmp = b * ((x / (y * b)) - (x / y));
} else {
tmp = x / (y * (1.0 + (b * (1.0 + (b * 0.5)))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1e-109: tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y elif b <= 1.95e-193: tmp = b * ((x / (y * b)) - (x / y)) else: tmp = x / (y * (1.0 + (b * (1.0 + (b * 0.5))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1e-109) tmp = Float64(Float64(x * Float64(1.0 + Float64(b * Float64(-1.0 + Float64(b * 0.5))))) / y); elseif (b <= 1.95e-193) tmp = Float64(b * Float64(Float64(x / Float64(y * b)) - Float64(x / y))); else tmp = Float64(x / 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 <= -1e-109) tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y; elseif (b <= 1.95e-193) tmp = b * ((x / (y * b)) - (x / y)); else tmp = x / (y * (1.0 + (b * (1.0 + (b * 0.5))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1e-109], 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, 1.95e-193], N[(b * N[(N[(x / N[(y * b), $MachinePrecision]), $MachinePrecision] - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(1.0 + N[(b * N[(1.0 + N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1 \cdot 10^{-109}:\\
\;\;\;\;\frac{x \cdot \left(1 + b \cdot \left(-1 + b \cdot 0.5\right)\right)}{y}\\
\mathbf{elif}\;b \leq 1.95 \cdot 10^{-193}:\\
\;\;\;\;b \cdot \left(\frac{x}{y \cdot b} - \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(1 + b \cdot \left(1 + b \cdot 0.5\right)\right)}\\
\end{array}
\end{array}
if b < -9.9999999999999999e-110Initial program 98.6%
*-commutative98.6%
associate-/l*89.8%
associate--l+89.8%
fma-define89.8%
sub-neg89.8%
metadata-eval89.8%
Simplified89.8%
Taylor expanded in b around inf 54.1%
neg-mul-154.1%
Simplified54.1%
Taylor expanded in b around 0 39.1%
Taylor expanded in x around 0 45.2%
if -9.9999999999999999e-110 < b < 1.9499999999999999e-193Initial program 95.4%
*-commutative95.4%
associate-/l*85.0%
associate--l+85.0%
fma-define85.0%
sub-neg85.0%
metadata-eval85.0%
Simplified85.0%
Taylor expanded in b around inf 10.4%
neg-mul-110.4%
Simplified10.4%
Taylor expanded in b around 0 10.4%
Taylor expanded in b around inf 22.6%
neg-mul-122.6%
+-commutative22.6%
unsub-neg22.6%
*-commutative22.6%
Simplified22.6%
if 1.9499999999999999e-193 < b Initial program 98.9%
*-commutative98.9%
associate-/l*88.4%
associate--l+88.4%
fma-define88.4%
sub-neg88.4%
metadata-eval88.4%
Simplified88.4%
Taylor expanded in b around inf 50.1%
neg-mul-150.1%
Simplified50.1%
exp-neg50.1%
frac-times57.1%
*-un-lft-identity57.1%
Applied egg-rr57.1%
Taylor expanded in b around 0 42.6%
*-commutative42.6%
Simplified42.6%
Final simplification38.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -1.4e-109)
(* (+ 1.0 (* b (+ -1.0 (* b 0.5)))) (/ x y))
(if (<= b 1.8e-193)
(* b (- (/ x (* y b)) (/ x y)))
(/ x (* 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.4e-109) {
tmp = (1.0 + (b * (-1.0 + (b * 0.5)))) * (x / y);
} else if (b <= 1.8e-193) {
tmp = b * ((x / (y * b)) - (x / y));
} else {
tmp = x / (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.4d-109)) then
tmp = (1.0d0 + (b * ((-1.0d0) + (b * 0.5d0)))) * (x / y)
else if (b <= 1.8d-193) then
tmp = b * ((x / (y * b)) - (x / y))
else
tmp = x / (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.4e-109) {
tmp = (1.0 + (b * (-1.0 + (b * 0.5)))) * (x / y);
} else if (b <= 1.8e-193) {
tmp = b * ((x / (y * b)) - (x / y));
} else {
tmp = x / (y * (1.0 + (b * (1.0 + (b * 0.5)))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.4e-109: tmp = (1.0 + (b * (-1.0 + (b * 0.5)))) * (x / y) elif b <= 1.8e-193: tmp = b * ((x / (y * b)) - (x / y)) else: tmp = x / (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.4e-109) tmp = Float64(Float64(1.0 + Float64(b * Float64(-1.0 + Float64(b * 0.5)))) * Float64(x / y)); elseif (b <= 1.8e-193) tmp = Float64(b * Float64(Float64(x / Float64(y * b)) - Float64(x / y))); else tmp = Float64(x / 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.4e-109) tmp = (1.0 + (b * (-1.0 + (b * 0.5)))) * (x / y); elseif (b <= 1.8e-193) tmp = b * ((x / (y * b)) - (x / y)); else tmp = x / (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.4e-109], N[(N[(1.0 + N[(b * N[(-1.0 + N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.8e-193], N[(b * N[(N[(x / N[(y * b), $MachinePrecision]), $MachinePrecision] - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(1.0 + N[(b * N[(1.0 + N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.4 \cdot 10^{-109}:\\
\;\;\;\;\left(1 + b \cdot \left(-1 + b \cdot 0.5\right)\right) \cdot \frac{x}{y}\\
\mathbf{elif}\;b \leq 1.8 \cdot 10^{-193}:\\
\;\;\;\;b \cdot \left(\frac{x}{y \cdot b} - \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(1 + b \cdot \left(1 + b \cdot 0.5\right)\right)}\\
\end{array}
\end{array}
if b < -1.39999999999999989e-109Initial program 98.6%
*-commutative98.6%
associate-/l*89.8%
associate--l+89.8%
fma-define89.8%
sub-neg89.8%
metadata-eval89.8%
Simplified89.8%
Taylor expanded in b around inf 54.1%
neg-mul-154.1%
Simplified54.1%
Taylor expanded in b around 0 39.1%
if -1.39999999999999989e-109 < b < 1.7999999999999999e-193Initial program 95.4%
*-commutative95.4%
associate-/l*85.0%
associate--l+85.0%
fma-define85.0%
sub-neg85.0%
metadata-eval85.0%
Simplified85.0%
Taylor expanded in b around inf 10.4%
neg-mul-110.4%
Simplified10.4%
Taylor expanded in b around 0 10.4%
Taylor expanded in b around inf 22.6%
neg-mul-122.6%
+-commutative22.6%
unsub-neg22.6%
*-commutative22.6%
Simplified22.6%
if 1.7999999999999999e-193 < b Initial program 98.9%
*-commutative98.9%
associate-/l*88.4%
associate--l+88.4%
fma-define88.4%
sub-neg88.4%
metadata-eval88.4%
Simplified88.4%
Taylor expanded in b around inf 50.1%
neg-mul-150.1%
Simplified50.1%
exp-neg50.1%
frac-times57.1%
*-un-lft-identity57.1%
Applied egg-rr57.1%
Taylor expanded in b around 0 42.6%
*-commutative42.6%
Simplified42.6%
Final simplification36.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.6e-109) (* (+ 1.0 (* b (+ -1.0 (* b 0.5)))) (/ x y)) (if (<= b 1.45e-193) (* b (- (/ x (* y b)) (/ x y))) (/ x (+ y (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.6e-109) {
tmp = (1.0 + (b * (-1.0 + (b * 0.5)))) * (x / y);
} else if (b <= 1.45e-193) {
tmp = b * ((x / (y * b)) - (x / y));
} else {
tmp = x / (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.6d-109)) then
tmp = (1.0d0 + (b * ((-1.0d0) + (b * 0.5d0)))) * (x / y)
else if (b <= 1.45d-193) then
tmp = b * ((x / (y * b)) - (x / y))
else
tmp = x / (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.6e-109) {
tmp = (1.0 + (b * (-1.0 + (b * 0.5)))) * (x / y);
} else if (b <= 1.45e-193) {
tmp = b * ((x / (y * b)) - (x / y));
} else {
tmp = x / (y + (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.6e-109: tmp = (1.0 + (b * (-1.0 + (b * 0.5)))) * (x / y) elif b <= 1.45e-193: tmp = b * ((x / (y * b)) - (x / y)) else: tmp = x / (y + (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.6e-109) tmp = Float64(Float64(1.0 + Float64(b * Float64(-1.0 + Float64(b * 0.5)))) * Float64(x / y)); elseif (b <= 1.45e-193) tmp = Float64(b * Float64(Float64(x / Float64(y * b)) - Float64(x / y))); else tmp = Float64(x / 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.6e-109) tmp = (1.0 + (b * (-1.0 + (b * 0.5)))) * (x / y); elseif (b <= 1.45e-193) tmp = b * ((x / (y * b)) - (x / y)); else tmp = x / (y + (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.6e-109], N[(N[(1.0 + N[(b * N[(-1.0 + N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.45e-193], N[(b * N[(N[(x / N[(y * b), $MachinePrecision]), $MachinePrecision] - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.6 \cdot 10^{-109}:\\
\;\;\;\;\left(1 + b \cdot \left(-1 + b \cdot 0.5\right)\right) \cdot \frac{x}{y}\\
\mathbf{elif}\;b \leq 1.45 \cdot 10^{-193}:\\
\;\;\;\;b \cdot \left(\frac{x}{y \cdot b} - \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y + y \cdot b}\\
\end{array}
\end{array}
if b < -1.6000000000000001e-109Initial program 98.6%
*-commutative98.6%
associate-/l*89.8%
associate--l+89.8%
fma-define89.8%
sub-neg89.8%
metadata-eval89.8%
Simplified89.8%
Taylor expanded in b around inf 54.1%
neg-mul-154.1%
Simplified54.1%
Taylor expanded in b around 0 39.1%
if -1.6000000000000001e-109 < b < 1.45000000000000003e-193Initial program 95.4%
*-commutative95.4%
associate-/l*85.0%
associate--l+85.0%
fma-define85.0%
sub-neg85.0%
metadata-eval85.0%
Simplified85.0%
Taylor expanded in b around inf 10.4%
neg-mul-110.4%
Simplified10.4%
Taylor expanded in b around 0 10.4%
Taylor expanded in b around inf 22.6%
neg-mul-122.6%
+-commutative22.6%
unsub-neg22.6%
*-commutative22.6%
Simplified22.6%
if 1.45000000000000003e-193 < b Initial program 98.9%
*-commutative98.9%
associate-/l*88.4%
associate--l+88.4%
fma-define88.4%
sub-neg88.4%
metadata-eval88.4%
Simplified88.4%
Taylor expanded in b around inf 50.1%
neg-mul-150.1%
Simplified50.1%
exp-neg50.1%
frac-times57.1%
*-un-lft-identity57.1%
Applied egg-rr57.1%
Taylor expanded in b around 0 28.0%
Final simplification30.3%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.2e-109) (* (/ x y) (+ 1.0 (* b (* b 0.5)))) (if (<= b 1.82e-193) (* b (- (/ x (* y b)) (/ x y))) (/ x (+ y (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.2e-109) {
tmp = (x / y) * (1.0 + (b * (b * 0.5)));
} else if (b <= 1.82e-193) {
tmp = b * ((x / (y * b)) - (x / y));
} else {
tmp = x / (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.2d-109)) then
tmp = (x / y) * (1.0d0 + (b * (b * 0.5d0)))
else if (b <= 1.82d-193) then
tmp = b * ((x / (y * b)) - (x / y))
else
tmp = x / (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.2e-109) {
tmp = (x / y) * (1.0 + (b * (b * 0.5)));
} else if (b <= 1.82e-193) {
tmp = b * ((x / (y * b)) - (x / y));
} else {
tmp = x / (y + (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.2e-109: tmp = (x / y) * (1.0 + (b * (b * 0.5))) elif b <= 1.82e-193: tmp = b * ((x / (y * b)) - (x / y)) else: tmp = x / (y + (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.2e-109) tmp = Float64(Float64(x / y) * Float64(1.0 + Float64(b * Float64(b * 0.5)))); elseif (b <= 1.82e-193) tmp = Float64(b * Float64(Float64(x / Float64(y * b)) - Float64(x / y))); else tmp = Float64(x / 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.2e-109) tmp = (x / y) * (1.0 + (b * (b * 0.5))); elseif (b <= 1.82e-193) tmp = b * ((x / (y * b)) - (x / y)); else tmp = x / (y + (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.2e-109], N[(N[(x / y), $MachinePrecision] * N[(1.0 + N[(b * N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.82e-193], N[(b * N[(N[(x / N[(y * b), $MachinePrecision]), $MachinePrecision] - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.2 \cdot 10^{-109}:\\
\;\;\;\;\frac{x}{y} \cdot \left(1 + b \cdot \left(b \cdot 0.5\right)\right)\\
\mathbf{elif}\;b \leq 1.82 \cdot 10^{-193}:\\
\;\;\;\;b \cdot \left(\frac{x}{y \cdot b} - \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y + y \cdot b}\\
\end{array}
\end{array}
if b < -1.19999999999999994e-109Initial program 98.6%
*-commutative98.6%
associate-/l*89.8%
associate--l+89.8%
fma-define89.8%
sub-neg89.8%
metadata-eval89.8%
Simplified89.8%
Taylor expanded in b around inf 54.1%
neg-mul-154.1%
Simplified54.1%
Taylor expanded in b around 0 39.1%
Taylor expanded in b around inf 39.1%
*-commutative39.1%
Simplified39.1%
if -1.19999999999999994e-109 < b < 1.8200000000000001e-193Initial program 95.4%
*-commutative95.4%
associate-/l*85.0%
associate--l+85.0%
fma-define85.0%
sub-neg85.0%
metadata-eval85.0%
Simplified85.0%
Taylor expanded in b around inf 10.4%
neg-mul-110.4%
Simplified10.4%
Taylor expanded in b around 0 10.4%
Taylor expanded in b around inf 22.6%
neg-mul-122.6%
+-commutative22.6%
unsub-neg22.6%
*-commutative22.6%
Simplified22.6%
if 1.8200000000000001e-193 < b Initial program 98.9%
*-commutative98.9%
associate-/l*88.4%
associate--l+88.4%
fma-define88.4%
sub-neg88.4%
metadata-eval88.4%
Simplified88.4%
Taylor expanded in b around inf 50.1%
neg-mul-150.1%
Simplified50.1%
exp-neg50.1%
frac-times57.1%
*-un-lft-identity57.1%
Applied egg-rr57.1%
Taylor expanded in b around 0 28.0%
Final simplification30.3%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1e-109) (* x (- (/ 1.0 y) (/ b y))) (if (<= b 6e-193) (* b (- (/ x (* y b)) (/ x y))) (/ x (+ y (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1e-109) {
tmp = x * ((1.0 / y) - (b / y));
} else if (b <= 6e-193) {
tmp = b * ((x / (y * b)) - (x / y));
} else {
tmp = x / (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 <= (-1d-109)) then
tmp = x * ((1.0d0 / y) - (b / y))
else if (b <= 6d-193) then
tmp = b * ((x / (y * b)) - (x / y))
else
tmp = x / (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 <= -1e-109) {
tmp = x * ((1.0 / y) - (b / y));
} else if (b <= 6e-193) {
tmp = b * ((x / (y * b)) - (x / y));
} else {
tmp = x / (y + (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1e-109: tmp = x * ((1.0 / y) - (b / y)) elif b <= 6e-193: tmp = b * ((x / (y * b)) - (x / y)) else: tmp = x / (y + (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1e-109) tmp = Float64(x * Float64(Float64(1.0 / y) - Float64(b / y))); elseif (b <= 6e-193) tmp = Float64(b * Float64(Float64(x / Float64(y * b)) - Float64(x / y))); else tmp = Float64(x / Float64(y + Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1e-109) tmp = x * ((1.0 / y) - (b / y)); elseif (b <= 6e-193) tmp = b * ((x / (y * b)) - (x / y)); else tmp = x / (y + (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1e-109], N[(x * N[(N[(1.0 / y), $MachinePrecision] - N[(b / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6e-193], N[(b * N[(N[(x / N[(y * b), $MachinePrecision]), $MachinePrecision] - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1 \cdot 10^{-109}:\\
\;\;\;\;x \cdot \left(\frac{1}{y} - \frac{b}{y}\right)\\
\mathbf{elif}\;b \leq 6 \cdot 10^{-193}:\\
\;\;\;\;b \cdot \left(\frac{x}{y \cdot b} - \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y + y \cdot b}\\
\end{array}
\end{array}
if b < -9.9999999999999999e-110Initial program 98.6%
*-commutative98.6%
associate-/l*89.8%
associate--l+89.8%
fma-define89.8%
sub-neg89.8%
metadata-eval89.8%
Simplified89.8%
Taylor expanded in b around inf 54.1%
neg-mul-154.1%
Simplified54.1%
Taylor expanded in b around 0 27.4%
Taylor expanded in x around -inf 32.0%
associate-*r*32.0%
neg-mul-132.0%
Simplified32.0%
if -9.9999999999999999e-110 < b < 5.9999999999999998e-193Initial program 95.4%
*-commutative95.4%
associate-/l*85.0%
associate--l+85.0%
fma-define85.0%
sub-neg85.0%
metadata-eval85.0%
Simplified85.0%
Taylor expanded in b around inf 10.4%
neg-mul-110.4%
Simplified10.4%
Taylor expanded in b around 0 10.4%
Taylor expanded in b around inf 22.6%
neg-mul-122.6%
+-commutative22.6%
unsub-neg22.6%
*-commutative22.6%
Simplified22.6%
if 5.9999999999999998e-193 < b Initial program 98.9%
*-commutative98.9%
associate-/l*88.4%
associate--l+88.4%
fma-define88.4%
sub-neg88.4%
metadata-eval88.4%
Simplified88.4%
Taylor expanded in b around inf 50.1%
neg-mul-150.1%
Simplified50.1%
exp-neg50.1%
frac-times57.1%
*-un-lft-identity57.1%
Applied egg-rr57.1%
Taylor expanded in b around 0 28.0%
Final simplification28.0%
(FPCore (x y z t a b) :precision binary64 (if (<= b 9.5e-202) (/ (* x b) (- y)) (/ x (+ y (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 9.5e-202) {
tmp = (x * b) / -y;
} else {
tmp = x / (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 <= 9.5d-202) then
tmp = (x * b) / -y
else
tmp = x / (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 <= 9.5e-202) {
tmp = (x * b) / -y;
} else {
tmp = x / (y + (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 9.5e-202: tmp = (x * b) / -y else: tmp = x / (y + (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 9.5e-202) tmp = Float64(Float64(x * b) / Float64(-y)); else tmp = Float64(x / Float64(y + Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 9.5e-202) tmp = (x * b) / -y; else tmp = x / (y + (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 9.5e-202], N[(N[(x * b), $MachinePrecision] / (-y)), $MachinePrecision], N[(x / N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 9.5 \cdot 10^{-202}:\\
\;\;\;\;\frac{x \cdot b}{-y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y + y \cdot b}\\
\end{array}
\end{array}
if b < 9.5000000000000001e-202Initial program 97.9%
*-commutative97.9%
associate-/l*87.7%
associate--l+87.7%
fma-define87.7%
sub-neg87.7%
metadata-eval87.7%
Simplified87.7%
Taylor expanded in b around inf 36.0%
neg-mul-136.0%
Simplified36.0%
Taylor expanded in b around 0 20.4%
Taylor expanded in b around inf 24.4%
mul-1-neg24.4%
*-commutative24.4%
distribute-neg-frac224.4%
Simplified24.4%
if 9.5000000000000001e-202 < b Initial program 98.1%
*-commutative98.1%
associate-/l*88.5%
associate--l+88.5%
fma-define88.5%
sub-neg88.5%
metadata-eval88.5%
Simplified88.5%
Taylor expanded in b around inf 49.3%
neg-mul-149.3%
Simplified49.3%
exp-neg49.3%
frac-times56.2%
*-un-lft-identity56.2%
Applied egg-rr56.2%
Taylor expanded in b around 0 27.6%
Final simplification25.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b 4.1e-201) (/ (* x b) (- y)) (/ 1.0 (/ y x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 4.1e-201) {
tmp = (x * b) / -y;
} else {
tmp = 1.0 / (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 (b <= 4.1d-201) then
tmp = (x * b) / -y
else
tmp = 1.0d0 / (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 (b <= 4.1e-201) {
tmp = (x * b) / -y;
} else {
tmp = 1.0 / (y / x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 4.1e-201: tmp = (x * b) / -y else: tmp = 1.0 / (y / x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 4.1e-201) tmp = Float64(Float64(x * b) / Float64(-y)); else tmp = Float64(1.0 / Float64(y / x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 4.1e-201) tmp = (x * b) / -y; else tmp = 1.0 / (y / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 4.1e-201], N[(N[(x * b), $MachinePrecision] / (-y)), $MachinePrecision], N[(1.0 / N[(y / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 4.1 \cdot 10^{-201}:\\
\;\;\;\;\frac{x \cdot b}{-y}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{y}{x}}\\
\end{array}
\end{array}
if b < 4.10000000000000001e-201Initial program 97.9%
*-commutative97.9%
associate-/l*87.7%
associate--l+87.7%
fma-define87.7%
sub-neg87.7%
metadata-eval87.7%
Simplified87.7%
Taylor expanded in b around inf 36.0%
neg-mul-136.0%
Simplified36.0%
Taylor expanded in b around 0 20.4%
Taylor expanded in b around inf 24.4%
mul-1-neg24.4%
*-commutative24.4%
distribute-neg-frac224.4%
Simplified24.4%
if 4.10000000000000001e-201 < b Initial program 98.1%
*-commutative98.1%
associate-/l*88.5%
associate--l+88.5%
fma-define88.5%
sub-neg88.5%
metadata-eval88.5%
Simplified88.5%
Taylor expanded in b around inf 49.3%
neg-mul-149.3%
Simplified49.3%
Taylor expanded in b around 0 17.2%
clear-num17.6%
inv-pow17.6%
Applied egg-rr17.6%
unpow-117.6%
Simplified17.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b 3.2e-198) (* b (/ (- x) y)) (/ 1.0 (/ y x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 3.2e-198) {
tmp = b * (-x / y);
} else {
tmp = 1.0 / (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 (b <= 3.2d-198) then
tmp = b * (-x / y)
else
tmp = 1.0d0 / (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 (b <= 3.2e-198) {
tmp = b * (-x / y);
} else {
tmp = 1.0 / (y / x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 3.2e-198: tmp = b * (-x / y) else: tmp = 1.0 / (y / x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 3.2e-198) tmp = Float64(b * Float64(Float64(-x) / y)); else tmp = Float64(1.0 / Float64(y / x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 3.2e-198) tmp = b * (-x / y); else tmp = 1.0 / (y / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 3.2e-198], N[(b * N[((-x) / y), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(y / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 3.2 \cdot 10^{-198}:\\
\;\;\;\;b \cdot \frac{-x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{y}{x}}\\
\end{array}
\end{array}
if b < 3.19999999999999994e-198Initial program 97.9%
*-commutative97.9%
associate-/l*87.7%
associate--l+87.7%
fma-define87.7%
sub-neg87.7%
metadata-eval87.7%
Simplified87.7%
Taylor expanded in b around inf 36.0%
neg-mul-136.0%
Simplified36.0%
Taylor expanded in b around 0 20.4%
Taylor expanded in b around inf 24.4%
mul-1-neg24.4%
associate-*r/23.8%
distribute-rgt-neg-in23.8%
distribute-neg-frac223.8%
Simplified23.8%
if 3.19999999999999994e-198 < b Initial program 98.1%
*-commutative98.1%
associate-/l*88.5%
associate--l+88.5%
fma-define88.5%
sub-neg88.5%
metadata-eval88.5%
Simplified88.5%
Taylor expanded in b around inf 49.3%
neg-mul-149.3%
Simplified49.3%
Taylor expanded in b around 0 17.2%
clear-num17.6%
inv-pow17.6%
Applied egg-rr17.6%
unpow-117.6%
Simplified17.6%
Final simplification20.9%
(FPCore (x y z t a b) :precision binary64 (* x (/ 1.0 y)))
double code(double x, double y, double z, double t, double a, double b) {
return x * (1.0 / 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 * (1.0d0 / y)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x * (1.0 / y);
}
def code(x, y, z, t, a, b): return x * (1.0 / y)
function code(x, y, z, t, a, b) return Float64(x * Float64(1.0 / y)) end
function tmp = code(x, y, z, t, a, b) tmp = x * (1.0 / y); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \frac{1}{y}
\end{array}
Initial program 98.0%
*-commutative98.0%
associate-/l*88.0%
associate--l+88.0%
fma-define88.0%
sub-neg88.0%
metadata-eval88.0%
Simplified88.0%
Taylor expanded in b around inf 42.1%
neg-mul-142.1%
Simplified42.1%
Taylor expanded in b around 0 17.0%
div-inv17.3%
Applied egg-rr17.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.0%
*-commutative98.0%
associate-/l*88.0%
associate--l+88.0%
fma-define88.0%
sub-neg88.0%
metadata-eval88.0%
Simplified88.0%
Taylor expanded in b around inf 42.1%
neg-mul-142.1%
Simplified42.1%
Taylor expanded in b around 0 17.0%
(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 2024163
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2, A"
:precision binary64
:alt
(! :herbie-platform default (if (< t -8845848504127471/10000000000000000) (/ (* x (/ (pow a (- t 1)) y)) (- (+ b 1) (* y (log z)))) (if (< t 8520312288374073/10000000000) (/ (* (/ x y) (pow a (- t 1))) (exp (- b (* (log z) y)))) (/ (* x (/ (pow a (- t 1)) y)) (- (+ b 1) (* y (log z)))))))
(/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))