
(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 29 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.2%
Final simplification98.2%
(FPCore (x y z t a b) :precision binary64 (if (<= t 1.05e+36) (* x (/ (exp (- (- (* y (log z)) (log a)) b)) 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 (t <= 1.05e+36) {
tmp = x * (exp((((y * log(z)) - log(a)) - b)) / 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 (t <= 1.05d+36) then
tmp = x * (exp((((y * log(z)) - log(a)) - b)) / 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 (t <= 1.05e+36) {
tmp = x * (Math.exp((((y * Math.log(z)) - Math.log(a)) - b)) / 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 t <= 1.05e+36: tmp = x * (math.exp((((y * math.log(z)) - math.log(a)) - b)) / 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 (t <= 1.05e+36) tmp = Float64(x * Float64(exp(Float64(Float64(Float64(y * log(z)) - log(a)) - b)) / 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 (t <= 1.05e+36) tmp = x * (exp((((y * log(z)) - log(a)) - b)) / 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[LessEqual[t, 1.05e+36], 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], 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}\;t \leq 1.05 \cdot 10^{+36}:\\
\;\;\;\;x \cdot \frac{e^{\left(y \cdot \log z - \log a\right) - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot \left(t + -1\right) - b}}{y}\\
\end{array}
\end{array}
if t < 1.05000000000000002e36Initial program 97.5%
*-commutative97.5%
associate-/l*88.1%
associate--l+88.1%
fma-define88.1%
sub-neg88.1%
metadata-eval88.1%
Simplified88.1%
Taylor expanded in t around 0 90.2%
associate-/l*90.1%
+-commutative90.1%
mul-1-neg90.1%
unsub-neg90.1%
Simplified90.1%
if 1.05000000000000002e36 < t Initial program 100.0%
*-commutative100.0%
associate-/l*91.3%
associate--l+91.3%
fma-define91.3%
sub-neg91.3%
metadata-eval91.3%
Simplified91.3%
Taylor expanded in y around 0 94.3%
Final simplification91.3%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= t -1.05e+264)
(and (not (<= t -3.6e+80))
(or (<= t -2.1e-59) (not (<= t 1.32e+38)))))
(/ (* x (pow a (+ t -1.0))) 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.05e+264) || (!(t <= -3.6e+80) && ((t <= -2.1e-59) || !(t <= 1.32e+38)))) {
tmp = (x * pow(a, (t + -1.0))) / 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.05d+264)) .or. (.not. (t <= (-3.6d+80))) .and. (t <= (-2.1d-59)) .or. (.not. (t <= 1.32d+38))) then
tmp = (x * (a ** (t + (-1.0d0)))) / 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.05e+264) || (!(t <= -3.6e+80) && ((t <= -2.1e-59) || !(t <= 1.32e+38)))) {
tmp = (x * Math.pow(a, (t + -1.0))) / 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.05e+264) or (not (t <= -3.6e+80) and ((t <= -2.1e-59) or not (t <= 1.32e+38))): tmp = (x * math.pow(a, (t + -1.0))) / 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 ((t <= -1.05e+264) || (!(t <= -3.6e+80) && ((t <= -2.1e-59) || !(t <= 1.32e+38)))) tmp = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y); else tmp = Float64(x * Float64(Float64((z ^ y) / a) / Float64(y * exp(b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.05e+264) || (~((t <= -3.6e+80)) && ((t <= -2.1e-59) || ~((t <= 1.32e+38))))) tmp = (x * (a ^ (t + -1.0))) / 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[t, -1.05e+264], And[N[Not[LessEqual[t, -3.6e+80]], $MachinePrecision], Or[LessEqual[t, -2.1e-59], N[Not[LessEqual[t, 1.32e+38]], $MachinePrecision]]]], N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{+264} \lor \neg \left(t \leq -3.6 \cdot 10^{+80}\right) \land \left(t \leq -2.1 \cdot 10^{-59} \lor \neg \left(t \leq 1.32 \cdot 10^{+38}\right)\right):\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{y \cdot e^{b}}\\
\end{array}
\end{array}
if t < -1.05000000000000005e264 or -3.59999999999999995e80 < t < -2.09999999999999997e-59 or 1.32e38 < t Initial program 100.0%
*-commutative100.0%
associate-/l*89.4%
associate--l+89.4%
fma-define89.4%
sub-neg89.4%
metadata-eval89.4%
Simplified89.4%
Taylor expanded in y around 0 93.7%
Taylor expanded in b around 0 91.6%
exp-to-pow91.6%
sub-neg91.6%
metadata-eval91.6%
+-commutative91.6%
Simplified91.6%
if -1.05000000000000005e264 < t < -3.59999999999999995e80 or -2.09999999999999997e-59 < t < 1.32e38Initial program 97.1%
associate-/l*96.4%
associate--l+96.4%
exp-sum77.9%
associate-/l*76.7%
*-commutative76.7%
exp-to-pow76.7%
exp-diff73.0%
*-commutative73.0%
exp-to-pow74.2%
sub-neg74.2%
metadata-eval74.2%
Simplified74.2%
Taylor expanded in t around 0 78.6%
associate-/r*81.1%
Simplified81.1%
Final simplification84.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.05e+218) (not (<= y 8.5e+159))) (* 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 <= -1.05e+218) || !(y <= 8.5e+159)) {
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 <= (-1.05d+218)) .or. (.not. (y <= 8.5d+159))) 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 <= -1.05e+218) || !(y <= 8.5e+159)) {
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 <= -1.05e+218) or not (y <= 8.5e+159): 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 <= -1.05e+218) || !(y <= 8.5e+159)) 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 <= -1.05e+218) || ~((y <= 8.5e+159))) 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, -1.05e+218], N[Not[LessEqual[y, 8.5e+159]], $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 -1.05 \cdot 10^{+218} \lor \neg \left(y \leq 8.5 \cdot 10^{+159}\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 < -1.0499999999999999e218 or 8.50000000000000076e159 < y Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum53.1%
associate-/l*49.0%
*-commutative49.0%
exp-to-pow49.0%
exp-diff42.9%
*-commutative42.9%
exp-to-pow42.9%
sub-neg42.9%
metadata-eval42.9%
Simplified42.9%
Taylor expanded in t around 0 51.1%
associate-/r*65.3%
Simplified65.3%
Taylor expanded in b around 0 94.0%
if -1.0499999999999999e218 < y < 8.50000000000000076e159Initial program 97.7%
*-commutative97.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%
Final simplification90.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -5.3e+54)
(/ x (* y (exp b)))
(if (<= b 10200000000.0)
(* x (* (pow a (+ t -1.0)) (/ (pow z y) y)))
(/ x (* y (* a (exp b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -5.3e+54) {
tmp = x / (y * exp(b));
} else if (b <= 10200000000.0) {
tmp = x * (pow(a, (t + -1.0)) * (pow(z, y) / y));
} else {
tmp = x / (y * (a * exp(b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-5.3d+54)) then
tmp = x / (y * exp(b))
else if (b <= 10200000000.0d0) then
tmp = x * ((a ** (t + (-1.0d0))) * ((z ** y) / y))
else
tmp = x / (y * (a * exp(b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -5.3e+54) {
tmp = x / (y * Math.exp(b));
} else if (b <= 10200000000.0) {
tmp = x * (Math.pow(a, (t + -1.0)) * (Math.pow(z, y) / y));
} else {
tmp = x / (y * (a * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -5.3e+54: tmp = x / (y * math.exp(b)) elif b <= 10200000000.0: tmp = x * (math.pow(a, (t + -1.0)) * (math.pow(z, y) / y)) else: tmp = x / (y * (a * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -5.3e+54) tmp = Float64(x / Float64(y * exp(b))); elseif (b <= 10200000000.0) tmp = Float64(x * Float64((a ^ Float64(t + -1.0)) * Float64((z ^ y) / y))); else tmp = Float64(x / Float64(y * Float64(a * exp(b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -5.3e+54) tmp = x / (y * exp(b)); elseif (b <= 10200000000.0) tmp = x * ((a ^ (t + -1.0)) * ((z ^ y) / y)); else tmp = x / (y * (a * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -5.3e+54], N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 10200000000.0], N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] * N[(N[Power[z, y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.3 \cdot 10^{+54}:\\
\;\;\;\;\frac{x}{y \cdot e^{b}}\\
\mathbf{elif}\;b \leq 10200000000:\\
\;\;\;\;x \cdot \left({a}^{\left(t + -1\right)} \cdot \frac{{z}^{y}}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot e^{b}\right)}\\
\end{array}
\end{array}
if b < -5.30000000000000018e54Initial program 100.0%
*-commutative100.0%
associate-/l*94.5%
associate--l+94.5%
fma-define94.5%
sub-neg94.5%
metadata-eval94.5%
Simplified94.5%
Taylor expanded in b around inf 83.8%
neg-mul-183.8%
Simplified83.8%
exp-neg83.8%
frac-times89.3%
*-un-lft-identity89.3%
*-commutative89.3%
Applied egg-rr89.3%
if -5.30000000000000018e54 < b < 1.02e10Initial program 96.7%
associate-/l*95.9%
associate--l+95.9%
exp-sum83.1%
associate-/l*81.7%
*-commutative81.7%
exp-to-pow81.7%
exp-diff80.3%
*-commutative80.3%
exp-to-pow81.7%
sub-neg81.7%
metadata-eval81.7%
Simplified81.7%
Taylor expanded in b around 0 83.2%
associate-/l*83.2%
exp-to-pow84.5%
sub-neg84.5%
metadata-eval84.5%
Simplified84.5%
if 1.02e10 < b Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum56.7%
associate-/l*56.7%
*-commutative56.7%
exp-to-pow56.7%
exp-diff46.7%
*-commutative46.7%
exp-to-pow46.7%
sub-neg46.7%
metadata-eval46.7%
Simplified46.7%
Taylor expanded in t around 0 55.1%
associate-/r*55.1%
Simplified55.1%
Taylor expanded in y around 0 77.0%
*-commutative77.0%
associate-*l*77.0%
*-commutative77.0%
Simplified77.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -410000.0) (not (<= y 1.95e+154))) (* x (/ (/ (pow z y) a) y)) (/ (/ (* x (pow a (+ t -1.0))) (exp b)) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -410000.0) || !(y <= 1.95e+154)) {
tmp = x * ((pow(z, y) / a) / y);
} else {
tmp = ((x * pow(a, (t + -1.0))) / 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 <= (-410000.0d0)) .or. (.not. (y <= 1.95d+154))) then
tmp = x * (((z ** y) / a) / y)
else
tmp = ((x * (a ** (t + (-1.0d0)))) / 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 <= -410000.0) || !(y <= 1.95e+154)) {
tmp = x * ((Math.pow(z, y) / a) / y);
} else {
tmp = ((x * Math.pow(a, (t + -1.0))) / Math.exp(b)) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -410000.0) or not (y <= 1.95e+154): tmp = x * ((math.pow(z, y) / a) / y) else: tmp = ((x * math.pow(a, (t + -1.0))) / math.exp(b)) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -410000.0) || !(y <= 1.95e+154)) tmp = Float64(x * Float64(Float64((z ^ y) / a) / y)); else tmp = Float64(Float64(Float64(x * (a ^ Float64(t + -1.0))) / exp(b)) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -410000.0) || ~((y <= 1.95e+154))) tmp = x * (((z ^ y) / a) / y); else tmp = ((x * (a ^ (t + -1.0))) / exp(b)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -410000.0], N[Not[LessEqual[y, 1.95e+154]], $MachinePrecision]], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -410000 \lor \neg \left(y \leq 1.95 \cdot 10^{+154}\right):\\
\;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x \cdot {a}^{\left(t + -1\right)}}{e^{b}}}{y}\\
\end{array}
\end{array}
if y < -4.1e5 or 1.9500000000000001e154 < y Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum54.6%
associate-/l*52.6%
*-commutative52.6%
exp-to-pow52.6%
exp-diff47.4%
*-commutative47.4%
exp-to-pow47.4%
sub-neg47.4%
metadata-eval47.4%
Simplified47.4%
Taylor expanded in t around 0 53.8%
associate-/r*62.0%
Simplified62.0%
Taylor expanded in b around 0 79.7%
if -4.1e5 < y < 1.9500000000000001e154Initial program 97.0%
*-commutative97.0%
associate-/l*90.4%
associate--l+90.4%
fma-define90.4%
sub-neg90.4%
metadata-eval90.4%
Simplified90.4%
Taylor expanded in y around 0 92.3%
div-exp85.4%
associate-/l*82.2%
exp-to-pow83.2%
sub-neg83.2%
metadata-eval83.2%
Simplified83.2%
Final simplification81.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (pow a (+ t -1.0))) y)))
(if (<= b -2.45e+40)
(/ x (* y (exp b)))
(if (<= b -1.4e-97)
t_1
(if (<= b -2.2e-258)
(* x (/ (/ (pow z y) a) y))
(if (<= b 280000000.0) t_1 (/ x (* y (* a (exp b))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * pow(a, (t + -1.0))) / y;
double tmp;
if (b <= -2.45e+40) {
tmp = x / (y * exp(b));
} else if (b <= -1.4e-97) {
tmp = t_1;
} else if (b <= -2.2e-258) {
tmp = x * ((pow(z, y) / a) / y);
} else if (b <= 280000000.0) {
tmp = t_1;
} else {
tmp = x / (y * (a * exp(b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x * (a ** (t + (-1.0d0)))) / y
if (b <= (-2.45d+40)) then
tmp = x / (y * exp(b))
else if (b <= (-1.4d-97)) then
tmp = t_1
else if (b <= (-2.2d-258)) then
tmp = x * (((z ** y) / a) / y)
else if (b <= 280000000.0d0) then
tmp = t_1
else
tmp = x / (y * (a * exp(b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * Math.pow(a, (t + -1.0))) / y;
double tmp;
if (b <= -2.45e+40) {
tmp = x / (y * Math.exp(b));
} else if (b <= -1.4e-97) {
tmp = t_1;
} else if (b <= -2.2e-258) {
tmp = x * ((Math.pow(z, y) / a) / y);
} else if (b <= 280000000.0) {
tmp = t_1;
} else {
tmp = x / (y * (a * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * math.pow(a, (t + -1.0))) / y tmp = 0 if b <= -2.45e+40: tmp = x / (y * math.exp(b)) elif b <= -1.4e-97: tmp = t_1 elif b <= -2.2e-258: tmp = x * ((math.pow(z, y) / a) / y) elif b <= 280000000.0: tmp = t_1 else: tmp = x / (y * (a * math.exp(b))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y) tmp = 0.0 if (b <= -2.45e+40) tmp = Float64(x / Float64(y * exp(b))); elseif (b <= -1.4e-97) tmp = t_1; elseif (b <= -2.2e-258) tmp = Float64(x * Float64(Float64((z ^ y) / a) / y)); elseif (b <= 280000000.0) tmp = t_1; else tmp = Float64(x / Float64(y * Float64(a * exp(b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x * (a ^ (t + -1.0))) / y; tmp = 0.0; if (b <= -2.45e+40) tmp = x / (y * exp(b)); elseif (b <= -1.4e-97) tmp = t_1; elseif (b <= -2.2e-258) tmp = x * (((z ^ y) / a) / y); elseif (b <= 280000000.0) tmp = t_1; else tmp = x / (y * (a * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[b, -2.45e+40], N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1.4e-97], t$95$1, If[LessEqual[b, -2.2e-258], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 280000000.0], t$95$1, N[(x / N[(y * N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{if}\;b \leq -2.45 \cdot 10^{+40}:\\
\;\;\;\;\frac{x}{y \cdot e^{b}}\\
\mathbf{elif}\;b \leq -1.4 \cdot 10^{-97}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -2.2 \cdot 10^{-258}:\\
\;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\
\mathbf{elif}\;b \leq 280000000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot e^{b}\right)}\\
\end{array}
\end{array}
if b < -2.45000000000000024e40Initial program 100.0%
*-commutative100.0%
associate-/l*94.6%
associate--l+94.6%
fma-define94.6%
sub-neg94.6%
metadata-eval94.6%
Simplified94.6%
Taylor expanded in b around inf 84.1%
neg-mul-184.1%
Simplified84.1%
exp-neg84.1%
frac-times89.5%
*-un-lft-identity89.5%
*-commutative89.5%
Applied egg-rr89.5%
if -2.45000000000000024e40 < b < -1.4000000000000001e-97 or -2.20000000000000015e-258 < b < 2.8e8Initial program 97.0%
*-commutative97.0%
associate-/l*92.7%
associate--l+92.7%
fma-define92.7%
sub-neg92.7%
metadata-eval92.7%
Simplified92.7%
Taylor expanded in y around 0 80.3%
Taylor expanded in b around 0 79.8%
exp-to-pow80.8%
sub-neg80.8%
metadata-eval80.8%
+-commutative80.8%
Simplified80.8%
if -1.4000000000000001e-97 < b < -2.20000000000000015e-258Initial program 95.5%
associate-/l*97.8%
associate--l+97.8%
exp-sum83.1%
associate-/l*80.2%
*-commutative80.2%
exp-to-pow80.2%
exp-diff80.2%
*-commutative80.2%
exp-to-pow82.3%
sub-neg82.3%
metadata-eval82.3%
Simplified82.3%
Taylor expanded in t around 0 70.8%
associate-/r*91.3%
Simplified91.3%
Taylor expanded in b around 0 91.3%
if 2.8e8 < b Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum56.5%
associate-/l*56.5%
*-commutative56.5%
exp-to-pow56.5%
exp-diff46.8%
*-commutative46.8%
exp-to-pow46.8%
sub-neg46.8%
metadata-eval46.8%
Simplified46.8%
Taylor expanded in t around 0 54.9%
associate-/r*54.9%
Simplified54.9%
Taylor expanded in y around 0 76.2%
*-commutative76.2%
associate-*l*76.2%
*-commutative76.2%
Simplified76.2%
Final simplification83.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -22500000.0)
(+
(/ x y)
(*
b
(-
(* b (+ (* -0.16666666666666666 (/ (* x b) y)) (* (/ x y) 0.5)))
(/ x y))))
(if (<= b 2.75e-14)
(/ 1.0 (* a (/ y x)))
(if (<= b 6.8e+31)
(* x (/ (exp b) y))
(/
x
(*
a
(*
y
(+ 1.0 (* b (+ 1.0 (* b (+ 0.5 (* b 0.16666666666666666)))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -22500000.0) {
tmp = (x / y) + (b * ((b * ((-0.16666666666666666 * ((x * b) / y)) + ((x / y) * 0.5))) - (x / y)));
} else if (b <= 2.75e-14) {
tmp = 1.0 / (a * (y / x));
} else if (b <= 6.8e+31) {
tmp = x * (exp(b) / y);
} else {
tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666))))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-22500000.0d0)) then
tmp = (x / y) + (b * ((b * (((-0.16666666666666666d0) * ((x * b) / y)) + ((x / y) * 0.5d0))) - (x / y)))
else if (b <= 2.75d-14) then
tmp = 1.0d0 / (a * (y / x))
else if (b <= 6.8d+31) then
tmp = x * (exp(b) / y)
else
tmp = x / (a * (y * (1.0d0 + (b * (1.0d0 + (b * (0.5d0 + (b * 0.16666666666666666d0))))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -22500000.0) {
tmp = (x / y) + (b * ((b * ((-0.16666666666666666 * ((x * b) / y)) + ((x / y) * 0.5))) - (x / y)));
} else if (b <= 2.75e-14) {
tmp = 1.0 / (a * (y / x));
} else if (b <= 6.8e+31) {
tmp = x * (Math.exp(b) / y);
} else {
tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666))))))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -22500000.0: tmp = (x / y) + (b * ((b * ((-0.16666666666666666 * ((x * b) / y)) + ((x / y) * 0.5))) - (x / y))) elif b <= 2.75e-14: tmp = 1.0 / (a * (y / x)) elif b <= 6.8e+31: tmp = x * (math.exp(b) / y) else: tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -22500000.0) 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)))); elseif (b <= 2.75e-14) tmp = Float64(1.0 / Float64(a * Float64(y / x))); elseif (b <= 6.8e+31) tmp = Float64(x * Float64(exp(b) / y)); else tmp = Float64(x / Float64(a * Float64(y * Float64(1.0 + Float64(b * Float64(1.0 + Float64(b * Float64(0.5 + Float64(b * 0.16666666666666666))))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -22500000.0) tmp = (x / y) + (b * ((b * ((-0.16666666666666666 * ((x * b) / y)) + ((x / y) * 0.5))) - (x / y))); elseif (b <= 2.75e-14) tmp = 1.0 / (a * (y / x)); elseif (b <= 6.8e+31) tmp = x * (exp(b) / y); else tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -22500000.0], 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], If[LessEqual[b, 2.75e-14], N[(1.0 / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.8e+31], N[(x * N[(N[Exp[b], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * N[(1.0 + N[(b * N[(1.0 + N[(b * N[(0.5 + N[(b * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -22500000:\\
\;\;\;\;\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{elif}\;b \leq 2.75 \cdot 10^{-14}:\\
\;\;\;\;\frac{1}{a \cdot \frac{y}{x}}\\
\mathbf{elif}\;b \leq 6.8 \cdot 10^{+31}:\\
\;\;\;\;x \cdot \frac{e^{b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(1 + b \cdot \left(1 + b \cdot \left(0.5 + b \cdot 0.16666666666666666\right)\right)\right)\right)}\\
\end{array}
\end{array}
if b < -2.25e7Initial program 100.0%
*-commutative100.0%
associate-/l*95.4%
associate--l+95.4%
fma-define95.4%
sub-neg95.4%
metadata-eval95.4%
Simplified95.4%
Taylor expanded in b around inf 81.7%
neg-mul-181.7%
Simplified81.7%
Taylor expanded in b around 0 70.4%
if -2.25e7 < b < 2.74999999999999996e-14Initial program 96.3%
associate-/l*95.4%
associate--l+95.4%
exp-sum83.5%
associate-/l*81.9%
*-commutative81.9%
exp-to-pow81.9%
exp-diff81.9%
*-commutative81.9%
exp-to-pow83.4%
sub-neg83.4%
metadata-eval83.4%
Simplified83.4%
Taylor expanded in t around 0 64.4%
associate-/r*71.5%
Simplified71.5%
Taylor expanded in y around 0 39.7%
*-commutative39.7%
associate-*l*39.7%
*-commutative39.7%
Simplified39.7%
Taylor expanded in b around 0 39.4%
clear-num38.7%
inv-pow38.7%
*-commutative38.7%
Applied egg-rr38.7%
unpow-138.7%
associate-/l*42.5%
Simplified42.5%
if 2.74999999999999996e-14 < b < 6.7999999999999996e31Initial program 100.0%
*-commutative100.0%
associate-/l*76.9%
associate--l+76.9%
fma-define76.9%
sub-neg76.9%
metadata-eval76.9%
Simplified76.9%
Taylor expanded in b around inf 47.0%
neg-mul-147.0%
Simplified47.0%
clear-num47.0%
un-div-inv47.0%
add-sqr-sqrt0.0%
sqrt-unprod24.0%
sqr-neg24.0%
sqrt-unprod24.0%
add-sqr-sqrt24.0%
Applied egg-rr24.0%
associate-/r/47.0%
Simplified47.0%
if 6.7999999999999996e31 < b Initial program 100.0%
*-commutative100.0%
associate-/l*78.8%
associate--l+78.8%
fma-define78.8%
sub-neg78.8%
metadata-eval78.8%
Simplified78.8%
Taylor expanded in y around 0 86.7%
div-exp71.3%
associate-/l*65.6%
exp-to-pow65.6%
sub-neg65.6%
metadata-eval65.6%
Simplified65.6%
Taylor expanded in t around 0 81.1%
Taylor expanded in b around 0 60.7%
Taylor expanded in a around 0 69.9%
Final simplification55.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -0.00085) (not (<= b 1.5e-29))) (/ (/ x (* a (exp b))) y) (* x (/ (/ (pow z y) a) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -0.00085) || !(b <= 1.5e-29)) {
tmp = (x / (a * exp(b))) / y;
} else {
tmp = x * ((pow(z, y) / a) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-0.00085d0)) .or. (.not. (b <= 1.5d-29))) then
tmp = (x / (a * exp(b))) / y
else
tmp = x * (((z ** y) / a) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -0.00085) || !(b <= 1.5e-29)) {
tmp = (x / (a * Math.exp(b))) / y;
} else {
tmp = x * ((Math.pow(z, y) / a) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -0.00085) or not (b <= 1.5e-29): tmp = (x / (a * math.exp(b))) / y else: tmp = x * ((math.pow(z, y) / a) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -0.00085) || !(b <= 1.5e-29)) tmp = Float64(Float64(x / Float64(a * exp(b))) / y); else tmp = Float64(x * Float64(Float64((z ^ y) / a) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -0.00085) || ~((b <= 1.5e-29))) tmp = (x / (a * exp(b))) / y; else tmp = x * (((z ^ y) / a) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -0.00085], N[Not[LessEqual[b, 1.5e-29]], $MachinePrecision]], N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -0.00085 \lor \neg \left(b \leq 1.5 \cdot 10^{-29}\right):\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\
\end{array}
\end{array}
if b < -8.49999999999999953e-4 or 1.5000000000000001e-29 < b Initial program 99.8%
*-commutative99.8%
associate-/l*86.4%
associate--l+86.4%
fma-define86.4%
sub-neg86.4%
metadata-eval86.4%
Simplified86.4%
Taylor expanded in y around 0 87.4%
div-exp72.4%
associate-/l*65.7%
exp-to-pow65.8%
sub-neg65.8%
metadata-eval65.8%
Simplified65.8%
Taylor expanded in t around 0 80.2%
if -8.49999999999999953e-4 < b < 1.5000000000000001e-29Initial program 96.3%
associate-/l*96.8%
associate--l+96.8%
exp-sum84.5%
associate-/l*82.9%
*-commutative82.9%
exp-to-pow82.9%
exp-diff82.9%
*-commutative82.9%
exp-to-pow84.4%
sub-neg84.4%
metadata-eval84.4%
Simplified84.4%
Taylor expanded in t around 0 65.6%
associate-/r*72.9%
Simplified72.9%
Taylor expanded in b around 0 72.9%
Final simplification76.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -700.0) (not (<= b 2.75e-14))) (/ x (* y (exp b))) (/ 1.0 (* a (/ y x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -700.0) || !(b <= 2.75e-14)) {
tmp = x / (y * exp(b));
} else {
tmp = 1.0 / (a * (y / x));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-700.0d0)) .or. (.not. (b <= 2.75d-14))) then
tmp = x / (y * exp(b))
else
tmp = 1.0d0 / (a * (y / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -700.0) || !(b <= 2.75e-14)) {
tmp = x / (y * Math.exp(b));
} else {
tmp = 1.0 / (a * (y / x));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -700.0) or not (b <= 2.75e-14): tmp = x / (y * math.exp(b)) else: tmp = 1.0 / (a * (y / x)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -700.0) || !(b <= 2.75e-14)) tmp = Float64(x / Float64(y * exp(b))); else tmp = Float64(1.0 / Float64(a * Float64(y / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -700.0) || ~((b <= 2.75e-14))) tmp = x / (y * exp(b)); else tmp = 1.0 / (a * (y / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -700.0], N[Not[LessEqual[b, 2.75e-14]], $MachinePrecision]], N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -700 \lor \neg \left(b \leq 2.75 \cdot 10^{-14}\right):\\
\;\;\;\;\frac{x}{y \cdot e^{b}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{a \cdot \frac{y}{x}}\\
\end{array}
\end{array}
if b < -700 or 2.74999999999999996e-14 < b Initial program 100.0%
*-commutative100.0%
associate-/l*86.9%
associate--l+86.9%
fma-define86.9%
sub-neg86.9%
metadata-eval86.9%
Simplified86.9%
Taylor expanded in b around inf 71.8%
neg-mul-171.8%
Simplified71.8%
exp-neg71.8%
frac-times80.3%
*-un-lft-identity80.3%
*-commutative80.3%
Applied egg-rr80.3%
if -700 < b < 2.74999999999999996e-14Initial program 96.3%
associate-/l*95.4%
associate--l+95.4%
exp-sum83.5%
associate-/l*81.9%
*-commutative81.9%
exp-to-pow81.9%
exp-diff81.9%
*-commutative81.9%
exp-to-pow83.4%
sub-neg83.4%
metadata-eval83.4%
Simplified83.4%
Taylor expanded in t around 0 64.4%
associate-/r*71.5%
Simplified71.5%
Taylor expanded in y around 0 39.7%
*-commutative39.7%
associate-*l*39.7%
*-commutative39.7%
Simplified39.7%
Taylor expanded in b around 0 39.4%
clear-num38.7%
inv-pow38.7%
*-commutative38.7%
Applied egg-rr38.7%
unpow-138.7%
associate-/l*42.5%
Simplified42.5%
Final simplification61.7%
(FPCore (x y z t a b) :precision binary64 (if (<= t 78.0) (/ x (* y (* a (exp b)))) (/ x (* y (exp b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 78.0) {
tmp = x / (y * (a * exp(b)));
} else {
tmp = x / (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 <= 78.0d0) then
tmp = x / (y * (a * exp(b)))
else
tmp = x / (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 <= 78.0) {
tmp = x / (y * (a * Math.exp(b)));
} else {
tmp = x / (y * Math.exp(b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= 78.0: tmp = x / (y * (a * math.exp(b))) else: tmp = x / (y * math.exp(b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= 78.0) tmp = Float64(x / Float64(y * Float64(a * exp(b)))); else tmp = Float64(x / Float64(y * exp(b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= 78.0) tmp = x / (y * (a * exp(b))); else tmp = x / (y * exp(b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, 78.0], N[(x / N[(y * N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 78:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot e^{b}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot e^{b}}\\
\end{array}
\end{array}
if t < 78Initial program 97.4%
associate-/l*96.8%
associate--l+96.8%
exp-sum76.2%
associate-/l*75.1%
*-commutative75.1%
exp-to-pow75.1%
exp-diff71.2%
*-commutative71.2%
exp-to-pow72.3%
sub-neg72.3%
metadata-eval72.3%
Simplified72.3%
Taylor expanded in t around 0 74.7%
associate-/r*76.9%
Simplified76.9%
Taylor expanded in y around 0 71.1%
*-commutative71.1%
associate-*l*71.1%
*-commutative71.1%
Simplified71.1%
if 78 < t Initial program 100.0%
*-commutative100.0%
associate-/l*92.1%
associate--l+92.1%
fma-define92.1%
sub-neg92.1%
metadata-eval92.1%
Simplified92.1%
Taylor expanded in b around inf 38.7%
neg-mul-138.7%
Simplified38.7%
exp-neg38.7%
frac-times40.0%
*-un-lft-identity40.0%
*-commutative40.0%
Applied egg-rr40.0%
(FPCore (x y z t a b) :precision binary64 (/ (/ x (* a (exp b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x / (a * exp(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 / (a * exp(b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x / (a * Math.exp(b))) / y;
}
def code(x, y, z, t, a, b): return (x / (a * math.exp(b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x / Float64(a * exp(b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x / (a * exp(b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{x}{a \cdot e^{b}}}{y}
\end{array}
Initial program 98.2%
*-commutative98.2%
associate-/l*88.9%
associate--l+88.9%
fma-define88.9%
sub-neg88.9%
metadata-eval88.9%
Simplified88.9%
Taylor expanded in y around 0 81.4%
div-exp73.6%
associate-/l*70.1%
exp-to-pow70.7%
sub-neg70.7%
metadata-eval70.7%
Simplified70.7%
Taylor expanded in t around 0 60.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -1.5)
(+
(/ x y)
(*
b
(-
(* b (+ (* -0.16666666666666666 (/ (* x b) y)) (* (/ x y) 0.5)))
(/ x y))))
(/
(/ x (* a (+ 1.0 (* b (+ 1.0 (* b (+ 0.5 (* b 0.16666666666666666))))))))
y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.5) {
tmp = (x / y) + (b * ((b * ((-0.16666666666666666 * ((x * b) / y)) + ((x / y) * 0.5))) - (x / y)));
} else {
tmp = (x / (a * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))) / 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 <= (-1.5d0)) then
tmp = (x / y) + (b * ((b * (((-0.16666666666666666d0) * ((x * b) / y)) + ((x / y) * 0.5d0))) - (x / y)))
else
tmp = (x / (a * (1.0d0 + (b * (1.0d0 + (b * (0.5d0 + (b * 0.16666666666666666d0)))))))) / 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 <= -1.5) {
tmp = (x / y) + (b * ((b * ((-0.16666666666666666 * ((x * b) / y)) + ((x / y) * 0.5))) - (x / y)));
} else {
tmp = (x / (a * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.5: tmp = (x / y) + (b * ((b * ((-0.16666666666666666 * ((x * b) / y)) + ((x / y) * 0.5))) - (x / y))) else: tmp = (x / (a * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.5) 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(Float64(x / Float64(a * Float64(1.0 + Float64(b * Float64(1.0 + Float64(b * Float64(0.5 + Float64(b * 0.16666666666666666)))))))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.5) tmp = (x / y) + (b * ((b * ((-0.16666666666666666 * ((x * b) / y)) + ((x / y) * 0.5))) - (x / y))); else tmp = (x / (a * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.5], 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[(N[(x / N[(a * 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] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.5:\\
\;\;\;\;\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{\frac{x}{a \cdot \left(1 + b \cdot \left(1 + b \cdot \left(0.5 + b \cdot 0.16666666666666666\right)\right)\right)}}{y}\\
\end{array}
\end{array}
if b < -1.5Initial program 100.0%
*-commutative100.0%
associate-/l*95.4%
associate--l+95.4%
fma-define95.4%
sub-neg95.4%
metadata-eval95.4%
Simplified95.4%
Taylor expanded in b around inf 81.7%
neg-mul-181.7%
Simplified81.7%
Taylor expanded in b around 0 70.4%
if -1.5 < b Initial program 97.5%
*-commutative97.5%
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 78.2%
div-exp72.4%
associate-/l*70.9%
exp-to-pow71.7%
sub-neg71.7%
metadata-eval71.7%
Simplified71.7%
Taylor expanded in t around 0 52.2%
Taylor expanded in b around 0 44.5%
Taylor expanded in a around 0 46.0%
Final simplification52.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -7.4e+34)
(* x (/ (+ 1.0 (* b (+ -1.0 (* b 0.5)))) y))
(if (<= b -1.5e-257)
(/ (* b (- (/ x (* a b)) (/ x a))) y)
(/
(/ x (* a (+ 1.0 (* b (+ 1.0 (* b (+ 0.5 (* b 0.16666666666666666))))))))
y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -7.4e+34) {
tmp = x * ((1.0 + (b * (-1.0 + (b * 0.5)))) / y);
} else if (b <= -1.5e-257) {
tmp = (b * ((x / (a * b)) - (x / a))) / y;
} else {
tmp = (x / (a * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))) / 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 <= (-7.4d+34)) then
tmp = x * ((1.0d0 + (b * ((-1.0d0) + (b * 0.5d0)))) / y)
else if (b <= (-1.5d-257)) then
tmp = (b * ((x / (a * b)) - (x / a))) / y
else
tmp = (x / (a * (1.0d0 + (b * (1.0d0 + (b * (0.5d0 + (b * 0.16666666666666666d0)))))))) / 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 <= -7.4e+34) {
tmp = x * ((1.0 + (b * (-1.0 + (b * 0.5)))) / y);
} else if (b <= -1.5e-257) {
tmp = (b * ((x / (a * b)) - (x / a))) / y;
} else {
tmp = (x / (a * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -7.4e+34: tmp = x * ((1.0 + (b * (-1.0 + (b * 0.5)))) / y) elif b <= -1.5e-257: tmp = (b * ((x / (a * b)) - (x / a))) / y else: tmp = (x / (a * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -7.4e+34) tmp = Float64(x * Float64(Float64(1.0 + Float64(b * Float64(-1.0 + Float64(b * 0.5)))) / y)); elseif (b <= -1.5e-257) tmp = Float64(Float64(b * Float64(Float64(x / Float64(a * b)) - Float64(x / a))) / y); else tmp = Float64(Float64(x / Float64(a * Float64(1.0 + Float64(b * Float64(1.0 + Float64(b * Float64(0.5 + Float64(b * 0.16666666666666666)))))))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -7.4e+34) tmp = x * ((1.0 + (b * (-1.0 + (b * 0.5)))) / y); elseif (b <= -1.5e-257) tmp = (b * ((x / (a * b)) - (x / a))) / y; else tmp = (x / (a * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -7.4e+34], N[(x * N[(N[(1.0 + N[(b * N[(-1.0 + N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1.5e-257], N[(N[(b * N[(N[(x / N[(a * b), $MachinePrecision]), $MachinePrecision] - N[(x / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / N[(a * 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] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.4 \cdot 10^{+34}:\\
\;\;\;\;x \cdot \frac{1 + b \cdot \left(-1 + b \cdot 0.5\right)}{y}\\
\mathbf{elif}\;b \leq -1.5 \cdot 10^{-257}:\\
\;\;\;\;\frac{b \cdot \left(\frac{x}{a \cdot b} - \frac{x}{a}\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a \cdot \left(1 + b \cdot \left(1 + b \cdot \left(0.5 + b \cdot 0.16666666666666666\right)\right)\right)}}{y}\\
\end{array}
\end{array}
if b < -7.40000000000000017e34Initial 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 b around inf 79.8%
neg-mul-179.8%
Simplified79.8%
Taylor expanded in b around 0 62.4%
Taylor expanded in x around 0 64.1%
Taylor expanded in y around 0 68.9%
if -7.40000000000000017e34 < b < -1.5e-257Initial program 96.5%
*-commutative96.5%
associate-/l*92.9%
associate--l+92.9%
fma-define92.9%
sub-neg92.9%
metadata-eval92.9%
Simplified92.9%
Taylor expanded in y around 0 74.8%
div-exp74.8%
associate-/l*73.2%
exp-to-pow74.6%
sub-neg74.6%
metadata-eval74.6%
Simplified74.6%
Taylor expanded in t around 0 46.5%
Taylor expanded in b around 0 40.8%
+-commutative40.8%
mul-1-neg40.8%
unsub-neg40.8%
*-commutative40.8%
associate-/l*40.8%
Simplified40.8%
Taylor expanded in b around inf 46.7%
if -1.5e-257 < b Initial program 98.1%
*-commutative98.1%
associate-/l*84.5%
associate--l+84.5%
fma-define84.5%
sub-neg84.5%
metadata-eval84.5%
Simplified84.5%
Taylor expanded in y around 0 80.7%
div-exp72.6%
associate-/l*70.4%
exp-to-pow70.9%
sub-neg70.9%
metadata-eval70.9%
Simplified70.9%
Taylor expanded in t around 0 57.0%
Taylor expanded in b around 0 46.2%
Taylor expanded in a around 0 48.4%
Final simplification52.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (/ (+ 1.0 (* b (+ -1.0 (* b 0.5)))) y))))
(if (<= b -8.2e+45)
t_1
(if (<= b 7.5e+155)
(/ 1.0 (* a (/ y x)))
(if (<= b 5.4e+197) t_1 (/ x (* y (+ a (* a b)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * ((1.0 + (b * (-1.0 + (b * 0.5)))) / y);
double tmp;
if (b <= -8.2e+45) {
tmp = t_1;
} else if (b <= 7.5e+155) {
tmp = 1.0 / (a * (y / x));
} else if (b <= 5.4e+197) {
tmp = t_1;
} else {
tmp = x / (y * (a + (a * 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) :: t_1
real(8) :: tmp
t_1 = x * ((1.0d0 + (b * ((-1.0d0) + (b * 0.5d0)))) / y)
if (b <= (-8.2d+45)) then
tmp = t_1
else if (b <= 7.5d+155) then
tmp = 1.0d0 / (a * (y / x))
else if (b <= 5.4d+197) then
tmp = t_1
else
tmp = x / (y * (a + (a * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * ((1.0 + (b * (-1.0 + (b * 0.5)))) / y);
double tmp;
if (b <= -8.2e+45) {
tmp = t_1;
} else if (b <= 7.5e+155) {
tmp = 1.0 / (a * (y / x));
} else if (b <= 5.4e+197) {
tmp = t_1;
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * ((1.0 + (b * (-1.0 + (b * 0.5)))) / y) tmp = 0 if b <= -8.2e+45: tmp = t_1 elif b <= 7.5e+155: tmp = 1.0 / (a * (y / x)) elif b <= 5.4e+197: tmp = t_1 else: tmp = x / (y * (a + (a * b))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64(Float64(1.0 + Float64(b * Float64(-1.0 + Float64(b * 0.5)))) / y)) tmp = 0.0 if (b <= -8.2e+45) tmp = t_1; elseif (b <= 7.5e+155) tmp = Float64(1.0 / Float64(a * Float64(y / x))); elseif (b <= 5.4e+197) tmp = t_1; else tmp = Float64(x / Float64(y * Float64(a + Float64(a * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * ((1.0 + (b * (-1.0 + (b * 0.5)))) / y); tmp = 0.0; if (b <= -8.2e+45) tmp = t_1; elseif (b <= 7.5e+155) tmp = 1.0 / (a * (y / x)); elseif (b <= 5.4e+197) tmp = t_1; else tmp = x / (y * (a + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[(1.0 + N[(b * N[(-1.0 + N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -8.2e+45], t$95$1, If[LessEqual[b, 7.5e+155], N[(1.0 / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.4e+197], t$95$1, N[(x / N[(y * N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{1 + b \cdot \left(-1 + b \cdot 0.5\right)}{y}\\
\mathbf{if}\;b \leq -8.2 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 7.5 \cdot 10^{+155}:\\
\;\;\;\;\frac{1}{a \cdot \frac{y}{x}}\\
\mathbf{elif}\;b \leq 5.4 \cdot 10^{+197}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\
\end{array}
\end{array}
if b < -8.20000000000000025e45 or 7.4999999999999999e155 < b < 5.4000000000000001e197Initial program 100.0%
*-commutative100.0%
associate-/l*93.7%
associate--l+93.7%
fma-define93.7%
sub-neg93.7%
metadata-eval93.7%
Simplified93.7%
Taylor expanded in b around inf 78.0%
neg-mul-178.0%
Simplified78.0%
Taylor expanded in b around 0 55.6%
Taylor expanded in x around 0 57.1%
Taylor expanded in y around 0 69.3%
if -8.20000000000000025e45 < b < 7.4999999999999999e155Initial program 97.3%
associate-/l*96.6%
associate--l+96.6%
exp-sum79.2%
associate-/l*78.0%
*-commutative78.0%
exp-to-pow78.0%
exp-diff74.5%
*-commutative74.5%
exp-to-pow75.7%
sub-neg75.7%
metadata-eval75.7%
Simplified75.7%
Taylor expanded in t around 0 63.5%
associate-/r*68.7%
Simplified68.7%
Taylor expanded in y around 0 49.5%
*-commutative49.5%
associate-*l*49.5%
*-commutative49.5%
Simplified49.5%
Taylor expanded in b around 0 35.9%
clear-num35.4%
inv-pow35.4%
*-commutative35.4%
Applied egg-rr35.4%
unpow-135.4%
associate-/l*38.6%
Simplified38.6%
if 5.4000000000000001e197 < b Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum57.1%
associate-/l*57.1%
*-commutative57.1%
exp-to-pow57.1%
exp-diff52.4%
*-commutative52.4%
exp-to-pow52.4%
sub-neg52.4%
metadata-eval52.4%
Simplified52.4%
Taylor expanded in t around 0 57.3%
associate-/r*57.3%
Simplified57.3%
Taylor expanded in y around 0 81.3%
*-commutative81.3%
associate-*l*81.3%
*-commutative81.3%
Simplified81.3%
Taylor expanded in b around 0 58.1%
Final simplification47.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -1.85)
(* x (/ (+ 1.0 (* b (+ -1.0 (* b 0.5)))) y))
(/
x
(*
a
(* y (+ 1.0 (* b (+ 1.0 (* b (+ 0.5 (* b 0.16666666666666666)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.85) {
tmp = x * ((1.0 + (b * (-1.0 + (b * 0.5)))) / y);
} else {
tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666))))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-1.85d0)) then
tmp = x * ((1.0d0 + (b * ((-1.0d0) + (b * 0.5d0)))) / y)
else
tmp = x / (a * (y * (1.0d0 + (b * (1.0d0 + (b * (0.5d0 + (b * 0.16666666666666666d0))))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.85) {
tmp = x * ((1.0 + (b * (-1.0 + (b * 0.5)))) / y);
} else {
tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666))))))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.85: tmp = x * ((1.0 + (b * (-1.0 + (b * 0.5)))) / y) else: tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.85) tmp = Float64(x * Float64(Float64(1.0 + Float64(b * Float64(-1.0 + Float64(b * 0.5)))) / y)); else tmp = Float64(x / Float64(a * Float64(y * Float64(1.0 + Float64(b * Float64(1.0 + Float64(b * Float64(0.5 + Float64(b * 0.16666666666666666))))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.85) tmp = x * ((1.0 + (b * (-1.0 + (b * 0.5)))) / y); else tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.85], N[(x * N[(N[(1.0 + N[(b * N[(-1.0 + N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * N[(1.0 + N[(b * N[(1.0 + N[(b * N[(0.5 + N[(b * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.85:\\
\;\;\;\;x \cdot \frac{1 + b \cdot \left(-1 + b \cdot 0.5\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(1 + b \cdot \left(1 + b \cdot \left(0.5 + b \cdot 0.16666666666666666\right)\right)\right)\right)}\\
\end{array}
\end{array}
if b < -1.8500000000000001Initial program 100.0%
*-commutative100.0%
associate-/l*95.4%
associate--l+95.4%
fma-define95.4%
sub-neg95.4%
metadata-eval95.4%
Simplified95.4%
Taylor expanded in b around inf 81.7%
neg-mul-181.7%
Simplified81.7%
Taylor expanded in b around 0 61.4%
Taylor expanded in x around 0 61.4%
Taylor expanded in y around 0 65.8%
if -1.8500000000000001 < b Initial program 97.5%
*-commutative97.5%
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 78.2%
div-exp72.4%
associate-/l*70.9%
exp-to-pow71.7%
sub-neg71.7%
metadata-eval71.7%
Simplified71.7%
Taylor expanded in t around 0 52.2%
Taylor expanded in b around 0 44.5%
Taylor expanded in a around 0 45.9%
Final simplification50.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -6.5e+42)
(* x (/ (+ 1.0 (* b (+ -1.0 (* b 0.5)))) y))
(if (<= b 1.6e-15)
(/ 1.0 (* a (/ y x)))
(/ x (+ y (* b (+ y (* 0.5 (* y b)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -6.5e+42) {
tmp = x * ((1.0 + (b * (-1.0 + (b * 0.5)))) / y);
} else if (b <= 1.6e-15) {
tmp = 1.0 / (a * (y / x));
} else {
tmp = x / (y + (b * (y + (0.5 * (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 <= (-6.5d+42)) then
tmp = x * ((1.0d0 + (b * ((-1.0d0) + (b * 0.5d0)))) / y)
else if (b <= 1.6d-15) then
tmp = 1.0d0 / (a * (y / x))
else
tmp = x / (y + (b * (y + (0.5d0 * (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 <= -6.5e+42) {
tmp = x * ((1.0 + (b * (-1.0 + (b * 0.5)))) / y);
} else if (b <= 1.6e-15) {
tmp = 1.0 / (a * (y / x));
} else {
tmp = x / (y + (b * (y + (0.5 * (y * b)))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -6.5e+42: tmp = x * ((1.0 + (b * (-1.0 + (b * 0.5)))) / y) elif b <= 1.6e-15: tmp = 1.0 / (a * (y / x)) else: tmp = x / (y + (b * (y + (0.5 * (y * b))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -6.5e+42) tmp = Float64(x * Float64(Float64(1.0 + Float64(b * Float64(-1.0 + Float64(b * 0.5)))) / y)); elseif (b <= 1.6e-15) tmp = Float64(1.0 / Float64(a * Float64(y / x))); else tmp = Float64(x / Float64(y + Float64(b * Float64(y + Float64(0.5 * Float64(y * b)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -6.5e+42) tmp = x * ((1.0 + (b * (-1.0 + (b * 0.5)))) / y); elseif (b <= 1.6e-15) tmp = 1.0 / (a * (y / x)); else tmp = x / (y + (b * (y + (0.5 * (y * b))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -6.5e+42], N[(x * N[(N[(1.0 + N[(b * N[(-1.0 + N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.6e-15], N[(1.0 / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y + N[(b * N[(y + N[(0.5 * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.5 \cdot 10^{+42}:\\
\;\;\;\;x \cdot \frac{1 + b \cdot \left(-1 + b \cdot 0.5\right)}{y}\\
\mathbf{elif}\;b \leq 1.6 \cdot 10^{-15}:\\
\;\;\;\;\frac{1}{a \cdot \frac{y}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y + b \cdot \left(y + 0.5 \cdot \left(y \cdot b\right)\right)}\\
\end{array}
\end{array}
if b < -6.50000000000000052e42Initial program 100.0%
*-commutative100.0%
associate-/l*94.6%
associate--l+94.6%
fma-define94.6%
sub-neg94.6%
metadata-eval94.6%
Simplified94.6%
Taylor expanded in b around inf 84.1%
neg-mul-184.1%
Simplified84.1%
Taylor expanded in b around 0 62.2%
Taylor expanded in x around 0 63.9%
Taylor expanded in y around 0 69.0%
if -6.50000000000000052e42 < b < 1.6e-15Initial program 96.5%
associate-/l*95.7%
associate--l+95.7%
exp-sum83.0%
associate-/l*81.5%
*-commutative81.5%
exp-to-pow81.5%
exp-diff80.8%
*-commutative80.8%
exp-to-pow82.2%
sub-neg82.2%
metadata-eval82.2%
Simplified82.2%
Taylor expanded in t around 0 65.0%
associate-/r*71.7%
Simplified71.7%
Taylor expanded in y around 0 41.8%
*-commutative41.8%
associate-*l*41.8%
*-commutative41.8%
Simplified41.8%
Taylor expanded in b around 0 38.8%
clear-num38.2%
inv-pow38.2%
*-commutative38.2%
Applied egg-rr38.2%
unpow-138.2%
associate-/l*43.0%
Simplified43.0%
if 1.6e-15 < b Initial program 100.0%
*-commutative100.0%
associate-/l*77.3%
associate--l+77.3%
fma-define77.3%
sub-neg77.3%
metadata-eval77.3%
Simplified77.3%
Taylor expanded in b around inf 61.0%
neg-mul-161.0%
Simplified61.0%
exp-neg61.0%
frac-times73.2%
*-un-lft-identity73.2%
*-commutative73.2%
Applied egg-rr73.2%
Taylor expanded in b around 0 45.0%
Final simplification49.2%
(FPCore (x y z t a b) :precision binary64 (if (<= b -6.8e+48) (* x (- (/ 1.0 y) (/ b y))) (if (<= b 2.3e+54) (/ 1.0 (* a (/ y x))) (/ x (+ y (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -6.8e+48) {
tmp = x * ((1.0 / y) - (b / y));
} else if (b <= 2.3e+54) {
tmp = 1.0 / (a * (y / x));
} 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 <= (-6.8d+48)) then
tmp = x * ((1.0d0 / y) - (b / y))
else if (b <= 2.3d+54) then
tmp = 1.0d0 / (a * (y / x))
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 <= -6.8e+48) {
tmp = x * ((1.0 / y) - (b / y));
} else if (b <= 2.3e+54) {
tmp = 1.0 / (a * (y / x));
} else {
tmp = x / (y + (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -6.8e+48: tmp = x * ((1.0 / y) - (b / y)) elif b <= 2.3e+54: tmp = 1.0 / (a * (y / x)) else: tmp = x / (y + (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -6.8e+48) tmp = Float64(x * Float64(Float64(1.0 / y) - Float64(b / y))); elseif (b <= 2.3e+54) tmp = Float64(1.0 / Float64(a * Float64(y / x))); 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 <= -6.8e+48) tmp = x * ((1.0 / y) - (b / y)); elseif (b <= 2.3e+54) tmp = 1.0 / (a * (y / x)); else tmp = x / (y + (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -6.8e+48], N[(x * N[(N[(1.0 / y), $MachinePrecision] - N[(b / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.3e+54], N[(1.0 / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.8 \cdot 10^{+48}:\\
\;\;\;\;x \cdot \left(\frac{1}{y} - \frac{b}{y}\right)\\
\mathbf{elif}\;b \leq 2.3 \cdot 10^{+54}:\\
\;\;\;\;\frac{1}{a \cdot \frac{y}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y + y \cdot b}\\
\end{array}
\end{array}
if b < -6.8000000000000006e48Initial program 100.0%
*-commutative100.0%
associate-/l*94.6%
associate--l+94.6%
fma-define94.6%
sub-neg94.6%
metadata-eval94.6%
Simplified94.6%
Taylor expanded in b around inf 84.1%
neg-mul-184.1%
Simplified84.1%
Taylor expanded in b around 0 62.2%
Taylor expanded in x around 0 63.9%
Taylor expanded in b around 0 46.8%
+-commutative46.8%
mul-1-neg46.8%
unsub-neg46.8%
Simplified46.8%
if -6.8000000000000006e48 < b < 2.29999999999999994e54Initial program 96.9%
associate-/l*96.2%
associate--l+96.2%
exp-sum80.5%
associate-/l*79.2%
*-commutative79.2%
exp-to-pow79.2%
exp-diff76.6%
*-commutative76.6%
exp-to-pow77.9%
sub-neg77.9%
metadata-eval77.9%
Simplified77.9%
Taylor expanded in t around 0 62.8%
associate-/r*68.7%
Simplified68.7%
Taylor expanded in y around 0 43.9%
*-commutative43.9%
associate-*l*43.9%
*-commutative43.9%
Simplified43.9%
Taylor expanded in b around 0 36.8%
clear-num36.3%
inv-pow36.3%
*-commutative36.3%
Applied egg-rr36.3%
unpow-136.3%
associate-/l*39.3%
Simplified39.3%
if 2.29999999999999994e54 < b Initial program 100.0%
*-commutative100.0%
associate-/l*78.7%
associate--l+78.7%
fma-define78.7%
sub-neg78.7%
metadata-eval78.7%
Simplified78.7%
Taylor expanded in b around inf 64.2%
neg-mul-164.2%
Simplified64.2%
exp-neg64.2%
frac-times79.1%
*-un-lft-identity79.1%
*-commutative79.1%
Applied egg-rr79.1%
Taylor expanded in b around 0 37.9%
Final simplification40.7%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1600.0) (/ (* x (/ b (- a))) y) (if (<= b 1.96e+55) (/ 1.0 (* a (/ y x))) (/ x (+ y (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1600.0) {
tmp = (x * (b / -a)) / y;
} else if (b <= 1.96e+55) {
tmp = 1.0 / (a * (y / x));
} 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 <= (-1600.0d0)) then
tmp = (x * (b / -a)) / y
else if (b <= 1.96d+55) then
tmp = 1.0d0 / (a * (y / x))
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 <= -1600.0) {
tmp = (x * (b / -a)) / y;
} else if (b <= 1.96e+55) {
tmp = 1.0 / (a * (y / x));
} else {
tmp = x / (y + (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1600.0: tmp = (x * (b / -a)) / y elif b <= 1.96e+55: tmp = 1.0 / (a * (y / x)) else: tmp = x / (y + (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1600.0) tmp = Float64(Float64(x * Float64(b / Float64(-a))) / y); elseif (b <= 1.96e+55) tmp = Float64(1.0 / Float64(a * Float64(y / x))); 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 <= -1600.0) tmp = (x * (b / -a)) / y; elseif (b <= 1.96e+55) tmp = 1.0 / (a * (y / x)); else tmp = x / (y + (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1600.0], N[(N[(x * N[(b / (-a)), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 1.96e+55], N[(1.0 / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1600:\\
\;\;\;\;\frac{x \cdot \frac{b}{-a}}{y}\\
\mathbf{elif}\;b \leq 1.96 \cdot 10^{+55}:\\
\;\;\;\;\frac{1}{a \cdot \frac{y}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y + y \cdot b}\\
\end{array}
\end{array}
if b < -1600Initial program 100.0%
*-commutative100.0%
associate-/l*95.4%
associate--l+95.4%
fma-define95.4%
sub-neg95.4%
metadata-eval95.4%
Simplified95.4%
Taylor expanded in y around 0 90.9%
div-exp77.0%
associate-/l*67.8%
exp-to-pow67.8%
sub-neg67.8%
metadata-eval67.8%
Simplified67.8%
Taylor expanded in t around 0 86.4%
Taylor expanded in b around 0 45.1%
+-commutative45.1%
mul-1-neg45.1%
unsub-neg45.1%
*-commutative45.1%
associate-/l*42.1%
Simplified42.1%
Taylor expanded in b around inf 45.1%
mul-1-neg45.1%
*-commutative45.1%
associate-*r/42.1%
distribute-rgt-neg-in42.1%
distribute-neg-frac42.1%
Simplified42.1%
if -1600 < b < 1.96e55Initial program 96.7%
associate-/l*96.0%
associate--l+96.0%
exp-sum80.7%
associate-/l*79.3%
*-commutative79.3%
exp-to-pow79.3%
exp-diff77.2%
*-commutative77.2%
exp-to-pow78.6%
sub-neg78.6%
metadata-eval78.6%
Simplified78.6%
Taylor expanded in t around 0 62.6%
associate-/r*68.8%
Simplified68.8%
Taylor expanded in y around 0 42.4%
*-commutative42.4%
associate-*l*42.4%
*-commutative42.4%
Simplified42.4%
Taylor expanded in b around 0 37.5%
clear-num36.9%
inv-pow36.9%
*-commutative36.9%
Applied egg-rr36.9%
unpow-136.9%
associate-/l*38.8%
Simplified38.8%
if 1.96e55 < b Initial program 100.0%
*-commutative100.0%
associate-/l*78.7%
associate--l+78.7%
fma-define78.7%
sub-neg78.7%
metadata-eval78.7%
Simplified78.7%
Taylor expanded in b around inf 64.2%
neg-mul-164.2%
Simplified64.2%
exp-neg64.2%
frac-times79.1%
*-un-lft-identity79.1%
*-commutative79.1%
Applied egg-rr79.1%
Taylor expanded in b around 0 37.9%
Final simplification39.5%
(FPCore (x y z t a b) :precision binary64 (if (<= b -27500.0) (* (/ x y) (/ b (- a))) (if (<= b 1.1e+55) (/ 1.0 (* a (/ y x))) (/ x (+ y (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -27500.0) {
tmp = (x / y) * (b / -a);
} else if (b <= 1.1e+55) {
tmp = 1.0 / (a * (y / x));
} 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 <= (-27500.0d0)) then
tmp = (x / y) * (b / -a)
else if (b <= 1.1d+55) then
tmp = 1.0d0 / (a * (y / x))
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 <= -27500.0) {
tmp = (x / y) * (b / -a);
} else if (b <= 1.1e+55) {
tmp = 1.0 / (a * (y / x));
} else {
tmp = x / (y + (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -27500.0: tmp = (x / y) * (b / -a) elif b <= 1.1e+55: tmp = 1.0 / (a * (y / x)) else: tmp = x / (y + (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -27500.0) tmp = Float64(Float64(x / y) * Float64(b / Float64(-a))); elseif (b <= 1.1e+55) tmp = Float64(1.0 / Float64(a * Float64(y / x))); 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 <= -27500.0) tmp = (x / y) * (b / -a); elseif (b <= 1.1e+55) tmp = 1.0 / (a * (y / x)); else tmp = x / (y + (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -27500.0], N[(N[(x / y), $MachinePrecision] * N[(b / (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.1e+55], N[(1.0 / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -27500:\\
\;\;\;\;\frac{x}{y} \cdot \frac{b}{-a}\\
\mathbf{elif}\;b \leq 1.1 \cdot 10^{+55}:\\
\;\;\;\;\frac{1}{a \cdot \frac{y}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y + y \cdot b}\\
\end{array}
\end{array}
if b < -27500Initial program 100.0%
*-commutative100.0%
associate-/l*95.4%
associate--l+95.4%
fma-define95.4%
sub-neg95.4%
metadata-eval95.4%
Simplified95.4%
Taylor expanded in y around 0 90.9%
div-exp77.0%
associate-/l*67.8%
exp-to-pow67.8%
sub-neg67.8%
metadata-eval67.8%
Simplified67.8%
Taylor expanded in t around 0 86.4%
Taylor expanded in b around 0 45.1%
+-commutative45.1%
mul-1-neg45.1%
unsub-neg45.1%
*-commutative45.1%
associate-/l*42.1%
Simplified42.1%
Taylor expanded in b around inf 39.2%
mul-1-neg39.2%
times-frac39.1%
distribute-rgt-neg-in39.1%
distribute-neg-frac239.1%
Simplified39.1%
if -27500 < b < 1.10000000000000005e55Initial program 96.7%
associate-/l*96.0%
associate--l+96.0%
exp-sum80.7%
associate-/l*79.3%
*-commutative79.3%
exp-to-pow79.3%
exp-diff77.2%
*-commutative77.2%
exp-to-pow78.6%
sub-neg78.6%
metadata-eval78.6%
Simplified78.6%
Taylor expanded in t around 0 62.6%
associate-/r*68.8%
Simplified68.8%
Taylor expanded in y around 0 42.4%
*-commutative42.4%
associate-*l*42.4%
*-commutative42.4%
Simplified42.4%
Taylor expanded in b around 0 37.5%
clear-num36.9%
inv-pow36.9%
*-commutative36.9%
Applied egg-rr36.9%
unpow-136.9%
associate-/l*38.8%
Simplified38.8%
if 1.10000000000000005e55 < b Initial program 100.0%
*-commutative100.0%
associate-/l*78.7%
associate--l+78.7%
fma-define78.7%
sub-neg78.7%
metadata-eval78.7%
Simplified78.7%
Taylor expanded in b around inf 64.2%
neg-mul-164.2%
Simplified64.2%
exp-neg64.2%
frac-times79.1%
*-un-lft-identity79.1%
*-commutative79.1%
Applied egg-rr79.1%
Taylor expanded in b around 0 37.9%
Final simplification38.7%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1e+52) (* (- b) (/ x (* y a))) (if (<= b 7e+53) (/ 1.0 (* a (/ y x))) (/ x (+ y (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1e+52) {
tmp = -b * (x / (y * a));
} else if (b <= 7e+53) {
tmp = 1.0 / (a * (y / x));
} 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+52)) then
tmp = -b * (x / (y * a))
else if (b <= 7d+53) then
tmp = 1.0d0 / (a * (y / x))
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+52) {
tmp = -b * (x / (y * a));
} else if (b <= 7e+53) {
tmp = 1.0 / (a * (y / x));
} else {
tmp = x / (y + (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1e+52: tmp = -b * (x / (y * a)) elif b <= 7e+53: tmp = 1.0 / (a * (y / x)) else: tmp = x / (y + (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1e+52) tmp = Float64(Float64(-b) * Float64(x / Float64(y * a))); elseif (b <= 7e+53) tmp = Float64(1.0 / Float64(a * Float64(y / x))); 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+52) tmp = -b * (x / (y * a)); elseif (b <= 7e+53) tmp = 1.0 / (a * (y / x)); else tmp = x / (y + (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1e+52], N[((-b) * N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7e+53], N[(1.0 / N[(a * N[(y / x), $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^{+52}:\\
\;\;\;\;\left(-b\right) \cdot \frac{x}{y \cdot a}\\
\mathbf{elif}\;b \leq 7 \cdot 10^{+53}:\\
\;\;\;\;\frac{1}{a \cdot \frac{y}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y + y \cdot b}\\
\end{array}
\end{array}
if b < -9.9999999999999999e51Initial program 100.0%
*-commutative100.0%
associate-/l*94.5%
associate--l+94.5%
fma-define94.5%
sub-neg94.5%
metadata-eval94.5%
Simplified94.5%
Taylor expanded in y around 0 92.8%
div-exp78.2%
associate-/l*71.0%
exp-to-pow71.0%
sub-neg71.0%
metadata-eval71.0%
Simplified71.0%
Taylor expanded in t around 0 89.3%
Taylor expanded in b around 0 45.7%
+-commutative45.7%
mul-1-neg45.7%
unsub-neg45.7%
*-commutative45.7%
associate-/l*42.2%
Simplified42.2%
Taylor expanded in b around inf 38.7%
mul-1-neg38.7%
associate-/l*33.6%
Simplified33.6%
if -9.9999999999999999e51 < b < 7.00000000000000038e53Initial program 97.0%
associate-/l*96.2%
associate--l+96.2%
exp-sum80.7%
associate-/l*79.4%
*-commutative79.4%
exp-to-pow79.4%
exp-diff76.8%
*-commutative76.8%
exp-to-pow78.0%
sub-neg78.0%
metadata-eval78.0%
Simplified78.0%
Taylor expanded in t around 0 63.1%
associate-/r*68.9%
Simplified68.9%
Taylor expanded in y around 0 44.2%
*-commutative44.2%
associate-*l*44.2%
*-commutative44.2%
Simplified44.2%
Taylor expanded in b around 0 36.6%
clear-num36.0%
inv-pow36.0%
*-commutative36.0%
Applied egg-rr36.0%
unpow-136.0%
associate-/l*39.0%
Simplified39.0%
if 7.00000000000000038e53 < b Initial program 100.0%
*-commutative100.0%
associate-/l*78.7%
associate--l+78.7%
fma-define78.7%
sub-neg78.7%
metadata-eval78.7%
Simplified78.7%
Taylor expanded in b around inf 64.2%
neg-mul-164.2%
Simplified64.2%
exp-neg64.2%
frac-times79.1%
*-un-lft-identity79.1%
*-commutative79.1%
Applied egg-rr79.1%
Taylor expanded in b around 0 37.9%
Final simplification37.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.6) (- (/ x y) (/ (* x b) y)) (/ (/ x (+ a (* a b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.6) {
tmp = (x / y) - ((x * b) / y);
} else {
tmp = (x / (a + (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 (b <= (-1.6d0)) then
tmp = (x / y) - ((x * b) / y)
else
tmp = (x / (a + (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 (b <= -1.6) {
tmp = (x / y) - ((x * b) / y);
} else {
tmp = (x / (a + (a * b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.6: tmp = (x / y) - ((x * b) / y) else: tmp = (x / (a + (a * b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.6) tmp = Float64(Float64(x / y) - Float64(Float64(x * b) / y)); else tmp = Float64(Float64(x / Float64(a + Float64(a * b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.6) tmp = (x / y) - ((x * b) / y); else tmp = (x / (a + (a * b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.6], N[(N[(x / y), $MachinePrecision] - N[(N[(x * b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.6:\\
\;\;\;\;\frac{x}{y} - \frac{x \cdot b}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a + a \cdot b}}{y}\\
\end{array}
\end{array}
if b < -1.6000000000000001Initial program 100.0%
*-commutative100.0%
associate-/l*95.4%
associate--l+95.4%
fma-define95.4%
sub-neg95.4%
metadata-eval95.4%
Simplified95.4%
Taylor expanded in b around inf 81.7%
neg-mul-181.7%
Simplified81.7%
Taylor expanded in b around 0 48.1%
if -1.6000000000000001 < b Initial program 97.5%
*-commutative97.5%
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 78.2%
div-exp72.4%
associate-/l*70.9%
exp-to-pow71.7%
sub-neg71.7%
metadata-eval71.7%
Simplified71.7%
Taylor expanded in t around 0 52.2%
Taylor expanded in b around 0 38.7%
Final simplification41.1%
(FPCore (x y z t a b) :precision binary64 (if (<= b -102000.0) (* x (- (/ 1.0 y) (/ b y))) (/ (/ x (+ a (* a b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -102000.0) {
tmp = x * ((1.0 / y) - (b / y));
} else {
tmp = (x / (a + (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 (b <= (-102000.0d0)) then
tmp = x * ((1.0d0 / y) - (b / y))
else
tmp = (x / (a + (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 (b <= -102000.0) {
tmp = x * ((1.0 / y) - (b / y));
} else {
tmp = (x / (a + (a * b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -102000.0: tmp = x * ((1.0 / y) - (b / y)) else: tmp = (x / (a + (a * b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -102000.0) tmp = Float64(x * Float64(Float64(1.0 / y) - Float64(b / y))); else tmp = Float64(Float64(x / Float64(a + Float64(a * b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -102000.0) tmp = x * ((1.0 / y) - (b / y)); else tmp = (x / (a + (a * b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -102000.0], N[(x * N[(N[(1.0 / y), $MachinePrecision] - N[(b / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -102000:\\
\;\;\;\;x \cdot \left(\frac{1}{y} - \frac{b}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a + a \cdot b}}{y}\\
\end{array}
\end{array}
if b < -102000Initial program 100.0%
*-commutative100.0%
associate-/l*95.4%
associate--l+95.4%
fma-define95.4%
sub-neg95.4%
metadata-eval95.4%
Simplified95.4%
Taylor expanded in b around inf 81.7%
neg-mul-181.7%
Simplified81.7%
Taylor expanded in b around 0 61.4%
Taylor expanded in x around 0 61.4%
Taylor expanded in b around 0 46.7%
+-commutative46.7%
mul-1-neg46.7%
unsub-neg46.7%
Simplified46.7%
if -102000 < b Initial program 97.5%
*-commutative97.5%
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 78.2%
div-exp72.4%
associate-/l*70.9%
exp-to-pow71.7%
sub-neg71.7%
metadata-eval71.7%
Simplified71.7%
Taylor expanded in t around 0 52.2%
Taylor expanded in b around 0 38.7%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.52) (* x (- (/ 1.0 y) (/ b y))) (/ x (* y (+ a (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.52) {
tmp = x * ((1.0 / y) - (b / y));
} else {
tmp = x / (y * (a + (a * 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.52d0)) then
tmp = x * ((1.0d0 / y) - (b / y))
else
tmp = x / (y * (a + (a * 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.52) {
tmp = x * ((1.0 / y) - (b / y));
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.52: tmp = x * ((1.0 / y) - (b / y)) else: tmp = x / (y * (a + (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.52) tmp = Float64(x * Float64(Float64(1.0 / y) - Float64(b / y))); else tmp = Float64(x / Float64(y * Float64(a + Float64(a * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.52) tmp = x * ((1.0 / y) - (b / y)); else tmp = x / (y * (a + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.52], N[(x * N[(N[(1.0 / y), $MachinePrecision] - N[(b / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.52:\\
\;\;\;\;x \cdot \left(\frac{1}{y} - \frac{b}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\
\end{array}
\end{array}
if b < -1.52Initial program 100.0%
*-commutative100.0%
associate-/l*95.4%
associate--l+95.4%
fma-define95.4%
sub-neg95.4%
metadata-eval95.4%
Simplified95.4%
Taylor expanded in b around inf 81.7%
neg-mul-181.7%
Simplified81.7%
Taylor expanded in b around 0 61.4%
Taylor expanded in x around 0 61.4%
Taylor expanded in b around 0 46.7%
+-commutative46.7%
mul-1-neg46.7%
unsub-neg46.7%
Simplified46.7%
if -1.52 < b Initial program 97.5%
associate-/l*97.0%
associate--l+97.0%
exp-sum75.0%
associate-/l*73.9%
*-commutative73.9%
exp-to-pow73.9%
exp-diff70.3%
*-commutative70.3%
exp-to-pow71.3%
sub-neg71.3%
metadata-eval71.3%
Simplified71.3%
Taylor expanded in t around 0 60.8%
associate-/r*65.5%
Simplified65.5%
Taylor expanded in y around 0 51.4%
*-commutative51.4%
associate-*l*51.4%
*-commutative51.4%
Simplified51.4%
Taylor expanded in b around 0 38.1%
(FPCore (x y z t a b) :precision binary64 (if (<= b 1.26e+54) (/ 1.0 (* a (/ y x))) (/ x (+ y (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 1.26e+54) {
tmp = 1.0 / (a * (y / x));
} 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.26d+54) then
tmp = 1.0d0 / (a * (y / x))
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.26e+54) {
tmp = 1.0 / (a * (y / x));
} else {
tmp = x / (y + (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 1.26e+54: tmp = 1.0 / (a * (y / x)) else: tmp = x / (y + (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 1.26e+54) tmp = Float64(1.0 / Float64(a * Float64(y / x))); 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.26e+54) tmp = 1.0 / (a * (y / x)); else tmp = x / (y + (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 1.26e+54], N[(1.0 / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.26 \cdot 10^{+54}:\\
\;\;\;\;\frac{1}{a \cdot \frac{y}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y + y \cdot b}\\
\end{array}
\end{array}
if b < 1.25999999999999995e54Initial program 97.8%
associate-/l*97.2%
associate--l+97.2%
exp-sum80.5%
associate-/l*79.5%
*-commutative79.5%
exp-to-pow79.5%
exp-diff73.8%
*-commutative73.8%
exp-to-pow74.7%
sub-neg74.7%
metadata-eval74.7%
Simplified74.7%
Taylor expanded in t around 0 66.6%
associate-/r*70.9%
Simplified70.9%
Taylor expanded in y around 0 56.1%
*-commutative56.1%
associate-*l*56.1%
*-commutative56.1%
Simplified56.1%
Taylor expanded in b around 0 32.0%
clear-num31.6%
inv-pow31.6%
*-commutative31.6%
Applied egg-rr31.6%
unpow-131.6%
associate-/l*32.9%
Simplified32.9%
if 1.25999999999999995e54 < b Initial program 100.0%
*-commutative100.0%
associate-/l*78.7%
associate--l+78.7%
fma-define78.7%
sub-neg78.7%
metadata-eval78.7%
Simplified78.7%
Taylor expanded in b around inf 64.2%
neg-mul-164.2%
Simplified64.2%
exp-neg64.2%
frac-times79.1%
*-un-lft-identity79.1%
*-commutative79.1%
Applied egg-rr79.1%
Taylor expanded in b around 0 37.9%
Final simplification33.8%
(FPCore (x y z t a b) :precision binary64 (if (<= a 7e+33) (/ (/ x a) y) (* x (/ 1.0 (* y a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 7e+33) {
tmp = (x / a) / 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 (a <= 7d+33) then
tmp = (x / a) / 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 (a <= 7e+33) {
tmp = (x / a) / y;
} else {
tmp = x * (1.0 / (y * a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= 7e+33: tmp = (x / a) / y else: tmp = x * (1.0 / (y * a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= 7e+33) tmp = Float64(Float64(x / a) / 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 (a <= 7e+33) tmp = (x / a) / y; else tmp = x * (1.0 / (y * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, 7e+33], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(x * N[(1.0 / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 7 \cdot 10^{+33}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1}{y \cdot a}\\
\end{array}
\end{array}
if a < 7.0000000000000002e33Initial program 99.1%
*-commutative99.1%
associate-/l*90.1%
associate--l+90.1%
fma-define90.1%
sub-neg90.1%
metadata-eval90.1%
Simplified90.1%
Taylor expanded in y around 0 80.8%
div-exp74.8%
associate-/l*72.5%
exp-to-pow73.2%
sub-neg73.2%
metadata-eval73.2%
Simplified73.2%
Taylor expanded in t around 0 60.7%
Taylor expanded in b around 0 34.2%
if 7.0000000000000002e33 < a Initial program 97.2%
associate-/l*99.1%
associate--l+99.1%
exp-sum78.6%
associate-/l*77.0%
*-commutative77.0%
exp-to-pow77.0%
exp-diff68.8%
*-commutative68.8%
exp-to-pow69.6%
sub-neg69.6%
metadata-eval69.6%
Simplified69.6%
Taylor expanded in t around 0 61.1%
associate-/r*68.4%
Simplified68.4%
Taylor expanded in y around 0 64.0%
*-commutative64.0%
associate-*l*64.0%
*-commutative64.0%
Simplified64.0%
Taylor expanded in b around 0 33.1%
div-inv33.1%
*-commutative33.1%
Applied egg-rr33.1%
Final simplification33.7%
(FPCore (x y z t a b) :precision binary64 (if (<= a 5e-44) (/ (/ x a) y) (/ x (* y a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 5e-44) {
tmp = (x / a) / y;
} else {
tmp = x / (y * a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= 5d-44) then
tmp = (x / a) / y
else
tmp = x / (y * a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 5e-44) {
tmp = (x / a) / y;
} else {
tmp = x / (y * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= 5e-44: tmp = (x / a) / y else: tmp = x / (y * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= 5e-44) tmp = Float64(Float64(x / a) / y); else tmp = Float64(x / Float64(y * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= 5e-44) tmp = (x / a) / y; else tmp = x / (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, 5e-44], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 5 \cdot 10^{-44}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\end{array}
\end{array}
if a < 5.00000000000000039e-44Initial program 99.0%
*-commutative99.0%
associate-/l*89.7%
associate--l+89.7%
fma-define89.7%
sub-neg89.7%
metadata-eval89.7%
Simplified89.7%
Taylor expanded in y around 0 80.6%
div-exp75.0%
associate-/l*72.2%
exp-to-pow72.9%
sub-neg72.9%
metadata-eval72.9%
Simplified72.9%
Taylor expanded in t around 0 61.5%
Taylor expanded in b around 0 36.5%
if 5.00000000000000039e-44 < a Initial program 97.6%
associate-/l*99.1%
associate--l+99.1%
exp-sum77.7%
associate-/l*76.3%
*-commutative76.3%
exp-to-pow76.3%
exp-diff68.9%
*-commutative68.9%
exp-to-pow69.8%
sub-neg69.8%
metadata-eval69.8%
Simplified69.8%
Taylor expanded in t around 0 60.2%
associate-/r*66.2%
Simplified66.2%
Taylor expanded in y around 0 62.8%
*-commutative62.8%
associate-*l*62.8%
*-commutative62.8%
Simplified62.8%
Taylor expanded in b around 0 31.6%
(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.2%
associate-/l*97.7%
associate--l+97.7%
exp-sum76.3%
associate-/l*75.5%
*-commutative75.5%
exp-to-pow75.5%
exp-diff69.2%
*-commutative69.2%
exp-to-pow70.0%
sub-neg70.0%
metadata-eval70.0%
Simplified70.0%
Taylor expanded in t around 0 64.5%
associate-/r*68.0%
Simplified68.0%
Taylor expanded in y around 0 60.3%
*-commutative60.3%
associate-*l*60.3%
*-commutative60.3%
Simplified60.3%
Taylor expanded in b around 0 30.8%
(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.2%
*-commutative98.2%
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 45.0%
neg-mul-145.0%
Simplified45.0%
Taylor expanded in b around 0 14.1%
(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 2024086
(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))