
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (log a) (+ t -1.0))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + (log(a) * (t + -1.0))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + (log(a) * (t + (-1.0d0)))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + (Math.log(a) * (t + -1.0))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + (math.log(a) * (t + -1.0))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(log(a) * Float64(t + -1.0))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + (log(a) * (t + -1.0))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[Log[a], $MachinePrecision] * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \log a \cdot \left(t + -1\right)\right) - b}}{y}
\end{array}
Initial program 98.7%
Final simplification98.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -445000.0) (not (<= t 2400000.0))) (/ (* x (exp (- (* (log a) (+ t -1.0)) b))) y) (* x (/ (exp (- (- (* y (log z)) (log a)) b)) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -445000.0) || !(t <= 2400000.0)) {
tmp = (x * exp(((log(a) * (t + -1.0)) - b))) / y;
} else {
tmp = x * (exp((((y * log(z)) - log(a)) - b)) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-445000.0d0)) .or. (.not. (t <= 2400000.0d0))) then
tmp = (x * exp(((log(a) * (t + (-1.0d0))) - b))) / y
else
tmp = x * (exp((((y * log(z)) - log(a)) - b)) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -445000.0) || !(t <= 2400000.0)) {
tmp = (x * Math.exp(((Math.log(a) * (t + -1.0)) - b))) / y;
} else {
tmp = x * (Math.exp((((y * Math.log(z)) - Math.log(a)) - b)) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -445000.0) or not (t <= 2400000.0): tmp = (x * math.exp(((math.log(a) * (t + -1.0)) - b))) / y else: tmp = x * (math.exp((((y * math.log(z)) - math.log(a)) - b)) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -445000.0) || !(t <= 2400000.0)) tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * Float64(t + -1.0)) - b))) / y); else tmp = Float64(x * Float64(exp(Float64(Float64(Float64(y * log(z)) - log(a)) - b)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -445000.0) || ~((t <= 2400000.0))) tmp = (x * exp(((log(a) * (t + -1.0)) - b))) / y; else tmp = x * (exp((((y * log(z)) - log(a)) - b)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -445000.0], N[Not[LessEqual[t, 2400000.0]], $MachinePrecision]], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * N[(t + -1.0), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x * N[(N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] - N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -445000 \lor \neg \left(t \leq 2400000\right):\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot \left(t + -1\right) - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{e^{\left(y \cdot \log z - \log a\right) - b}}{y}\\
\end{array}
\end{array}
if t < -445000 or 2.4e6 < t Initial program 100.0%
*-commutative100.0%
associate-/l*87.6%
associate--l+87.6%
fma-define87.6%
sub-neg87.6%
metadata-eval87.6%
Simplified87.6%
Taylor expanded in y around 0 93.1%
if -445000 < t < 2.4e6Initial program 97.3%
*-commutative97.3%
associate-/l*86.4%
associate--l+86.4%
fma-define86.4%
sub-neg86.4%
metadata-eval86.4%
Simplified86.4%
Taylor expanded in t around 0 97.2%
associate-/l*97.9%
+-commutative97.9%
mul-1-neg97.9%
unsub-neg97.9%
Simplified97.9%
Final simplification95.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.1e-5) (not (<= y 2.85e-6))) (* x (/ (/ (pow z y) a) y)) (/ (* x (exp (- (* (log a) (+ t -1.0)) b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.1e-5) || !(y <= 2.85e-6)) {
tmp = x * ((pow(z, y) / a) / y);
} else {
tmp = (x * exp(((log(a) * (t + -1.0)) - b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-3.1d-5)) .or. (.not. (y <= 2.85d-6))) then
tmp = x * (((z ** y) / a) / y)
else
tmp = (x * exp(((log(a) * (t + (-1.0d0))) - b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.1e-5) || !(y <= 2.85e-6)) {
tmp = x * ((Math.pow(z, y) / a) / y);
} else {
tmp = (x * Math.exp(((Math.log(a) * (t + -1.0)) - b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.1e-5) or not (y <= 2.85e-6): tmp = x * ((math.pow(z, y) / a) / y) else: tmp = (x * math.exp(((math.log(a) * (t + -1.0)) - b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.1e-5) || !(y <= 2.85e-6)) tmp = Float64(x * Float64(Float64((z ^ y) / a) / y)); else tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * Float64(t + -1.0)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3.1e-5) || ~((y <= 2.85e-6))) tmp = x * (((z ^ y) / a) / y); else tmp = (x * exp(((log(a) * (t + -1.0)) - b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.1e-5], N[Not[LessEqual[y, 2.85e-6]], $MachinePrecision]], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * N[(t + -1.0), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{-5} \lor \neg \left(y \leq 2.85 \cdot 10^{-6}\right):\\
\;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot \left(t + -1\right) - b}}{y}\\
\end{array}
\end{array}
if y < -3.10000000000000014e-5 or 2.8499999999999998e-6 < y Initial program 99.8%
*-commutative99.8%
associate-/l*85.3%
associate--l+85.3%
fma-define85.3%
sub-neg85.3%
metadata-eval85.3%
Simplified85.3%
Taylor expanded in t around 0 91.9%
associate-/l*91.9%
+-commutative91.9%
mul-1-neg91.9%
unsub-neg91.9%
Simplified91.9%
Taylor expanded in b around 0 86.1%
div-exp86.1%
*-commutative86.1%
exp-to-pow86.1%
rem-exp-log86.1%
Simplified86.1%
if -3.10000000000000014e-5 < y < 2.8499999999999998e-6Initial program 97.3%
*-commutative97.3%
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 97.3%
Final simplification91.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -4.5e+125)
(* x (/ (exp (- b)) y))
(if (<= b 2.65e+91)
(* x (* (/ (pow a t) a) (/ (pow z y) y)))
(/ x (* a (* y (exp b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -4.5e+125) {
tmp = x * (exp(-b) / y);
} else if (b <= 2.65e+91) {
tmp = x * ((pow(a, t) / a) * (pow(z, y) / 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 (b <= (-4.5d+125)) then
tmp = x * (exp(-b) / y)
else if (b <= 2.65d+91) then
tmp = x * (((a ** t) / a) * ((z ** y) / 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 (b <= -4.5e+125) {
tmp = x * (Math.exp(-b) / y);
} else if (b <= 2.65e+91) {
tmp = x * ((Math.pow(a, t) / a) * (Math.pow(z, y) / y));
} else {
tmp = x / (a * (y * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -4.5e+125: tmp = x * (math.exp(-b) / y) elif b <= 2.65e+91: tmp = x * ((math.pow(a, t) / a) * (math.pow(z, y) / y)) else: tmp = x / (a * (y * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -4.5e+125) tmp = Float64(x * Float64(exp(Float64(-b)) / y)); elseif (b <= 2.65e+91) tmp = Float64(x * Float64(Float64((a ^ t) / a) * Float64((z ^ y) / 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 (b <= -4.5e+125) tmp = x * (exp(-b) / y); elseif (b <= 2.65e+91) tmp = x * (((a ^ t) / a) * ((z ^ y) / y)); else tmp = x / (a * (y * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -4.5e+125], N[(x * N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.65e+91], N[(x * N[(N[(N[Power[a, t], $MachinePrecision] / a), $MachinePrecision] * N[(N[Power[z, y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.5 \cdot 10^{+125}:\\
\;\;\;\;x \cdot \frac{e^{-b}}{y}\\
\mathbf{elif}\;b \leq 2.65 \cdot 10^{+91}:\\
\;\;\;\;x \cdot \left(\frac{{a}^{t}}{a} \cdot \frac{{z}^{y}}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
if b < -4.5e125Initial program 100.0%
*-commutative100.0%
associate-/l*78.9%
associate--l+78.9%
fma-define78.9%
sub-neg78.9%
metadata-eval78.9%
Simplified78.9%
Taylor expanded in b around inf 71.2%
neg-mul-171.2%
Simplified71.2%
Taylor expanded in b around inf 87.0%
associate-/l*87.0%
Simplified87.0%
if -4.5e125 < b < 2.64999999999999998e91Initial program 98.1%
associate-/l*98.6%
associate--l+98.6%
exp-sum83.9%
associate-/l*79.6%
*-commutative79.6%
exp-to-pow79.6%
exp-diff75.8%
*-commutative75.8%
exp-to-pow76.5%
sub-neg76.5%
metadata-eval76.5%
Simplified76.5%
Taylor expanded in b around 0 84.7%
associate-/l*84.7%
exp-to-pow85.4%
sub-neg85.4%
metadata-eval85.4%
Simplified85.4%
unpow-prod-up85.4%
unpow-185.4%
Applied egg-rr85.4%
associate-*r/85.4%
*-rgt-identity85.4%
Simplified85.4%
if 2.64999999999999998e91 < b Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum79.4%
associate-/l*79.4%
*-commutative79.4%
exp-to-pow79.4%
exp-diff70.6%
*-commutative70.6%
exp-to-pow70.6%
sub-neg70.6%
metadata-eval70.6%
Simplified70.6%
Taylor expanded in y around 0 88.3%
associate-/r*79.5%
exp-to-pow79.5%
sub-neg79.5%
metadata-eval79.5%
Simplified79.5%
Taylor expanded in t around 0 94.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.1e-5) (not (<= y 2.85e-6))) (* x (/ (/ (pow z y) a) y)) (* x (/ (/ (pow a (+ t -1.0)) y) (exp b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.1e-5) || !(y <= 2.85e-6)) {
tmp = x * ((pow(z, y) / a) / y);
} else {
tmp = x * ((pow(a, (t + -1.0)) / 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 ((y <= (-3.1d-5)) .or. (.not. (y <= 2.85d-6))) then
tmp = x * (((z ** y) / a) / y)
else
tmp = x * (((a ** (t + (-1.0d0))) / 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 ((y <= -3.1e-5) || !(y <= 2.85e-6)) {
tmp = x * ((Math.pow(z, y) / a) / y);
} else {
tmp = x * ((Math.pow(a, (t + -1.0)) / y) / Math.exp(b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.1e-5) or not (y <= 2.85e-6): tmp = x * ((math.pow(z, y) / a) / y) else: tmp = x * ((math.pow(a, (t + -1.0)) / y) / math.exp(b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.1e-5) || !(y <= 2.85e-6)) tmp = Float64(x * Float64(Float64((z ^ y) / a) / y)); else tmp = Float64(x * Float64(Float64((a ^ Float64(t + -1.0)) / y) / exp(b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3.1e-5) || ~((y <= 2.85e-6))) tmp = x * (((z ^ y) / a) / y); else tmp = x * (((a ^ (t + -1.0)) / y) / exp(b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.1e-5], N[Not[LessEqual[y, 2.85e-6]], $MachinePrecision]], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{-5} \lor \neg \left(y \leq 2.85 \cdot 10^{-6}\right):\\
\;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\frac{{a}^{\left(t + -1\right)}}{y}}{e^{b}}\\
\end{array}
\end{array}
if y < -3.10000000000000014e-5 or 2.8499999999999998e-6 < y Initial program 99.8%
*-commutative99.8%
associate-/l*85.3%
associate--l+85.3%
fma-define85.3%
sub-neg85.3%
metadata-eval85.3%
Simplified85.3%
Taylor expanded in t around 0 91.9%
associate-/l*91.9%
+-commutative91.9%
mul-1-neg91.9%
unsub-neg91.9%
Simplified91.9%
Taylor expanded in b around 0 86.1%
div-exp86.1%
*-commutative86.1%
exp-to-pow86.1%
rem-exp-log86.1%
Simplified86.1%
if -3.10000000000000014e-5 < y < 2.8499999999999998e-6Initial program 97.3%
associate-/l*98.0%
associate--l+98.0%
exp-sum98.0%
associate-/l*98.0%
*-commutative98.0%
exp-to-pow98.0%
exp-diff87.9%
*-commutative87.9%
exp-to-pow88.9%
sub-neg88.9%
metadata-eval88.9%
Simplified88.9%
Taylor expanded in y around 0 87.9%
associate-/r*84.5%
exp-to-pow85.5%
sub-neg85.5%
metadata-eval85.5%
Simplified85.5%
Final simplification85.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -400000.0) (not (<= t 1.2))) (* x (/ (pow a (+ t -1.0)) y)) (* x (/ (/ (pow z y) a) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -400000.0) || !(t <= 1.2)) {
tmp = x * (pow(a, (t + -1.0)) / y);
} else {
tmp = x * ((pow(z, y) / a) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-400000.0d0)) .or. (.not. (t <= 1.2d0))) then
tmp = x * ((a ** (t + (-1.0d0))) / y)
else
tmp = x * (((z ** y) / a) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -400000.0) || !(t <= 1.2)) {
tmp = x * (Math.pow(a, (t + -1.0)) / y);
} else {
tmp = x * ((Math.pow(z, y) / a) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -400000.0) or not (t <= 1.2): tmp = x * (math.pow(a, (t + -1.0)) / y) else: tmp = x * ((math.pow(z, y) / a) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -400000.0) || !(t <= 1.2)) tmp = Float64(x * Float64((a ^ Float64(t + -1.0)) / y)); else tmp = Float64(x * Float64(Float64((z ^ y) / a) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -400000.0) || ~((t <= 1.2))) tmp = x * ((a ^ (t + -1.0)) / y); else tmp = x * (((z ^ y) / a) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -400000.0], N[Not[LessEqual[t, 1.2]], $MachinePrecision]], N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -400000 \lor \neg \left(t \leq 1.2\right):\\
\;\;\;\;x \cdot \frac{{a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\
\end{array}
\end{array}
if t < -4e5 or 1.19999999999999996 < t Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum79.8%
associate-/l*79.8%
*-commutative79.8%
exp-to-pow79.8%
exp-diff65.9%
*-commutative65.9%
exp-to-pow65.9%
sub-neg65.9%
metadata-eval65.9%
Simplified65.9%
Taylor expanded in y around 0 77.6%
associate-/r*77.6%
exp-to-pow77.6%
sub-neg77.6%
metadata-eval77.6%
Simplified77.6%
Taylor expanded in b around 0 86.3%
exp-to-pow86.3%
sub-neg86.3%
metadata-eval86.3%
+-commutative86.3%
Simplified86.3%
if -4e5 < t < 1.19999999999999996Initial program 97.3%
*-commutative97.3%
associate-/l*86.4%
associate--l+86.4%
fma-define86.4%
sub-neg86.4%
metadata-eval86.4%
Simplified86.4%
Taylor expanded in t around 0 97.2%
associate-/l*97.9%
+-commutative97.9%
mul-1-neg97.9%
unsub-neg97.9%
Simplified97.9%
Taylor expanded in b around 0 78.9%
div-exp78.9%
*-commutative78.9%
exp-to-pow78.9%
rem-exp-log79.9%
Simplified79.9%
Final simplification83.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.8e-10) (not (<= y 2.85e-6))) (* x (/ (/ (pow z y) a) y)) (/ x (* a (* y (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.8e-10) || !(y <= 2.85e-6)) {
tmp = x * ((pow(z, y) / 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 ((y <= (-3.8d-10)) .or. (.not. (y <= 2.85d-6))) then
tmp = x * (((z ** y) / 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 ((y <= -3.8e-10) || !(y <= 2.85e-6)) {
tmp = x * ((Math.pow(z, y) / a) / y);
} else {
tmp = x / (a * (y * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.8e-10) or not (y <= 2.85e-6): tmp = x * ((math.pow(z, y) / a) / y) else: tmp = x / (a * (y * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.8e-10) || !(y <= 2.85e-6)) tmp = Float64(x * Float64(Float64((z ^ y) / 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 ((y <= -3.8e-10) || ~((y <= 2.85e-6))) tmp = x * (((z ^ y) / a) / y); else tmp = x / (a * (y * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.8e-10], N[Not[LessEqual[y, 2.85e-6]], $MachinePrecision]], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{-10} \lor \neg \left(y \leq 2.85 \cdot 10^{-6}\right):\\
\;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
if y < -3.7999999999999998e-10 or 2.8499999999999998e-6 < y Initial program 99.8%
*-commutative99.8%
associate-/l*85.4%
associate--l+85.4%
fma-define85.4%
sub-neg85.4%
metadata-eval85.4%
Simplified85.4%
Taylor expanded in t around 0 91.3%
associate-/l*91.3%
+-commutative91.3%
mul-1-neg91.3%
unsub-neg91.3%
Simplified91.3%
Taylor expanded in b around 0 85.5%
div-exp85.5%
*-commutative85.5%
exp-to-pow85.5%
rem-exp-log85.5%
Simplified85.5%
if -3.7999999999999998e-10 < y < 2.8499999999999998e-6Initial program 97.3%
associate-/l*98.0%
associate--l+98.0%
exp-sum98.0%
associate-/l*98.0%
*-commutative98.0%
exp-to-pow98.0%
exp-diff87.7%
*-commutative87.7%
exp-to-pow88.8%
sub-neg88.8%
metadata-eval88.8%
Simplified88.8%
Taylor expanded in y around 0 87.7%
associate-/r*84.3%
exp-to-pow85.4%
sub-neg85.4%
metadata-eval85.4%
Simplified85.4%
Taylor expanded in t around 0 71.0%
Final simplification78.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -7.2e-20) (not (<= b 1250000.0))) (* x (/ (exp (- b)) y)) (* x (/ 1.0 (* y a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -7.2e-20) || !(b <= 1250000.0)) {
tmp = x * (exp(-b) / y);
} else {
tmp = x * (1.0 / (y * a));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-7.2d-20)) .or. (.not. (b <= 1250000.0d0))) then
tmp = x * (exp(-b) / y)
else
tmp = x * (1.0d0 / (y * a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -7.2e-20) || !(b <= 1250000.0)) {
tmp = x * (Math.exp(-b) / y);
} else {
tmp = x * (1.0 / (y * a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -7.2e-20) or not (b <= 1250000.0): tmp = x * (math.exp(-b) / y) else: tmp = x * (1.0 / (y * a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -7.2e-20) || !(b <= 1250000.0)) tmp = Float64(x * Float64(exp(Float64(-b)) / y)); else tmp = Float64(x * Float64(1.0 / Float64(y * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -7.2e-20) || ~((b <= 1250000.0))) tmp = x * (exp(-b) / y); else tmp = x * (1.0 / (y * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -7.2e-20], N[Not[LessEqual[b, 1250000.0]], $MachinePrecision]], N[(x * N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.2 \cdot 10^{-20} \lor \neg \left(b \leq 1250000\right):\\
\;\;\;\;x \cdot \frac{e^{-b}}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1}{y \cdot a}\\
\end{array}
\end{array}
if b < -7.19999999999999948e-20 or 1.25e6 < b Initial program 99.8%
*-commutative99.8%
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 68.7%
neg-mul-168.7%
Simplified68.7%
Taylor expanded in b around inf 77.7%
associate-/l*77.7%
Simplified77.7%
if -7.19999999999999948e-20 < b < 1.25e6Initial program 97.6%
associate-/l*98.2%
associate--l+98.2%
exp-sum87.8%
associate-/l*81.8%
*-commutative81.8%
exp-to-pow81.8%
exp-diff81.8%
*-commutative81.8%
exp-to-pow82.7%
sub-neg82.7%
metadata-eval82.7%
Simplified82.7%
Taylor expanded in y around 0 73.3%
associate-/r*73.3%
exp-to-pow74.1%
sub-neg74.1%
metadata-eval74.1%
Simplified74.1%
Taylor expanded in t around 0 35.9%
Taylor expanded in b around 0 35.9%
div-inv36.6%
Applied egg-rr36.6%
Final simplification56.2%
(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.7%
associate-/l*99.0%
associate--l+99.0%
exp-sum83.4%
associate-/l*80.2%
*-commutative80.2%
exp-to-pow80.2%
exp-diff72.8%
*-commutative72.8%
exp-to-pow73.4%
sub-neg73.4%
metadata-eval73.4%
Simplified73.4%
Taylor expanded in y around 0 70.6%
associate-/r*67.1%
exp-to-pow67.6%
sub-neg67.6%
metadata-eval67.6%
Simplified67.6%
Taylor expanded in t around 0 55.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -2.7e+118)
(+
(/ x y)
(*
b
(-
(* b (+ (* -0.16666666666666666 (/ (* x b) y)) (* (/ x y) 0.5)))
(/ x y))))
(/
x
(*
a
(+ y (* b (+ y (* b (+ (* 0.16666666666666666 (* y b)) (* y 0.5))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.7e+118) {
tmp = (x / y) + (b * ((b * ((-0.16666666666666666 * ((x * b) / y)) + ((x / y) * 0.5))) - (x / y)));
} else {
tmp = x / (a * (y + (b * (y + (b * ((0.16666666666666666 * (y * b)) + (y * 0.5)))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-2.7d+118)) then
tmp = (x / y) + (b * ((b * (((-0.16666666666666666d0) * ((x * b) / y)) + ((x / y) * 0.5d0))) - (x / y)))
else
tmp = x / (a * (y + (b * (y + (b * ((0.16666666666666666d0 * (y * b)) + (y * 0.5d0)))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.7e+118) {
tmp = (x / y) + (b * ((b * ((-0.16666666666666666 * ((x * b) / y)) + ((x / y) * 0.5))) - (x / y)));
} else {
tmp = x / (a * (y + (b * (y + (b * ((0.16666666666666666 * (y * b)) + (y * 0.5)))))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -2.7e+118: tmp = (x / y) + (b * ((b * ((-0.16666666666666666 * ((x * b) / y)) + ((x / y) * 0.5))) - (x / y))) else: tmp = x / (a * (y + (b * (y + (b * ((0.16666666666666666 * (y * b)) + (y * 0.5))))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.7e+118) tmp = Float64(Float64(x / y) + Float64(b * Float64(Float64(b * Float64(Float64(-0.16666666666666666 * Float64(Float64(x * b) / y)) + Float64(Float64(x / y) * 0.5))) - Float64(x / y)))); else tmp = Float64(x / Float64(a * Float64(y + Float64(b * Float64(y + Float64(b * Float64(Float64(0.16666666666666666 * Float64(y * b)) + Float64(y * 0.5)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -2.7e+118) tmp = (x / y) + (b * ((b * ((-0.16666666666666666 * ((x * b) / y)) + ((x / y) * 0.5))) - (x / y))); else tmp = x / (a * (y + (b * (y + (b * ((0.16666666666666666 * (y * b)) + (y * 0.5))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.7e+118], N[(N[(x / y), $MachinePrecision] + N[(b * N[(N[(b * N[(N[(-0.16666666666666666 * N[(N[(x * b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(N[(x / y), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y + N[(b * N[(y + N[(b * N[(N[(0.16666666666666666 * N[(y * b), $MachinePrecision]), $MachinePrecision] + N[(y * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.7 \cdot 10^{+118}:\\
\;\;\;\;\frac{x}{y} + b \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \frac{x \cdot b}{y} + \frac{x}{y} \cdot 0.5\right) - \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + b \cdot \left(y + b \cdot \left(0.16666666666666666 \cdot \left(y \cdot b\right) + y \cdot 0.5\right)\right)\right)}\\
\end{array}
\end{array}
if b < -2.7e118Initial program 100.0%
*-commutative100.0%
associate-/l*79.5%
associate--l+79.5%
fma-define79.5%
sub-neg79.5%
metadata-eval79.5%
Simplified79.5%
Taylor expanded in b around inf 72.0%
neg-mul-172.0%
Simplified72.0%
Taylor expanded in b around 0 68.0%
if -2.7e118 < b Initial program 98.4%
associate-/l*98.8%
associate--l+98.8%
exp-sum83.1%
associate-/l*79.5%
*-commutative79.5%
exp-to-pow79.5%
exp-diff74.9%
*-commutative74.9%
exp-to-pow75.5%
sub-neg75.5%
metadata-eval75.5%
Simplified75.5%
Taylor expanded in y around 0 71.3%
associate-/r*69.0%
exp-to-pow69.5%
sub-neg69.5%
metadata-eval69.5%
Simplified69.5%
Taylor expanded in t around 0 50.1%
Taylor expanded in b around 0 42.6%
Final simplification46.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -1.95e+118)
(* x (+ (/ 1.0 y) (* b (+ (* 0.5 (/ b y)) (/ -1.0 y)))))
(/
x
(*
a
(+ y (* b (+ y (* b (+ (* 0.16666666666666666 (* y b)) (* y 0.5))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.95e+118) {
tmp = x * ((1.0 / y) + (b * ((0.5 * (b / y)) + (-1.0 / y))));
} else {
tmp = x / (a * (y + (b * (y + (b * ((0.16666666666666666 * (y * b)) + (y * 0.5)))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-1.95d+118)) then
tmp = x * ((1.0d0 / y) + (b * ((0.5d0 * (b / y)) + ((-1.0d0) / y))))
else
tmp = x / (a * (y + (b * (y + (b * ((0.16666666666666666d0 * (y * b)) + (y * 0.5d0)))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.95e+118) {
tmp = x * ((1.0 / y) + (b * ((0.5 * (b / y)) + (-1.0 / y))));
} else {
tmp = x / (a * (y + (b * (y + (b * ((0.16666666666666666 * (y * b)) + (y * 0.5)))))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.95e+118: tmp = x * ((1.0 / y) + (b * ((0.5 * (b / y)) + (-1.0 / y)))) else: tmp = x / (a * (y + (b * (y + (b * ((0.16666666666666666 * (y * b)) + (y * 0.5))))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.95e+118) tmp = Float64(x * Float64(Float64(1.0 / y) + Float64(b * Float64(Float64(0.5 * Float64(b / y)) + Float64(-1.0 / y))))); else tmp = Float64(x / Float64(a * Float64(y + Float64(b * Float64(y + Float64(b * Float64(Float64(0.16666666666666666 * Float64(y * b)) + Float64(y * 0.5)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.95e+118) tmp = x * ((1.0 / y) + (b * ((0.5 * (b / y)) + (-1.0 / y)))); else tmp = x / (a * (y + (b * (y + (b * ((0.16666666666666666 * (y * b)) + (y * 0.5))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.95e+118], N[(x * N[(N[(1.0 / y), $MachinePrecision] + N[(b * N[(N[(0.5 * N[(b / y), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y + N[(b * N[(y + N[(b * N[(N[(0.16666666666666666 * N[(y * b), $MachinePrecision]), $MachinePrecision] + N[(y * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.95 \cdot 10^{+118}:\\
\;\;\;\;x \cdot \left(\frac{1}{y} + b \cdot \left(0.5 \cdot \frac{b}{y} + \frac{-1}{y}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + b \cdot \left(y + b \cdot \left(0.16666666666666666 \cdot \left(y \cdot b\right) + y \cdot 0.5\right)\right)\right)}\\
\end{array}
\end{array}
if b < -1.95e118Initial program 100.0%
*-commutative100.0%
associate-/l*79.5%
associate--l+79.5%
fma-define79.5%
sub-neg79.5%
metadata-eval79.5%
Simplified79.5%
Taylor expanded in b around inf 72.0%
neg-mul-172.0%
Simplified72.0%
Taylor expanded in b around 0 55.7%
Taylor expanded in x around 0 65.2%
if -1.95e118 < b Initial program 98.4%
associate-/l*98.8%
associate--l+98.8%
exp-sum83.1%
associate-/l*79.5%
*-commutative79.5%
exp-to-pow79.5%
exp-diff74.9%
*-commutative74.9%
exp-to-pow75.5%
sub-neg75.5%
metadata-eval75.5%
Simplified75.5%
Taylor expanded in y around 0 71.3%
associate-/r*69.0%
exp-to-pow69.5%
sub-neg69.5%
metadata-eval69.5%
Simplified69.5%
Taylor expanded in t around 0 50.1%
Taylor expanded in b around 0 42.6%
Final simplification46.0%
(FPCore (x y z t a b) :precision binary64 (if (<= b -6.8e+118) (* x (+ (/ 1.0 y) (* b (+ (* 0.5 (/ b y)) (/ -1.0 y))))) (/ x (* a (+ y (* b (+ y (* y (* b 0.5)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -6.8e+118) {
tmp = x * ((1.0 / y) + (b * ((0.5 * (b / y)) + (-1.0 / y))));
} else {
tmp = x / (a * (y + (b * (y + (y * (b * 0.5))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-6.8d+118)) then
tmp = x * ((1.0d0 / y) + (b * ((0.5d0 * (b / y)) + ((-1.0d0) / y))))
else
tmp = x / (a * (y + (b * (y + (y * (b * 0.5d0))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -6.8e+118) {
tmp = x * ((1.0 / y) + (b * ((0.5 * (b / y)) + (-1.0 / y))));
} else {
tmp = x / (a * (y + (b * (y + (y * (b * 0.5))))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -6.8e+118: tmp = x * ((1.0 / y) + (b * ((0.5 * (b / y)) + (-1.0 / y)))) else: tmp = x / (a * (y + (b * (y + (y * (b * 0.5)))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -6.8e+118) tmp = Float64(x * Float64(Float64(1.0 / y) + Float64(b * Float64(Float64(0.5 * Float64(b / y)) + Float64(-1.0 / y))))); else tmp = Float64(x / Float64(a * Float64(y + Float64(b * Float64(y + Float64(y * Float64(b * 0.5))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -6.8e+118) tmp = x * ((1.0 / y) + (b * ((0.5 * (b / y)) + (-1.0 / y)))); else tmp = x / (a * (y + (b * (y + (y * (b * 0.5)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -6.8e+118], N[(x * N[(N[(1.0 / y), $MachinePrecision] + N[(b * N[(N[(0.5 * N[(b / y), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y + N[(b * N[(y + N[(y * N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.8 \cdot 10^{+118}:\\
\;\;\;\;x \cdot \left(\frac{1}{y} + b \cdot \left(0.5 \cdot \frac{b}{y} + \frac{-1}{y}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + b \cdot \left(y + y \cdot \left(b \cdot 0.5\right)\right)\right)}\\
\end{array}
\end{array}
if b < -6.79999999999999973e118Initial program 100.0%
*-commutative100.0%
associate-/l*79.5%
associate--l+79.5%
fma-define79.5%
sub-neg79.5%
metadata-eval79.5%
Simplified79.5%
Taylor expanded in b around inf 72.0%
neg-mul-172.0%
Simplified72.0%
Taylor expanded in b around 0 55.7%
Taylor expanded in x around 0 65.2%
if -6.79999999999999973e118 < b Initial program 98.4%
associate-/l*98.8%
associate--l+98.8%
exp-sum83.1%
associate-/l*79.5%
*-commutative79.5%
exp-to-pow79.5%
exp-diff74.9%
*-commutative74.9%
exp-to-pow75.5%
sub-neg75.5%
metadata-eval75.5%
Simplified75.5%
Taylor expanded in y around 0 71.3%
associate-/r*69.0%
exp-to-pow69.5%
sub-neg69.5%
metadata-eval69.5%
Simplified69.5%
Taylor expanded in t around 0 50.1%
Taylor expanded in b around 0 39.0%
associate-*r*39.0%
Simplified39.0%
Final simplification43.0%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.95e+118) (+ (/ x y) (* b (* x (* b (/ 0.5 y))))) (/ x (* a (+ y (* b (+ y (* y (* b 0.5)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.95e+118) {
tmp = (x / y) + (b * (x * (b * (0.5 / y))));
} else {
tmp = x / (a * (y + (b * (y + (y * (b * 0.5))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-1.95d+118)) then
tmp = (x / y) + (b * (x * (b * (0.5d0 / y))))
else
tmp = x / (a * (y + (b * (y + (y * (b * 0.5d0))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.95e+118) {
tmp = (x / y) + (b * (x * (b * (0.5 / y))));
} else {
tmp = x / (a * (y + (b * (y + (y * (b * 0.5))))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.95e+118: tmp = (x / y) + (b * (x * (b * (0.5 / y)))) else: tmp = x / (a * (y + (b * (y + (y * (b * 0.5)))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.95e+118) tmp = Float64(Float64(x / y) + Float64(b * Float64(x * Float64(b * Float64(0.5 / y))))); else tmp = Float64(x / Float64(a * Float64(y + Float64(b * Float64(y + Float64(y * Float64(b * 0.5))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.95e+118) tmp = (x / y) + (b * (x * (b * (0.5 / y)))); else tmp = x / (a * (y + (b * (y + (y * (b * 0.5)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.95e+118], N[(N[(x / y), $MachinePrecision] + N[(b * N[(x * N[(b * N[(0.5 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y + N[(b * N[(y + N[(y * N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.95 \cdot 10^{+118}:\\
\;\;\;\;\frac{x}{y} + b \cdot \left(x \cdot \left(b \cdot \frac{0.5}{y}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + b \cdot \left(y + y \cdot \left(b \cdot 0.5\right)\right)\right)}\\
\end{array}
\end{array}
if b < -1.95e118Initial program 100.0%
*-commutative100.0%
associate-/l*79.5%
associate--l+79.5%
fma-define79.5%
sub-neg79.5%
metadata-eval79.5%
Simplified79.5%
Taylor expanded in b around inf 72.0%
neg-mul-172.0%
Simplified72.0%
Taylor expanded in b around 0 55.7%
Taylor expanded in b around inf 55.7%
associate-*r/55.5%
*-commutative55.5%
associate-*l*55.5%
associate-*l/55.5%
Simplified55.5%
Taylor expanded in b around 0 55.7%
associate-/l*55.5%
*-commutative55.5%
associate-*l*55.5%
associate-*r/55.5%
*-commutative55.5%
associate-/l*55.5%
associate-*l*60.4%
Simplified60.4%
if -1.95e118 < b Initial program 98.4%
associate-/l*98.8%
associate--l+98.8%
exp-sum83.1%
associate-/l*79.5%
*-commutative79.5%
exp-to-pow79.5%
exp-diff74.9%
*-commutative74.9%
exp-to-pow75.5%
sub-neg75.5%
metadata-eval75.5%
Simplified75.5%
Taylor expanded in y around 0 71.3%
associate-/r*69.0%
exp-to-pow69.5%
sub-neg69.5%
metadata-eval69.5%
Simplified69.5%
Taylor expanded in t around 0 50.1%
Taylor expanded in b around 0 39.0%
associate-*r*39.0%
Simplified39.0%
Final simplification42.3%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.95e+118) (+ (/ x y) (* b (* x (* b (/ 0.5 y))))) (/ x (* a (* y (+ 1.0 b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.95e+118) {
tmp = (x / y) + (b * (x * (b * (0.5 / y))));
} else {
tmp = x / (a * (y * (1.0 + 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.95d+118)) then
tmp = (x / y) + (b * (x * (b * (0.5d0 / y))))
else
tmp = x / (a * (y * (1.0d0 + 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.95e+118) {
tmp = (x / y) + (b * (x * (b * (0.5 / y))));
} else {
tmp = x / (a * (y * (1.0 + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.95e+118: tmp = (x / y) + (b * (x * (b * (0.5 / y)))) else: tmp = x / (a * (y * (1.0 + b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.95e+118) tmp = Float64(Float64(x / y) + Float64(b * Float64(x * Float64(b * Float64(0.5 / y))))); else tmp = Float64(x / Float64(a * Float64(y * Float64(1.0 + b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.95e+118) tmp = (x / y) + (b * (x * (b * (0.5 / y)))); else tmp = x / (a * (y * (1.0 + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.95e+118], N[(N[(x / y), $MachinePrecision] + N[(b * N[(x * N[(b * N[(0.5 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * N[(1.0 + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.95 \cdot 10^{+118}:\\
\;\;\;\;\frac{x}{y} + b \cdot \left(x \cdot \left(b \cdot \frac{0.5}{y}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(1 + b\right)\right)}\\
\end{array}
\end{array}
if b < -1.95e118Initial program 100.0%
*-commutative100.0%
associate-/l*79.5%
associate--l+79.5%
fma-define79.5%
sub-neg79.5%
metadata-eval79.5%
Simplified79.5%
Taylor expanded in b around inf 72.0%
neg-mul-172.0%
Simplified72.0%
Taylor expanded in b around 0 55.7%
Taylor expanded in b around inf 55.7%
associate-*r/55.5%
*-commutative55.5%
associate-*l*55.5%
associate-*l/55.5%
Simplified55.5%
Taylor expanded in b around 0 55.7%
associate-/l*55.5%
*-commutative55.5%
associate-*l*55.5%
associate-*r/55.5%
*-commutative55.5%
associate-/l*55.5%
associate-*l*60.4%
Simplified60.4%
if -1.95e118 < b Initial program 98.4%
associate-/l*98.8%
associate--l+98.8%
exp-sum83.1%
associate-/l*79.5%
*-commutative79.5%
exp-to-pow79.5%
exp-diff74.9%
*-commutative74.9%
exp-to-pow75.5%
sub-neg75.5%
metadata-eval75.5%
Simplified75.5%
Taylor expanded in y around 0 71.3%
associate-/r*69.0%
exp-to-pow69.5%
sub-neg69.5%
metadata-eval69.5%
Simplified69.5%
Taylor expanded in t around 0 50.1%
Taylor expanded in b around 0 31.7%
distribute-lft-out35.4%
distribute-rgt1-in35.4%
Simplified35.4%
Final simplification39.2%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.95e+118) (+ (/ x y) (* b (* (/ (* x b) y) 0.5))) (/ x (* a (* y (+ 1.0 b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.95e+118) {
tmp = (x / y) + (b * (((x * b) / y) * 0.5));
} else {
tmp = x / (a * (y * (1.0 + 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.95d+118)) then
tmp = (x / y) + (b * (((x * b) / y) * 0.5d0))
else
tmp = x / (a * (y * (1.0d0 + 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.95e+118) {
tmp = (x / y) + (b * (((x * b) / y) * 0.5));
} else {
tmp = x / (a * (y * (1.0 + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.95e+118: tmp = (x / y) + (b * (((x * b) / y) * 0.5)) else: tmp = x / (a * (y * (1.0 + b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.95e+118) tmp = Float64(Float64(x / y) + Float64(b * Float64(Float64(Float64(x * b) / y) * 0.5))); else tmp = Float64(x / Float64(a * Float64(y * Float64(1.0 + b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.95e+118) tmp = (x / y) + (b * (((x * b) / y) * 0.5)); else tmp = x / (a * (y * (1.0 + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.95e+118], N[(N[(x / y), $MachinePrecision] + N[(b * N[(N[(N[(x * b), $MachinePrecision] / y), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * N[(1.0 + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.95 \cdot 10^{+118}:\\
\;\;\;\;\frac{x}{y} + b \cdot \left(\frac{x \cdot b}{y} \cdot 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(1 + b\right)\right)}\\
\end{array}
\end{array}
if b < -1.95e118Initial program 100.0%
*-commutative100.0%
associate-/l*79.5%
associate--l+79.5%
fma-define79.5%
sub-neg79.5%
metadata-eval79.5%
Simplified79.5%
Taylor expanded in b around inf 72.0%
neg-mul-172.0%
Simplified72.0%
Taylor expanded in b around 0 55.7%
Taylor expanded in b around inf 55.7%
if -1.95e118 < b Initial program 98.4%
associate-/l*98.8%
associate--l+98.8%
exp-sum83.1%
associate-/l*79.5%
*-commutative79.5%
exp-to-pow79.5%
exp-diff74.9%
*-commutative74.9%
exp-to-pow75.5%
sub-neg75.5%
metadata-eval75.5%
Simplified75.5%
Taylor expanded in y around 0 71.3%
associate-/r*69.0%
exp-to-pow69.5%
sub-neg69.5%
metadata-eval69.5%
Simplified69.5%
Taylor expanded in t around 0 50.1%
Taylor expanded in b around 0 31.7%
distribute-lft-out35.4%
distribute-rgt1-in35.4%
Simplified35.4%
Final simplification38.5%
(FPCore (x y z t a b) :precision binary64 (if (<= b -2.7e+118) (- (/ x y) (* x (/ b y))) (/ x (* a (* y (+ 1.0 b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.7e+118) {
tmp = (x / y) - (x * (b / y));
} else {
tmp = x / (a * (y * (1.0 + 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.7d+118)) then
tmp = (x / y) - (x * (b / y))
else
tmp = x / (a * (y * (1.0d0 + 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.7e+118) {
tmp = (x / y) - (x * (b / y));
} else {
tmp = x / (a * (y * (1.0 + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -2.7e+118: tmp = (x / y) - (x * (b / y)) else: tmp = x / (a * (y * (1.0 + b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.7e+118) tmp = Float64(Float64(x / y) - Float64(x * Float64(b / y))); else tmp = Float64(x / Float64(a * Float64(y * Float64(1.0 + b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -2.7e+118) tmp = (x / y) - (x * (b / y)); else tmp = x / (a * (y * (1.0 + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.7e+118], N[(N[(x / y), $MachinePrecision] - N[(x * N[(b / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * N[(1.0 + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.7 \cdot 10^{+118}:\\
\;\;\;\;\frac{x}{y} - x \cdot \frac{b}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(1 + b\right)\right)}\\
\end{array}
\end{array}
if b < -2.7e118Initial program 100.0%
*-commutative100.0%
associate-/l*79.5%
associate--l+79.5%
fma-define79.5%
sub-neg79.5%
metadata-eval79.5%
Simplified79.5%
Taylor expanded in b around inf 72.0%
neg-mul-172.0%
Simplified72.0%
Taylor expanded in b around 0 55.7%
Taylor expanded in b around 0 31.1%
mul-1-neg31.1%
*-commutative31.1%
distribute-frac-neg231.1%
associate-/l*38.5%
Simplified38.5%
if -2.7e118 < b Initial program 98.4%
associate-/l*98.8%
associate--l+98.8%
exp-sum83.1%
associate-/l*79.5%
*-commutative79.5%
exp-to-pow79.5%
exp-diff74.9%
*-commutative74.9%
exp-to-pow75.5%
sub-neg75.5%
metadata-eval75.5%
Simplified75.5%
Taylor expanded in y around 0 71.3%
associate-/r*69.0%
exp-to-pow69.5%
sub-neg69.5%
metadata-eval69.5%
Simplified69.5%
Taylor expanded in t around 0 50.1%
Taylor expanded in b around 0 31.7%
distribute-lft-out35.4%
distribute-rgt1-in35.4%
Simplified35.4%
Final simplification35.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.22e+119) (* (/ x y) (- 1.0 b)) (/ x (* a (* y (+ 1.0 b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.22e+119) {
tmp = (x / y) * (1.0 - b);
} else {
tmp = x / (a * (y * (1.0 + 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.22d+119)) then
tmp = (x / y) * (1.0d0 - b)
else
tmp = x / (a * (y * (1.0d0 + 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.22e+119) {
tmp = (x / y) * (1.0 - b);
} else {
tmp = x / (a * (y * (1.0 + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.22e+119: tmp = (x / y) * (1.0 - b) else: tmp = x / (a * (y * (1.0 + b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.22e+119) tmp = Float64(Float64(x / y) * Float64(1.0 - b)); else tmp = Float64(x / Float64(a * Float64(y * Float64(1.0 + b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.22e+119) tmp = (x / y) * (1.0 - b); else tmp = x / (a * (y * (1.0 + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.22e+119], N[(N[(x / y), $MachinePrecision] * N[(1.0 - b), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * N[(1.0 + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.22 \cdot 10^{+119}:\\
\;\;\;\;\frac{x}{y} \cdot \left(1 - b\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(1 + b\right)\right)}\\
\end{array}
\end{array}
if b < -1.2200000000000001e119Initial program 100.0%
*-commutative100.0%
associate-/l*79.5%
associate--l+79.5%
fma-define79.5%
sub-neg79.5%
metadata-eval79.5%
Simplified79.5%
Taylor expanded in b around inf 72.0%
neg-mul-172.0%
Simplified72.0%
Taylor expanded in b around 0 55.7%
Taylor expanded in b around 0 31.1%
fma-define31.1%
associate-*r/26.4%
fma-define26.4%
neg-mul-126.4%
distribute-lft-neg-in26.4%
distribute-lft1-in26.4%
Simplified26.4%
if -1.2200000000000001e119 < b Initial program 98.4%
associate-/l*98.8%
associate--l+98.8%
exp-sum83.1%
associate-/l*79.5%
*-commutative79.5%
exp-to-pow79.5%
exp-diff74.9%
*-commutative74.9%
exp-to-pow75.5%
sub-neg75.5%
metadata-eval75.5%
Simplified75.5%
Taylor expanded in y around 0 71.3%
associate-/r*69.0%
exp-to-pow69.5%
sub-neg69.5%
metadata-eval69.5%
Simplified69.5%
Taylor expanded in t around 0 50.1%
Taylor expanded in b around 0 31.7%
distribute-lft-out35.4%
distribute-rgt1-in35.4%
Simplified35.4%
Final simplification34.0%
(FPCore (x y z t a b) :precision binary64 (if (<= x 5e+24) (/ (/ x y) a) (/ x (* y a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 5e+24) {
tmp = (x / y) / a;
} else {
tmp = x / (y * a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= 5d+24) then
tmp = (x / y) / a
else
tmp = x / (y * a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 5e+24) {
tmp = (x / y) / a;
} else {
tmp = x / (y * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= 5e+24: tmp = (x / y) / a else: tmp = x / (y * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= 5e+24) tmp = Float64(Float64(x / y) / a); else tmp = Float64(x / Float64(y * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= 5e+24) tmp = (x / y) / a; else tmp = x / (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, 5e+24], N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 5 \cdot 10^{+24}:\\
\;\;\;\;\frac{\frac{x}{y}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\end{array}
\end{array}
if x < 5.00000000000000045e24Initial program 98.4%
associate-/l*98.7%
associate--l+98.7%
exp-sum84.3%
associate-/l*80.9%
*-commutative80.9%
exp-to-pow80.9%
exp-diff75.6%
*-commutative75.6%
exp-to-pow76.3%
sub-neg76.3%
metadata-eval76.3%
Simplified76.3%
Taylor expanded in y around 0 70.8%
associate-/r*66.9%
exp-to-pow67.6%
sub-neg67.6%
metadata-eval67.6%
Simplified67.6%
Taylor expanded in t around 0 55.3%
Taylor expanded in b around 0 25.5%
associate-/l/27.7%
Simplified27.7%
if 5.00000000000000045e24 < x Initial program 99.9%
associate-/l*99.9%
associate--l+99.9%
exp-sum79.5%
associate-/l*77.5%
*-commutative77.5%
exp-to-pow77.5%
exp-diff61.2%
*-commutative61.2%
exp-to-pow61.2%
sub-neg61.2%
metadata-eval61.2%
Simplified61.2%
Taylor expanded in y around 0 69.6%
associate-/r*67.5%
exp-to-pow67.5%
sub-neg67.5%
metadata-eval67.5%
Simplified67.5%
Taylor expanded in t around 0 58.2%
Taylor expanded in b around 0 36.6%
Final simplification29.4%
(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.7%
associate-/l*99.0%
associate--l+99.0%
exp-sum83.4%
associate-/l*80.2%
*-commutative80.2%
exp-to-pow80.2%
exp-diff72.8%
*-commutative72.8%
exp-to-pow73.4%
sub-neg73.4%
metadata-eval73.4%
Simplified73.4%
Taylor expanded in y around 0 70.6%
associate-/r*67.1%
exp-to-pow67.6%
sub-neg67.6%
metadata-eval67.6%
Simplified67.6%
Taylor expanded in t around 0 55.8%
Taylor expanded in b around 0 27.6%
Final simplification27.6%
(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.7%
*-commutative98.7%
associate-/l*87.0%
associate--l+87.0%
fma-define87.0%
sub-neg87.0%
metadata-eval87.0%
Simplified87.0%
Taylor expanded in b around inf 40.2%
neg-mul-140.2%
Simplified40.2%
Taylor expanded in b around 0 14.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 2024102
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2, A"
:precision binary64
:alt
(if (< t -0.8845848504127471) (/ (* x (/ (pow a (- t 1.0)) y)) (- (+ b 1.0) (* y (log z)))) (if (< t 852031.2288374073) (/ (* (/ x y) (pow a (- t 1.0))) (exp (- b (* (log z) y)))) (/ (* x (/ (pow a (- t 1.0)) y)) (- (+ b 1.0) (* y (log z))))))
(/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))