
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (+ t -1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t + -1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t + (-1.0d0)) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t + -1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t + -1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t + -1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t + -1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t + -1\right) \cdot \log a\right) - b}}{y}
\end{array}
Initial program 98.4%
Final simplification98.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2e+52) (not (<= y 1.85e+48))) (/ (* x (exp (- (- (* y (log z)) (log a)) b))) y) (/ (* x (exp (- (* (+ t -1.0) (log a)) b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2e+52) || !(y <= 1.85e+48)) {
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y;
} else {
tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-2d+52)) .or. (.not. (y <= 1.85d+48))) then
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y
else
tmp = (x * exp((((t + (-1.0d0)) * log(a)) - b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2e+52) || !(y <= 1.85e+48)) {
tmp = (x * Math.exp((((y * Math.log(z)) - Math.log(a)) - b))) / y;
} else {
tmp = (x * Math.exp((((t + -1.0) * Math.log(a)) - b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2e+52) or not (y <= 1.85e+48): tmp = (x * math.exp((((y * math.log(z)) - math.log(a)) - b))) / y else: tmp = (x * math.exp((((t + -1.0) * math.log(a)) - b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2e+52) || !(y <= 1.85e+48)) tmp = Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) - log(a)) - b))) / y); else tmp = Float64(Float64(x * exp(Float64(Float64(Float64(t + -1.0) * log(a)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2e+52) || ~((y <= 1.85e+48))) tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y; else tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2e+52], N[Not[LessEqual[y, 1.85e+48]], $MachinePrecision]], N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] - N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{+52} \lor \neg \left(y \leq 1.85 \cdot 10^{+48}\right):\\
\;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z - \log a\right) - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(t + -1\right) \cdot \log a - b}}{y}\\
\end{array}
\end{array}
if y < -2e52 or 1.85e48 < y Initial program 100.0%
Taylor expanded in t around 0 90.9%
+-commutative90.9%
mul-1-neg90.9%
unsub-neg90.9%
Simplified90.9%
if -2e52 < y < 1.85e48Initial program 97.5%
Taylor expanded in y around 0 96.3%
Final simplification94.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.9e+165) (not (<= y 5.1e+126))) (/ (* x (/ (pow z y) a)) y) (/ (* x (exp (- (* (+ t -1.0) (log a)) b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.9e+165) || !(y <= 5.1e+126)) {
tmp = (x * (pow(z, y) / a)) / y;
} else {
tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.9d+165)) .or. (.not. (y <= 5.1d+126))) then
tmp = (x * ((z ** y) / a)) / y
else
tmp = (x * exp((((t + (-1.0d0)) * log(a)) - b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.9e+165) || !(y <= 5.1e+126)) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else {
tmp = (x * Math.exp((((t + -1.0) * Math.log(a)) - b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.9e+165) or not (y <= 5.1e+126): tmp = (x * (math.pow(z, y) / a)) / y else: tmp = (x * math.exp((((t + -1.0) * math.log(a)) - b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.9e+165) || !(y <= 5.1e+126)) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = Float64(Float64(x * exp(Float64(Float64(Float64(t + -1.0) * log(a)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.9e+165) || ~((y <= 5.1e+126))) tmp = (x * ((z ^ y) / a)) / y; else tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.9e+165], N[Not[LessEqual[y, 5.1e+126]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{+165} \lor \neg \left(y \leq 5.1 \cdot 10^{+126}\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(t + -1\right) \cdot \log a - b}}{y}\\
\end{array}
\end{array}
if y < -1.89999999999999995e165 or 5.1000000000000001e126 < y Initial program 100.0%
Taylor expanded in t around 0 92.4%
+-commutative92.4%
mul-1-neg92.4%
unsub-neg92.4%
Simplified92.4%
Taylor expanded in b around 0 92.4%
div-exp92.4%
*-commutative92.4%
exp-to-pow92.4%
rem-exp-log92.4%
Simplified92.4%
if -1.89999999999999995e165 < y < 5.1000000000000001e126Initial program 97.9%
Taylor expanded in y around 0 91.9%
Final simplification92.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -27000000000000.0) (not (<= y 7.6e+64))) (/ (* x (/ (pow z y) a)) y) (* x (/ (/ (/ (pow a t) a) y) (exp b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -27000000000000.0) || !(y <= 7.6e+64)) {
tmp = (x * (pow(z, y) / a)) / y;
} else {
tmp = x * (((pow(a, t) / a) / y) / exp(b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-27000000000000.0d0)) .or. (.not. (y <= 7.6d+64))) then
tmp = (x * ((z ** y) / a)) / y
else
tmp = x * ((((a ** t) / a) / y) / exp(b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -27000000000000.0) || !(y <= 7.6e+64)) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else {
tmp = x * (((Math.pow(a, t) / a) / y) / Math.exp(b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -27000000000000.0) or not (y <= 7.6e+64): tmp = (x * (math.pow(z, y) / a)) / y else: tmp = x * (((math.pow(a, t) / a) / y) / math.exp(b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -27000000000000.0) || !(y <= 7.6e+64)) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = Float64(x * Float64(Float64(Float64((a ^ t) / a) / y) / exp(b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -27000000000000.0) || ~((y <= 7.6e+64))) tmp = (x * ((z ^ y) / a)) / y; else tmp = x * ((((a ^ t) / a) / y) / exp(b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -27000000000000.0], N[Not[LessEqual[y, 7.6e+64]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x * N[(N[(N[(N[Power[a, t], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -27000000000000 \lor \neg \left(y \leq 7.6 \cdot 10^{+64}\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\frac{\frac{{a}^{t}}{a}}{y}}{e^{b}}\\
\end{array}
\end{array}
if y < -2.7e13 or 7.6000000000000002e64 < y Initial program 100.0%
Taylor expanded in t around 0 90.3%
+-commutative90.3%
mul-1-neg90.3%
unsub-neg90.3%
Simplified90.3%
Taylor expanded in b around 0 83.6%
div-exp83.6%
*-commutative83.6%
exp-to-pow83.6%
rem-exp-log83.6%
Simplified83.6%
if -2.7e13 < y < 7.6000000000000002e64Initial program 97.4%
associate-/l*97.8%
associate--l+97.8%
exp-sum94.6%
associate-/l*94.6%
*-commutative94.6%
exp-to-pow94.6%
exp-diff83.5%
*-commutative83.5%
exp-to-pow84.3%
sub-neg84.3%
metadata-eval84.3%
Simplified84.3%
Taylor expanded in y around 0 81.2%
exp-to-pow81.9%
sub-neg81.9%
metadata-eval81.9%
associate-*r/86.9%
associate-/r*81.7%
Simplified81.7%
unpow-prod-up81.8%
unpow-181.8%
Applied egg-rr81.8%
associate-*r/81.8%
*-rgt-identity81.8%
Simplified81.8%
Final simplification82.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.3e+16) (not (<= y 2.5e+66))) (/ (* 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 <= -1.3e+16) || !(y <= 2.5e+66)) {
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 <= (-1.3d+16)) .or. (.not. (y <= 2.5d+66))) 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 <= -1.3e+16) || !(y <= 2.5e+66)) {
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 <= -1.3e+16) or not (y <= 2.5e+66): 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 <= -1.3e+16) || !(y <= 2.5e+66)) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = Float64(Float64(x * Float64((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 <= -1.3e+16) || ~((y <= 2.5e+66))) 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, -1.3e+16], N[Not[LessEqual[y, 2.5e+66]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{+16} \lor \neg \left(y \leq 2.5 \cdot 10^{+66}\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \frac{{a}^{\left(t + -1\right)}}{e^{b}}}{y}\\
\end{array}
\end{array}
if y < -1.3e16 or 2.49999999999999996e66 < y Initial program 100.0%
Taylor expanded in t around 0 90.3%
+-commutative90.3%
mul-1-neg90.3%
unsub-neg90.3%
Simplified90.3%
Taylor expanded in b around 0 83.6%
div-exp83.6%
*-commutative83.6%
exp-to-pow83.6%
rem-exp-log83.6%
Simplified83.6%
if -1.3e16 < y < 2.49999999999999996e66Initial program 97.4%
Taylor expanded in y around 0 96.8%
div-exp85.7%
exp-to-pow86.4%
sub-neg86.4%
metadata-eval86.4%
Simplified86.4%
Final simplification85.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= (+ t -1.0) -1e+78)
(* x (/ (pow a t) (* y a)))
(if (<= (+ t -1.0) -0.5)
(/ x (* a (* y (exp b))))
(* x (/ (pow a (+ t -1.0)) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t + -1.0) <= -1e+78) {
tmp = x * (pow(a, t) / (y * a));
} else if ((t + -1.0) <= -0.5) {
tmp = x / (a * (y * exp(b)));
} else {
tmp = x * (pow(a, (t + -1.0)) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t + (-1.0d0)) <= (-1d+78)) then
tmp = x * ((a ** t) / (y * a))
else if ((t + (-1.0d0)) <= (-0.5d0)) then
tmp = x / (a * (y * exp(b)))
else
tmp = x * ((a ** (t + (-1.0d0))) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t + -1.0) <= -1e+78) {
tmp = x * (Math.pow(a, t) / (y * a));
} else if ((t + -1.0) <= -0.5) {
tmp = x / (a * (y * Math.exp(b)));
} else {
tmp = x * (Math.pow(a, (t + -1.0)) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t + -1.0) <= -1e+78: tmp = x * (math.pow(a, t) / (y * a)) elif (t + -1.0) <= -0.5: tmp = x / (a * (y * math.exp(b))) else: tmp = x * (math.pow(a, (t + -1.0)) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(t + -1.0) <= -1e+78) tmp = Float64(x * Float64((a ^ t) / Float64(y * a))); elseif (Float64(t + -1.0) <= -0.5) tmp = Float64(x / Float64(a * Float64(y * exp(b)))); else tmp = Float64(x * Float64((a ^ Float64(t + -1.0)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t + -1.0) <= -1e+78) tmp = x * ((a ^ t) / (y * a)); elseif ((t + -1.0) <= -0.5) tmp = x / (a * (y * exp(b))); else tmp = x * ((a ^ (t + -1.0)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(t + -1.0), $MachinePrecision], -1e+78], N[(x * N[(N[Power[a, t], $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(t + -1.0), $MachinePrecision], -0.5], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t + -1 \leq -1 \cdot 10^{+78}:\\
\;\;\;\;x \cdot \frac{{a}^{t}}{y \cdot a}\\
\mathbf{elif}\;t + -1 \leq -0.5:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{{a}^{\left(t + -1\right)}}{y}\\
\end{array}
\end{array}
if (-.f64 t #s(literal 1 binary64)) < -1.00000000000000001e78Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum70.0%
associate-/l*70.0%
*-commutative70.0%
exp-to-pow70.0%
exp-diff54.0%
*-commutative54.0%
exp-to-pow54.0%
sub-neg54.0%
metadata-eval54.0%
Simplified54.0%
Taylor expanded in y around 0 70.2%
exp-to-pow70.2%
sub-neg70.2%
metadata-eval70.2%
associate-*r/70.2%
associate-/r*70.2%
Simplified70.2%
unpow-prod-up70.2%
unpow-170.2%
Applied egg-rr70.2%
associate-*r/70.2%
*-rgt-identity70.2%
Simplified70.2%
Taylor expanded in b around 0 80.3%
if -1.00000000000000001e78 < (-.f64 t #s(literal 1 binary64)) < -0.5Initial program 97.2%
associate-/l*97.7%
associate--l+97.7%
exp-sum86.8%
associate-/l*86.8%
*-commutative86.8%
exp-to-pow86.8%
exp-diff82.6%
*-commutative82.6%
exp-to-pow83.4%
sub-neg83.4%
metadata-eval83.4%
Simplified83.4%
Taylor expanded in y around 0 64.9%
exp-to-pow65.7%
sub-neg65.7%
metadata-eval65.7%
associate-*r/73.0%
associate-/r*66.1%
Simplified66.1%
Taylor expanded in t around 0 77.2%
if -0.5 < (-.f64 t #s(literal 1 binary64)) Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum80.0%
associate-/l*80.0%
*-commutative80.0%
exp-to-pow80.0%
exp-diff65.0%
*-commutative65.0%
exp-to-pow65.0%
sub-neg65.0%
metadata-eval65.0%
Simplified65.0%
Taylor expanded in y around 0 70.2%
exp-to-pow70.2%
sub-neg70.2%
metadata-eval70.2%
associate-*r/70.2%
associate-/r*70.2%
Simplified70.2%
Taylor expanded in b around 0 83.6%
Simplified83.6%
Final simplification79.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -55.0) (not (<= b 1.9e-72))) (/ x (* a (* y (exp b)))) (* x (/ (pow a t) (* y a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -55.0) || !(b <= 1.9e-72)) {
tmp = x / (a * (y * exp(b)));
} else {
tmp = x * (pow(a, t) / (y * a));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-55.0d0)) .or. (.not. (b <= 1.9d-72))) then
tmp = x / (a * (y * exp(b)))
else
tmp = x * ((a ** t) / (y * a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -55.0) || !(b <= 1.9e-72)) {
tmp = x / (a * (y * Math.exp(b)));
} else {
tmp = x * (Math.pow(a, t) / (y * a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -55.0) or not (b <= 1.9e-72): tmp = x / (a * (y * math.exp(b))) else: tmp = x * (math.pow(a, t) / (y * a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -55.0) || !(b <= 1.9e-72)) tmp = Float64(x / Float64(a * Float64(y * exp(b)))); else tmp = Float64(x * Float64((a ^ t) / Float64(y * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -55.0) || ~((b <= 1.9e-72))) tmp = x / (a * (y * exp(b))); else tmp = x * ((a ^ t) / (y * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -55.0], N[Not[LessEqual[b, 1.9e-72]], $MachinePrecision]], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Power[a, t], $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -55 \lor \neg \left(b \leq 1.9 \cdot 10^{-72}\right):\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{{a}^{t}}{y \cdot a}\\
\end{array}
\end{array}
if b < -55 or 1.90000000000000001e-72 < b Initial program 99.4%
associate-/l*99.2%
associate--l+99.2%
exp-sum79.8%
associate-/l*79.8%
*-commutative79.8%
exp-to-pow79.8%
exp-diff63.2%
*-commutative63.2%
exp-to-pow63.3%
sub-neg63.3%
metadata-eval63.3%
Simplified63.3%
Taylor expanded in y around 0 60.7%
exp-to-pow60.8%
sub-neg60.8%
metadata-eval60.8%
associate-*r/67.8%
associate-/r*60.6%
Simplified60.6%
Taylor expanded in t around 0 79.5%
if -55 < b < 1.90000000000000001e-72Initial program 97.3%
associate-/l*98.1%
associate--l+98.1%
exp-sum84.4%
associate-/l*84.4%
*-commutative84.4%
exp-to-pow84.4%
exp-diff84.4%
*-commutative84.4%
exp-to-pow85.3%
sub-neg85.3%
metadata-eval85.3%
Simplified85.3%
Taylor expanded in y around 0 74.9%
exp-to-pow75.7%
sub-neg75.7%
metadata-eval75.7%
associate-*r/76.5%
associate-/r*76.5%
Simplified76.5%
unpow-prod-up76.7%
unpow-176.7%
Applied egg-rr76.7%
associate-*r/76.7%
*-rgt-identity76.7%
Simplified76.7%
Taylor expanded in b around 0 70.7%
Final simplification75.5%
(FPCore (x y z t a b) :precision binary64 (/ x (* a (* y (exp b)))))
double code(double x, double y, double z, double t, double a, double b) {
return x / (a * (y * exp(b)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x / (a * (y * exp(b)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / (a * (y * Math.exp(b)));
}
def code(x, y, z, t, a, b): return x / (a * (y * math.exp(b)))
function code(x, y, z, t, a, b) return Float64(x / Float64(a * Float64(y * exp(b)))) end
function tmp = code(x, y, z, t, a, b) tmp = x / (a * (y * exp(b))); end
code[x_, y_, z_, t_, a_, b_] := N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{a \cdot \left(y \cdot e^{b}\right)}
\end{array}
Initial program 98.4%
associate-/l*98.7%
associate--l+98.7%
exp-sum81.9%
associate-/l*81.9%
*-commutative81.9%
exp-to-pow81.9%
exp-diff72.9%
*-commutative72.9%
exp-to-pow73.3%
sub-neg73.3%
metadata-eval73.3%
Simplified73.3%
Taylor expanded in y around 0 67.2%
exp-to-pow67.6%
sub-neg67.6%
metadata-eval67.6%
associate-*r/71.8%
associate-/r*67.9%
Simplified67.9%
Taylor expanded in t around 0 61.5%
Final simplification61.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (* y a))) (t_2 (* t_1 0.5)))
(if (<= b -6e+219)
(+
t_1
(*
b
(-
(*
b
(+
(- t_1 t_2)
(* b (- (- t_2 t_1) (+ (* -0.5 t_1) (* t_1 0.16666666666666666))))))
t_1)))
(if (<= b -2e-289)
(/ (- (/ x a) (/ (* x b) a)) y)
(/
x
(*
y
(+
a
(*
b
(+ a (* b (+ (* 0.16666666666666666 (* a b)) (* a 0.5))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (y * a);
double t_2 = t_1 * 0.5;
double tmp;
if (b <= -6e+219) {
tmp = t_1 + (b * ((b * ((t_1 - t_2) + (b * ((t_2 - t_1) - ((-0.5 * t_1) + (t_1 * 0.16666666666666666)))))) - t_1));
} else if (b <= -2e-289) {
tmp = ((x / a) - ((x * b) / a)) / y;
} else {
tmp = x / (y * (a + (b * (a + (b * ((0.16666666666666666 * (a * b)) + (a * 0.5)))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x / (y * a)
t_2 = t_1 * 0.5d0
if (b <= (-6d+219)) then
tmp = t_1 + (b * ((b * ((t_1 - t_2) + (b * ((t_2 - t_1) - (((-0.5d0) * t_1) + (t_1 * 0.16666666666666666d0)))))) - t_1))
else if (b <= (-2d-289)) then
tmp = ((x / a) - ((x * b) / a)) / y
else
tmp = x / (y * (a + (b * (a + (b * ((0.16666666666666666d0 * (a * b)) + (a * 0.5d0)))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (y * a);
double t_2 = t_1 * 0.5;
double tmp;
if (b <= -6e+219) {
tmp = t_1 + (b * ((b * ((t_1 - t_2) + (b * ((t_2 - t_1) - ((-0.5 * t_1) + (t_1 * 0.16666666666666666)))))) - t_1));
} else if (b <= -2e-289) {
tmp = ((x / a) - ((x * b) / a)) / y;
} else {
tmp = x / (y * (a + (b * (a + (b * ((0.16666666666666666 * (a * b)) + (a * 0.5)))))));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (y * a) t_2 = t_1 * 0.5 tmp = 0 if b <= -6e+219: tmp = t_1 + (b * ((b * ((t_1 - t_2) + (b * ((t_2 - t_1) - ((-0.5 * t_1) + (t_1 * 0.16666666666666666)))))) - t_1)) elif b <= -2e-289: tmp = ((x / a) - ((x * b) / a)) / y else: tmp = x / (y * (a + (b * (a + (b * ((0.16666666666666666 * (a * b)) + (a * 0.5))))))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(y * a)) t_2 = Float64(t_1 * 0.5) tmp = 0.0 if (b <= -6e+219) tmp = Float64(t_1 + Float64(b * Float64(Float64(b * Float64(Float64(t_1 - t_2) + Float64(b * Float64(Float64(t_2 - t_1) - Float64(Float64(-0.5 * t_1) + Float64(t_1 * 0.16666666666666666)))))) - t_1))); elseif (b <= -2e-289) tmp = Float64(Float64(Float64(x / a) - Float64(Float64(x * b) / a)) / y); else tmp = Float64(x / Float64(y * Float64(a + Float64(b * Float64(a + Float64(b * Float64(Float64(0.16666666666666666 * Float64(a * b)) + Float64(a * 0.5)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (y * a); t_2 = t_1 * 0.5; tmp = 0.0; if (b <= -6e+219) tmp = t_1 + (b * ((b * ((t_1 - t_2) + (b * ((t_2 - t_1) - ((-0.5 * t_1) + (t_1 * 0.16666666666666666)))))) - t_1)); elseif (b <= -2e-289) tmp = ((x / a) - ((x * b) / a)) / y; else tmp = x / (y * (a + (b * (a + (b * ((0.16666666666666666 * (a * b)) + (a * 0.5))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * 0.5), $MachinePrecision]}, If[LessEqual[b, -6e+219], N[(t$95$1 + N[(b * N[(N[(b * N[(N[(t$95$1 - t$95$2), $MachinePrecision] + N[(b * N[(N[(t$95$2 - t$95$1), $MachinePrecision] - N[(N[(-0.5 * t$95$1), $MachinePrecision] + N[(t$95$1 * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -2e-289], N[(N[(N[(x / a), $MachinePrecision] - N[(N[(x * b), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * N[(a + N[(b * N[(a + N[(b * N[(N[(0.16666666666666666 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(a * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y \cdot a}\\
t_2 := t\_1 \cdot 0.5\\
\mathbf{if}\;b \leq -6 \cdot 10^{+219}:\\
\;\;\;\;t\_1 + b \cdot \left(b \cdot \left(\left(t\_1 - t\_2\right) + b \cdot \left(\left(t\_2 - t\_1\right) - \left(-0.5 \cdot t\_1 + t\_1 \cdot 0.16666666666666666\right)\right)\right) - t\_1\right)\\
\mathbf{elif}\;b \leq -2 \cdot 10^{-289}:\\
\;\;\;\;\frac{\frac{x}{a} - \frac{x \cdot b}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + b \cdot \left(a + b \cdot \left(0.16666666666666666 \cdot \left(a \cdot b\right) + a \cdot 0.5\right)\right)\right)}\\
\end{array}
\end{array}
if b < -5.9999999999999995e219Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum87.5%
associate-/l*87.5%
*-commutative87.5%
exp-to-pow87.5%
exp-diff56.3%
*-commutative56.3%
exp-to-pow56.3%
sub-neg56.3%
metadata-eval56.3%
Simplified56.3%
Taylor expanded in y around 0 50.0%
exp-to-pow50.0%
sub-neg50.0%
metadata-eval50.0%
associate-*r/56.3%
associate-/r*56.3%
Simplified56.3%
Taylor expanded in t around 0 93.8%
Taylor expanded in b around 0 81.3%
if -5.9999999999999995e219 < b < -2e-289Initial program 99.0%
associate-/l*98.6%
associate--l+98.6%
exp-sum76.7%
associate-/l*76.7%
*-commutative76.7%
exp-to-pow76.7%
exp-diff67.1%
*-commutative67.1%
exp-to-pow67.4%
sub-neg67.4%
metadata-eval67.4%
Simplified67.4%
Taylor expanded in y around 0 61.8%
exp-to-pow62.3%
sub-neg62.3%
metadata-eval62.3%
associate-*r/66.3%
associate-/r*64.5%
Simplified64.5%
Taylor expanded in t around 0 52.1%
Taylor expanded in b around 0 31.8%
Taylor expanded in y around 0 37.2%
+-commutative37.2%
mul-1-neg37.2%
unsub-neg37.2%
Simplified37.2%
if -2e-289 < b Initial program 97.7%
associate-/l*98.6%
associate--l+98.6%
exp-sum85.9%
associate-/l*85.9%
*-commutative85.9%
exp-to-pow85.9%
exp-diff80.3%
*-commutative80.3%
exp-to-pow80.9%
sub-neg80.9%
metadata-eval80.9%
Simplified80.9%
Taylor expanded in y around 0 74.2%
exp-to-pow74.7%
sub-neg74.7%
metadata-eval74.7%
associate-*r/78.7%
associate-/r*72.4%
Simplified72.4%
Taylor expanded in t around 0 65.9%
Taylor expanded in b around 0 54.5%
Taylor expanded in y around 0 56.1%
Final simplification49.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -9.2e+197)
(* x (- (/ 1.0 (* y a)) (/ b (* y a))))
(if (<= b -3.4e-290)
(/ (/ x a) (- y (* b (* y (- -1.0 (* b 0.5))))))
(if (<= b 6.2e-307)
(* b (- (/ x (* a (* y b))) (/ x (* y a))))
(/
x
(*
y
(+
a
(*
b
(+ a (* b (+ (* 0.16666666666666666 (* a b)) (* a 0.5))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -9.2e+197) {
tmp = x * ((1.0 / (y * a)) - (b / (y * a)));
} else if (b <= -3.4e-290) {
tmp = (x / a) / (y - (b * (y * (-1.0 - (b * 0.5)))));
} else if (b <= 6.2e-307) {
tmp = b * ((x / (a * (y * b))) - (x / (y * a)));
} else {
tmp = x / (y * (a + (b * (a + (b * ((0.16666666666666666 * (a * b)) + (a * 0.5)))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-9.2d+197)) then
tmp = x * ((1.0d0 / (y * a)) - (b / (y * a)))
else if (b <= (-3.4d-290)) then
tmp = (x / a) / (y - (b * (y * ((-1.0d0) - (b * 0.5d0)))))
else if (b <= 6.2d-307) then
tmp = b * ((x / (a * (y * b))) - (x / (y * a)))
else
tmp = x / (y * (a + (b * (a + (b * ((0.16666666666666666d0 * (a * b)) + (a * 0.5d0)))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -9.2e+197) {
tmp = x * ((1.0 / (y * a)) - (b / (y * a)));
} else if (b <= -3.4e-290) {
tmp = (x / a) / (y - (b * (y * (-1.0 - (b * 0.5)))));
} else if (b <= 6.2e-307) {
tmp = b * ((x / (a * (y * b))) - (x / (y * a)));
} else {
tmp = x / (y * (a + (b * (a + (b * ((0.16666666666666666 * (a * b)) + (a * 0.5)))))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -9.2e+197: tmp = x * ((1.0 / (y * a)) - (b / (y * a))) elif b <= -3.4e-290: tmp = (x / a) / (y - (b * (y * (-1.0 - (b * 0.5))))) elif b <= 6.2e-307: tmp = b * ((x / (a * (y * b))) - (x / (y * a))) else: tmp = x / (y * (a + (b * (a + (b * ((0.16666666666666666 * (a * b)) + (a * 0.5))))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -9.2e+197) tmp = Float64(x * Float64(Float64(1.0 / Float64(y * a)) - Float64(b / Float64(y * a)))); elseif (b <= -3.4e-290) tmp = Float64(Float64(x / a) / Float64(y - Float64(b * Float64(y * Float64(-1.0 - Float64(b * 0.5)))))); elseif (b <= 6.2e-307) tmp = Float64(b * Float64(Float64(x / Float64(a * Float64(y * b))) - Float64(x / Float64(y * a)))); else tmp = Float64(x / Float64(y * Float64(a + Float64(b * Float64(a + Float64(b * Float64(Float64(0.16666666666666666 * Float64(a * b)) + Float64(a * 0.5)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -9.2e+197) tmp = x * ((1.0 / (y * a)) - (b / (y * a))); elseif (b <= -3.4e-290) tmp = (x / a) / (y - (b * (y * (-1.0 - (b * 0.5))))); elseif (b <= 6.2e-307) tmp = b * ((x / (a * (y * b))) - (x / (y * a))); else tmp = x / (y * (a + (b * (a + (b * ((0.16666666666666666 * (a * b)) + (a * 0.5))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -9.2e+197], N[(x * N[(N[(1.0 / N[(y * a), $MachinePrecision]), $MachinePrecision] - N[(b / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -3.4e-290], N[(N[(x / a), $MachinePrecision] / N[(y - N[(b * N[(y * N[(-1.0 - N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.2e-307], N[(b * N[(N[(x / N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a + N[(b * N[(a + N[(b * N[(N[(0.16666666666666666 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(a * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -9.2 \cdot 10^{+197}:\\
\;\;\;\;x \cdot \left(\frac{1}{y \cdot a} - \frac{b}{y \cdot a}\right)\\
\mathbf{elif}\;b \leq -3.4 \cdot 10^{-290}:\\
\;\;\;\;\frac{\frac{x}{a}}{y - b \cdot \left(y \cdot \left(-1 - b \cdot 0.5\right)\right)}\\
\mathbf{elif}\;b \leq 6.2 \cdot 10^{-307}:\\
\;\;\;\;b \cdot \left(\frac{x}{a \cdot \left(y \cdot b\right)} - \frac{x}{y \cdot a}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + b \cdot \left(a + b \cdot \left(0.16666666666666666 \cdot \left(a \cdot b\right) + a \cdot 0.5\right)\right)\right)}\\
\end{array}
\end{array}
if b < -9.2000000000000002e197Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum75.0%
associate-/l*75.0%
*-commutative75.0%
exp-to-pow75.0%
exp-diff50.0%
*-commutative50.0%
exp-to-pow50.0%
sub-neg50.0%
metadata-eval50.0%
Simplified50.0%
Taylor expanded in y around 0 50.1%
exp-to-pow50.1%
sub-neg50.1%
metadata-eval50.1%
associate-*r/62.6%
associate-/r*62.6%
Simplified62.6%
Taylor expanded in t around 0 91.8%
Taylor expanded in b around 0 35.9%
Taylor expanded in x around 0 52.0%
+-commutative52.0%
mul-1-neg52.0%
unsub-neg52.0%
Simplified52.0%
if -9.2000000000000002e197 < b < -3.39999999999999984e-290Initial program 99.0%
associate-/l*98.5%
associate--l+98.5%
exp-sum78.7%
associate-/l*78.7%
*-commutative78.7%
exp-to-pow78.7%
exp-diff69.3%
*-commutative69.3%
exp-to-pow69.7%
sub-neg69.7%
metadata-eval69.7%
Simplified69.7%
Taylor expanded in y around 0 62.7%
exp-to-pow63.2%
sub-neg63.2%
metadata-eval63.2%
associate-*r/65.6%
associate-/r*63.7%
Simplified63.7%
unpow-prod-up63.8%
unpow-163.8%
Applied egg-rr63.8%
associate-*r/63.8%
*-rgt-identity63.8%
Simplified63.8%
Taylor expanded in t around 0 49.4%
associate-/r*46.0%
Simplified46.0%
Taylor expanded in b around 0 37.1%
associate-*r*33.0%
distribute-rgt1-in33.0%
Simplified37.1%
if -3.39999999999999984e-290 < b < 6.1999999999999996e-307Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum83.3%
associate-/l*83.3%
*-commutative83.3%
exp-to-pow83.3%
exp-diff83.3%
*-commutative83.3%
exp-to-pow83.3%
sub-neg83.3%
metadata-eval83.3%
Simplified83.3%
Taylor expanded in y around 0 67.6%
exp-to-pow67.6%
sub-neg67.6%
metadata-eval67.6%
associate-*r/67.6%
associate-/r*67.6%
Simplified67.6%
Taylor expanded in t around 0 18.8%
Taylor expanded in b around 0 18.8%
Taylor expanded in b around inf 51.2%
mul-1-neg51.2%
+-commutative51.2%
unsub-neg51.2%
*-commutative51.2%
Simplified51.2%
if 6.1999999999999996e-307 < b Initial program 97.6%
associate-/l*98.5%
associate--l+98.5%
exp-sum86.0%
associate-/l*86.0%
*-commutative86.0%
exp-to-pow86.0%
exp-diff80.2%
*-commutative80.2%
exp-to-pow80.7%
sub-neg80.7%
metadata-eval80.7%
Simplified80.7%
Taylor expanded in y around 0 74.5%
exp-to-pow75.0%
sub-neg75.0%
metadata-eval75.0%
associate-*r/79.3%
associate-/r*72.6%
Simplified72.6%
Taylor expanded in t around 0 68.2%
Taylor expanded in b around 0 57.1%
Taylor expanded in y around 0 58.0%
Final simplification48.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -9.2e+197)
(* x (- (/ 1.0 (* y a)) (/ b (* y a))))
(if (<= b -1.15e-289)
(/ (/ x a) (- y (* b (* y (- -1.0 (* b 0.5))))))
(if (<= b 6.1e-304)
(* b (- (/ x (* a (* y b))) (/ x (* y a))))
(/
x
(*
a
(+ y (* b (+ y (* b (* y (+ 0.5 (* b 0.16666666666666666)))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -9.2e+197) {
tmp = x * ((1.0 / (y * a)) - (b / (y * a)));
} else if (b <= -1.15e-289) {
tmp = (x / a) / (y - (b * (y * (-1.0 - (b * 0.5)))));
} else if (b <= 6.1e-304) {
tmp = b * ((x / (a * (y * b))) - (x / (y * a)));
} else {
tmp = x / (a * (y + (b * (y + (b * (y * (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 <= (-9.2d+197)) then
tmp = x * ((1.0d0 / (y * a)) - (b / (y * a)))
else if (b <= (-1.15d-289)) then
tmp = (x / a) / (y - (b * (y * ((-1.0d0) - (b * 0.5d0)))))
else if (b <= 6.1d-304) then
tmp = b * ((x / (a * (y * b))) - (x / (y * a)))
else
tmp = x / (a * (y + (b * (y + (b * (y * (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 <= -9.2e+197) {
tmp = x * ((1.0 / (y * a)) - (b / (y * a)));
} else if (b <= -1.15e-289) {
tmp = (x / a) / (y - (b * (y * (-1.0 - (b * 0.5)))));
} else if (b <= 6.1e-304) {
tmp = b * ((x / (a * (y * b))) - (x / (y * a)));
} else {
tmp = x / (a * (y + (b * (y + (b * (y * (0.5 + (b * 0.16666666666666666))))))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -9.2e+197: tmp = x * ((1.0 / (y * a)) - (b / (y * a))) elif b <= -1.15e-289: tmp = (x / a) / (y - (b * (y * (-1.0 - (b * 0.5))))) elif b <= 6.1e-304: tmp = b * ((x / (a * (y * b))) - (x / (y * a))) else: tmp = x / (a * (y + (b * (y + (b * (y * (0.5 + (b * 0.16666666666666666)))))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -9.2e+197) tmp = Float64(x * Float64(Float64(1.0 / Float64(y * a)) - Float64(b / Float64(y * a)))); elseif (b <= -1.15e-289) tmp = Float64(Float64(x / a) / Float64(y - Float64(b * Float64(y * Float64(-1.0 - Float64(b * 0.5)))))); elseif (b <= 6.1e-304) tmp = Float64(b * Float64(Float64(x / Float64(a * Float64(y * b))) - Float64(x / Float64(y * a)))); else tmp = Float64(x / Float64(a * Float64(y + Float64(b * Float64(y + Float64(b * Float64(y * 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 <= -9.2e+197) tmp = x * ((1.0 / (y * a)) - (b / (y * a))); elseif (b <= -1.15e-289) tmp = (x / a) / (y - (b * (y * (-1.0 - (b * 0.5))))); elseif (b <= 6.1e-304) tmp = b * ((x / (a * (y * b))) - (x / (y * a))); else tmp = x / (a * (y + (b * (y + (b * (y * (0.5 + (b * 0.16666666666666666)))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -9.2e+197], N[(x * N[(N[(1.0 / N[(y * a), $MachinePrecision]), $MachinePrecision] - N[(b / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1.15e-289], N[(N[(x / a), $MachinePrecision] / N[(y - N[(b * N[(y * N[(-1.0 - N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.1e-304], N[(b * N[(N[(x / N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y + N[(b * N[(y + N[(b * N[(y * 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 -9.2 \cdot 10^{+197}:\\
\;\;\;\;x \cdot \left(\frac{1}{y \cdot a} - \frac{b}{y \cdot a}\right)\\
\mathbf{elif}\;b \leq -1.15 \cdot 10^{-289}:\\
\;\;\;\;\frac{\frac{x}{a}}{y - b \cdot \left(y \cdot \left(-1 - b \cdot 0.5\right)\right)}\\
\mathbf{elif}\;b \leq 6.1 \cdot 10^{-304}:\\
\;\;\;\;b \cdot \left(\frac{x}{a \cdot \left(y \cdot b\right)} - \frac{x}{y \cdot a}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + b \cdot \left(y + b \cdot \left(y \cdot \left(0.5 + b \cdot 0.16666666666666666\right)\right)\right)\right)}\\
\end{array}
\end{array}
if b < -9.2000000000000002e197Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum75.0%
associate-/l*75.0%
*-commutative75.0%
exp-to-pow75.0%
exp-diff50.0%
*-commutative50.0%
exp-to-pow50.0%
sub-neg50.0%
metadata-eval50.0%
Simplified50.0%
Taylor expanded in y around 0 50.1%
exp-to-pow50.1%
sub-neg50.1%
metadata-eval50.1%
associate-*r/62.6%
associate-/r*62.6%
Simplified62.6%
Taylor expanded in t around 0 91.8%
Taylor expanded in b around 0 35.9%
Taylor expanded in x around 0 52.0%
+-commutative52.0%
mul-1-neg52.0%
unsub-neg52.0%
Simplified52.0%
if -9.2000000000000002e197 < b < -1.1500000000000001e-289Initial program 99.0%
associate-/l*98.5%
associate--l+98.5%
exp-sum78.7%
associate-/l*78.7%
*-commutative78.7%
exp-to-pow78.7%
exp-diff69.3%
*-commutative69.3%
exp-to-pow69.7%
sub-neg69.7%
metadata-eval69.7%
Simplified69.7%
Taylor expanded in y around 0 62.7%
exp-to-pow63.2%
sub-neg63.2%
metadata-eval63.2%
associate-*r/65.6%
associate-/r*63.7%
Simplified63.7%
unpow-prod-up63.8%
unpow-163.8%
Applied egg-rr63.8%
associate-*r/63.8%
*-rgt-identity63.8%
Simplified63.8%
Taylor expanded in t around 0 49.4%
associate-/r*46.0%
Simplified46.0%
Taylor expanded in b around 0 37.1%
associate-*r*33.0%
distribute-rgt1-in33.0%
Simplified37.1%
if -1.1500000000000001e-289 < b < 6.1000000000000004e-304Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum83.3%
associate-/l*83.3%
*-commutative83.3%
exp-to-pow83.3%
exp-diff83.3%
*-commutative83.3%
exp-to-pow83.3%
sub-neg83.3%
metadata-eval83.3%
Simplified83.3%
Taylor expanded in y around 0 67.6%
exp-to-pow67.6%
sub-neg67.6%
metadata-eval67.6%
associate-*r/67.6%
associate-/r*67.6%
Simplified67.6%
Taylor expanded in t around 0 18.8%
Taylor expanded in b around 0 18.8%
Taylor expanded in b around inf 51.2%
mul-1-neg51.2%
+-commutative51.2%
unsub-neg51.2%
*-commutative51.2%
Simplified51.2%
if 6.1000000000000004e-304 < b Initial program 97.6%
associate-/l*98.5%
associate--l+98.5%
exp-sum86.0%
associate-/l*86.0%
*-commutative86.0%
exp-to-pow86.0%
exp-diff80.2%
*-commutative80.2%
exp-to-pow80.7%
sub-neg80.7%
metadata-eval80.7%
Simplified80.7%
Taylor expanded in y around 0 74.5%
exp-to-pow75.0%
sub-neg75.0%
metadata-eval75.0%
associate-*r/79.3%
associate-/r*72.6%
Simplified72.6%
Taylor expanded in t around 0 68.2%
Taylor expanded in b around 0 57.1%
associate-*r*57.1%
distribute-rgt-out57.1%
Simplified57.1%
Final simplification48.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (* y a))))
(if (<= b -5.2e+221)
(+ t_1 (* b (- (* b (- t_1 (* t_1 0.5))) t_1)))
(if (<= b -7.2e-290)
(/ (- (/ x a) (/ (* x b) a)) y)
(/
x
(*
y
(+
a
(*
b
(+ a (* b (+ (* 0.16666666666666666 (* a b)) (* a 0.5))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (y * a);
double tmp;
if (b <= -5.2e+221) {
tmp = t_1 + (b * ((b * (t_1 - (t_1 * 0.5))) - t_1));
} else if (b <= -7.2e-290) {
tmp = ((x / a) - ((x * b) / a)) / y;
} else {
tmp = x / (y * (a + (b * (a + (b * ((0.16666666666666666 * (a * b)) + (a * 0.5)))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (y * a)
if (b <= (-5.2d+221)) then
tmp = t_1 + (b * ((b * (t_1 - (t_1 * 0.5d0))) - t_1))
else if (b <= (-7.2d-290)) then
tmp = ((x / a) - ((x * b) / a)) / y
else
tmp = x / (y * (a + (b * (a + (b * ((0.16666666666666666d0 * (a * b)) + (a * 0.5d0)))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (y * a);
double tmp;
if (b <= -5.2e+221) {
tmp = t_1 + (b * ((b * (t_1 - (t_1 * 0.5))) - t_1));
} else if (b <= -7.2e-290) {
tmp = ((x / a) - ((x * b) / a)) / y;
} else {
tmp = x / (y * (a + (b * (a + (b * ((0.16666666666666666 * (a * b)) + (a * 0.5)))))));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (y * a) tmp = 0 if b <= -5.2e+221: tmp = t_1 + (b * ((b * (t_1 - (t_1 * 0.5))) - t_1)) elif b <= -7.2e-290: tmp = ((x / a) - ((x * b) / a)) / y else: tmp = x / (y * (a + (b * (a + (b * ((0.16666666666666666 * (a * b)) + (a * 0.5))))))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(y * a)) tmp = 0.0 if (b <= -5.2e+221) tmp = Float64(t_1 + Float64(b * Float64(Float64(b * Float64(t_1 - Float64(t_1 * 0.5))) - t_1))); elseif (b <= -7.2e-290) tmp = Float64(Float64(Float64(x / a) - Float64(Float64(x * b) / a)) / y); else tmp = Float64(x / Float64(y * Float64(a + Float64(b * Float64(a + Float64(b * Float64(Float64(0.16666666666666666 * Float64(a * b)) + Float64(a * 0.5)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (y * a); tmp = 0.0; if (b <= -5.2e+221) tmp = t_1 + (b * ((b * (t_1 - (t_1 * 0.5))) - t_1)); elseif (b <= -7.2e-290) tmp = ((x / a) - ((x * b) / a)) / y; else tmp = x / (y * (a + (b * (a + (b * ((0.16666666666666666 * (a * b)) + (a * 0.5))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -5.2e+221], N[(t$95$1 + N[(b * N[(N[(b * N[(t$95$1 - N[(t$95$1 * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -7.2e-290], N[(N[(N[(x / a), $MachinePrecision] - N[(N[(x * b), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * N[(a + N[(b * N[(a + N[(b * N[(N[(0.16666666666666666 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(a * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y \cdot a}\\
\mathbf{if}\;b \leq -5.2 \cdot 10^{+221}:\\
\;\;\;\;t\_1 + b \cdot \left(b \cdot \left(t\_1 - t\_1 \cdot 0.5\right) - t\_1\right)\\
\mathbf{elif}\;b \leq -7.2 \cdot 10^{-290}:\\
\;\;\;\;\frac{\frac{x}{a} - \frac{x \cdot b}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + b \cdot \left(a + b \cdot \left(0.16666666666666666 \cdot \left(a \cdot b\right) + a \cdot 0.5\right)\right)\right)}\\
\end{array}
\end{array}
if b < -5.20000000000000008e221Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum87.5%
associate-/l*87.5%
*-commutative87.5%
exp-to-pow87.5%
exp-diff56.3%
*-commutative56.3%
exp-to-pow56.3%
sub-neg56.3%
metadata-eval56.3%
Simplified56.3%
Taylor expanded in y around 0 50.0%
exp-to-pow50.0%
sub-neg50.0%
metadata-eval50.0%
associate-*r/56.3%
associate-/r*56.3%
Simplified56.3%
Taylor expanded in t around 0 93.8%
Taylor expanded in b around 0 63.9%
if -5.20000000000000008e221 < b < -7.19999999999999959e-290Initial program 99.0%
associate-/l*98.6%
associate--l+98.6%
exp-sum76.7%
associate-/l*76.7%
*-commutative76.7%
exp-to-pow76.7%
exp-diff67.1%
*-commutative67.1%
exp-to-pow67.4%
sub-neg67.4%
metadata-eval67.4%
Simplified67.4%
Taylor expanded in y around 0 61.8%
exp-to-pow62.3%
sub-neg62.3%
metadata-eval62.3%
associate-*r/66.3%
associate-/r*64.5%
Simplified64.5%
Taylor expanded in t around 0 52.1%
Taylor expanded in b around 0 31.8%
Taylor expanded in y around 0 37.2%
+-commutative37.2%
mul-1-neg37.2%
unsub-neg37.2%
Simplified37.2%
if -7.19999999999999959e-290 < b Initial program 97.7%
associate-/l*98.6%
associate--l+98.6%
exp-sum85.9%
associate-/l*85.9%
*-commutative85.9%
exp-to-pow85.9%
exp-diff80.3%
*-commutative80.3%
exp-to-pow80.9%
sub-neg80.9%
metadata-eval80.9%
Simplified80.9%
Taylor expanded in y around 0 74.2%
exp-to-pow74.7%
sub-neg74.7%
metadata-eval74.7%
associate-*r/78.7%
associate-/r*72.4%
Simplified72.4%
Taylor expanded in t around 0 65.9%
Taylor expanded in b around 0 54.5%
Taylor expanded in y around 0 56.1%
Final simplification48.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -5e+220)
(* x (- (/ 1.0 (* y a)) (/ b (* y a))))
(if (<= b -2.6e-289)
(/ (- (/ x a) (/ (* x b) a)) y)
(if (<= b 1.36e-306)
(* b (- (/ x (* a (* y b))) (/ x (* y a))))
(/ x (* a (+ y (* y b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -5e+220) {
tmp = x * ((1.0 / (y * a)) - (b / (y * a)));
} else if (b <= -2.6e-289) {
tmp = ((x / a) - ((x * b) / a)) / y;
} else if (b <= 1.36e-306) {
tmp = b * ((x / (a * (y * b))) - (x / (y * a)));
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-5d+220)) then
tmp = x * ((1.0d0 / (y * a)) - (b / (y * a)))
else if (b <= (-2.6d-289)) then
tmp = ((x / a) - ((x * b) / a)) / y
else if (b <= 1.36d-306) then
tmp = b * ((x / (a * (y * b))) - (x / (y * a)))
else
tmp = x / (a * (y + (y * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -5e+220) {
tmp = x * ((1.0 / (y * a)) - (b / (y * a)));
} else if (b <= -2.6e-289) {
tmp = ((x / a) - ((x * b) / a)) / y;
} else if (b <= 1.36e-306) {
tmp = b * ((x / (a * (y * b))) - (x / (y * a)));
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -5e+220: tmp = x * ((1.0 / (y * a)) - (b / (y * a))) elif b <= -2.6e-289: tmp = ((x / a) - ((x * b) / a)) / y elif b <= 1.36e-306: tmp = b * ((x / (a * (y * b))) - (x / (y * a))) else: tmp = x / (a * (y + (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -5e+220) tmp = Float64(x * Float64(Float64(1.0 / Float64(y * a)) - Float64(b / Float64(y * a)))); elseif (b <= -2.6e-289) tmp = Float64(Float64(Float64(x / a) - Float64(Float64(x * b) / a)) / y); elseif (b <= 1.36e-306) tmp = Float64(b * Float64(Float64(x / Float64(a * Float64(y * b))) - Float64(x / Float64(y * a)))); else tmp = Float64(x / Float64(a * Float64(y + Float64(y * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -5e+220) tmp = x * ((1.0 / (y * a)) - (b / (y * a))); elseif (b <= -2.6e-289) tmp = ((x / a) - ((x * b) / a)) / y; elseif (b <= 1.36e-306) tmp = b * ((x / (a * (y * b))) - (x / (y * a))); else tmp = x / (a * (y + (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -5e+220], N[(x * N[(N[(1.0 / N[(y * a), $MachinePrecision]), $MachinePrecision] - N[(b / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -2.6e-289], N[(N[(N[(x / a), $MachinePrecision] - N[(N[(x * b), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 1.36e-306], N[(b * N[(N[(x / N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5 \cdot 10^{+220}:\\
\;\;\;\;x \cdot \left(\frac{1}{y \cdot a} - \frac{b}{y \cdot a}\right)\\
\mathbf{elif}\;b \leq -2.6 \cdot 10^{-289}:\\
\;\;\;\;\frac{\frac{x}{a} - \frac{x \cdot b}{a}}{y}\\
\mathbf{elif}\;b \leq 1.36 \cdot 10^{-306}:\\
\;\;\;\;b \cdot \left(\frac{x}{a \cdot \left(y \cdot b\right)} - \frac{x}{y \cdot a}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\end{array}
\end{array}
if b < -5.0000000000000002e220Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum87.5%
associate-/l*87.5%
*-commutative87.5%
exp-to-pow87.5%
exp-diff56.3%
*-commutative56.3%
exp-to-pow56.3%
sub-neg56.3%
metadata-eval56.3%
Simplified56.3%
Taylor expanded in y around 0 50.0%
exp-to-pow50.0%
sub-neg50.0%
metadata-eval50.0%
associate-*r/56.3%
associate-/r*56.3%
Simplified56.3%
Taylor expanded in t around 0 93.8%
Taylor expanded in b around 0 28.4%
Taylor expanded in x around 0 57.9%
+-commutative57.9%
mul-1-neg57.9%
unsub-neg57.9%
Simplified57.9%
if -5.0000000000000002e220 < b < -2.5999999999999999e-289Initial program 99.0%
associate-/l*98.6%
associate--l+98.6%
exp-sum76.7%
associate-/l*76.7%
*-commutative76.7%
exp-to-pow76.7%
exp-diff67.1%
*-commutative67.1%
exp-to-pow67.4%
sub-neg67.4%
metadata-eval67.4%
Simplified67.4%
Taylor expanded in y around 0 61.8%
exp-to-pow62.3%
sub-neg62.3%
metadata-eval62.3%
associate-*r/66.3%
associate-/r*64.5%
Simplified64.5%
Taylor expanded in t around 0 52.1%
Taylor expanded in b around 0 31.8%
Taylor expanded in y around 0 37.2%
+-commutative37.2%
mul-1-neg37.2%
unsub-neg37.2%
Simplified37.2%
if -2.5999999999999999e-289 < b < 1.35999999999999996e-306Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum83.3%
associate-/l*83.3%
*-commutative83.3%
exp-to-pow83.3%
exp-diff83.3%
*-commutative83.3%
exp-to-pow83.3%
sub-neg83.3%
metadata-eval83.3%
Simplified83.3%
Taylor expanded in y around 0 67.6%
exp-to-pow67.6%
sub-neg67.6%
metadata-eval67.6%
associate-*r/67.6%
associate-/r*67.6%
Simplified67.6%
Taylor expanded in t around 0 18.8%
Taylor expanded in b around 0 18.8%
Taylor expanded in b around inf 51.2%
mul-1-neg51.2%
+-commutative51.2%
unsub-neg51.2%
*-commutative51.2%
Simplified51.2%
if 1.35999999999999996e-306 < b Initial program 97.6%
associate-/l*98.5%
associate--l+98.5%
exp-sum86.0%
associate-/l*86.0%
*-commutative86.0%
exp-to-pow86.0%
exp-diff80.2%
*-commutative80.2%
exp-to-pow80.7%
sub-neg80.7%
metadata-eval80.7%
Simplified80.7%
Taylor expanded in y around 0 74.5%
exp-to-pow75.0%
sub-neg75.0%
metadata-eval75.0%
associate-*r/79.3%
associate-/r*72.6%
Simplified72.6%
Taylor expanded in t around 0 68.2%
Taylor expanded in b around 0 45.4%
Final simplification42.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -9.5e+219)
(* x (- (/ 1.0 (* y a)) (/ b (* y a))))
(if (<= b -5.2e-290)
(/ (- (/ x a) (/ (* x b) a)) y)
(if (<= b 2e-305)
(* b (- (/ x (* a (* y b))) (/ x (* y a))))
(/ x (* a (- y (* b (* y (- -1.0 (* b 0.5)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -9.5e+219) {
tmp = x * ((1.0 / (y * a)) - (b / (y * a)));
} else if (b <= -5.2e-290) {
tmp = ((x / a) - ((x * b) / a)) / y;
} else if (b <= 2e-305) {
tmp = b * ((x / (a * (y * b))) - (x / (y * a)));
} else {
tmp = x / (a * (y - (b * (y * (-1.0 - (b * 0.5))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-9.5d+219)) then
tmp = x * ((1.0d0 / (y * a)) - (b / (y * a)))
else if (b <= (-5.2d-290)) then
tmp = ((x / a) - ((x * b) / a)) / y
else if (b <= 2d-305) then
tmp = b * ((x / (a * (y * b))) - (x / (y * a)))
else
tmp = x / (a * (y - (b * (y * ((-1.0d0) - (b * 0.5d0))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -9.5e+219) {
tmp = x * ((1.0 / (y * a)) - (b / (y * a)));
} else if (b <= -5.2e-290) {
tmp = ((x / a) - ((x * b) / a)) / y;
} else if (b <= 2e-305) {
tmp = b * ((x / (a * (y * b))) - (x / (y * a)));
} else {
tmp = x / (a * (y - (b * (y * (-1.0 - (b * 0.5))))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -9.5e+219: tmp = x * ((1.0 / (y * a)) - (b / (y * a))) elif b <= -5.2e-290: tmp = ((x / a) - ((x * b) / a)) / y elif b <= 2e-305: tmp = b * ((x / (a * (y * b))) - (x / (y * a))) else: tmp = x / (a * (y - (b * (y * (-1.0 - (b * 0.5)))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -9.5e+219) tmp = Float64(x * Float64(Float64(1.0 / Float64(y * a)) - Float64(b / Float64(y * a)))); elseif (b <= -5.2e-290) tmp = Float64(Float64(Float64(x / a) - Float64(Float64(x * b) / a)) / y); elseif (b <= 2e-305) tmp = Float64(b * Float64(Float64(x / Float64(a * Float64(y * b))) - Float64(x / Float64(y * a)))); else tmp = Float64(x / Float64(a * Float64(y - Float64(b * Float64(y * Float64(-1.0 - Float64(b * 0.5))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -9.5e+219) tmp = x * ((1.0 / (y * a)) - (b / (y * a))); elseif (b <= -5.2e-290) tmp = ((x / a) - ((x * b) / a)) / y; elseif (b <= 2e-305) tmp = b * ((x / (a * (y * b))) - (x / (y * a))); else tmp = x / (a * (y - (b * (y * (-1.0 - (b * 0.5)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -9.5e+219], N[(x * N[(N[(1.0 / N[(y * a), $MachinePrecision]), $MachinePrecision] - N[(b / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -5.2e-290], N[(N[(N[(x / a), $MachinePrecision] - N[(N[(x * b), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 2e-305], N[(b * N[(N[(x / N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y - N[(b * N[(y * N[(-1.0 - N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -9.5 \cdot 10^{+219}:\\
\;\;\;\;x \cdot \left(\frac{1}{y \cdot a} - \frac{b}{y \cdot a}\right)\\
\mathbf{elif}\;b \leq -5.2 \cdot 10^{-290}:\\
\;\;\;\;\frac{\frac{x}{a} - \frac{x \cdot b}{a}}{y}\\
\mathbf{elif}\;b \leq 2 \cdot 10^{-305}:\\
\;\;\;\;b \cdot \left(\frac{x}{a \cdot \left(y \cdot b\right)} - \frac{x}{y \cdot a}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y - b \cdot \left(y \cdot \left(-1 - b \cdot 0.5\right)\right)\right)}\\
\end{array}
\end{array}
if b < -9.49999999999999959e219Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum87.5%
associate-/l*87.5%
*-commutative87.5%
exp-to-pow87.5%
exp-diff56.3%
*-commutative56.3%
exp-to-pow56.3%
sub-neg56.3%
metadata-eval56.3%
Simplified56.3%
Taylor expanded in y around 0 50.0%
exp-to-pow50.0%
sub-neg50.0%
metadata-eval50.0%
associate-*r/56.3%
associate-/r*56.3%
Simplified56.3%
Taylor expanded in t around 0 93.8%
Taylor expanded in b around 0 28.4%
Taylor expanded in x around 0 57.9%
+-commutative57.9%
mul-1-neg57.9%
unsub-neg57.9%
Simplified57.9%
if -9.49999999999999959e219 < b < -5.20000000000000002e-290Initial program 99.0%
associate-/l*98.6%
associate--l+98.6%
exp-sum76.7%
associate-/l*76.7%
*-commutative76.7%
exp-to-pow76.7%
exp-diff67.1%
*-commutative67.1%
exp-to-pow67.4%
sub-neg67.4%
metadata-eval67.4%
Simplified67.4%
Taylor expanded in y around 0 61.8%
exp-to-pow62.3%
sub-neg62.3%
metadata-eval62.3%
associate-*r/66.3%
associate-/r*64.5%
Simplified64.5%
Taylor expanded in t around 0 52.1%
Taylor expanded in b around 0 31.8%
Taylor expanded in y around 0 37.2%
+-commutative37.2%
mul-1-neg37.2%
unsub-neg37.2%
Simplified37.2%
if -5.20000000000000002e-290 < b < 1.99999999999999999e-305Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum83.3%
associate-/l*83.3%
*-commutative83.3%
exp-to-pow83.3%
exp-diff83.3%
*-commutative83.3%
exp-to-pow83.3%
sub-neg83.3%
metadata-eval83.3%
Simplified83.3%
Taylor expanded in y around 0 67.6%
exp-to-pow67.6%
sub-neg67.6%
metadata-eval67.6%
associate-*r/67.6%
associate-/r*67.6%
Simplified67.6%
Taylor expanded in t around 0 18.8%
Taylor expanded in b around 0 18.8%
Taylor expanded in b around inf 51.2%
mul-1-neg51.2%
+-commutative51.2%
unsub-neg51.2%
*-commutative51.2%
Simplified51.2%
if 1.99999999999999999e-305 < b Initial program 97.6%
associate-/l*98.5%
associate--l+98.5%
exp-sum86.0%
associate-/l*86.0%
*-commutative86.0%
exp-to-pow86.0%
exp-diff80.2%
*-commutative80.2%
exp-to-pow80.7%
sub-neg80.7%
metadata-eval80.7%
Simplified80.7%
Taylor expanded in y around 0 74.5%
exp-to-pow75.0%
sub-neg75.0%
metadata-eval75.0%
associate-*r/79.3%
associate-/r*72.6%
Simplified72.6%
Taylor expanded in t around 0 68.2%
Taylor expanded in b around 0 51.9%
associate-*r*51.9%
distribute-rgt1-in51.9%
Simplified51.9%
Final simplification45.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- y (* b (* y (- -1.0 (* b 0.5)))))))
(if (<= b -9.2e+197)
(* x (- (/ 1.0 (* y a)) (/ b (* y a))))
(if (<= b -1.8e-288)
(/ (/ x a) t_1)
(if (<= b 6e-307)
(* b (- (/ x (* a (* y b))) (/ x (* y a))))
(/ x (* a t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y - (b * (y * (-1.0 - (b * 0.5))));
double tmp;
if (b <= -9.2e+197) {
tmp = x * ((1.0 / (y * a)) - (b / (y * a)));
} else if (b <= -1.8e-288) {
tmp = (x / a) / t_1;
} else if (b <= 6e-307) {
tmp = b * ((x / (a * (y * b))) - (x / (y * a)));
} else {
tmp = x / (a * t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = y - (b * (y * ((-1.0d0) - (b * 0.5d0))))
if (b <= (-9.2d+197)) then
tmp = x * ((1.0d0 / (y * a)) - (b / (y * a)))
else if (b <= (-1.8d-288)) then
tmp = (x / a) / t_1
else if (b <= 6d-307) then
tmp = b * ((x / (a * (y * b))) - (x / (y * a)))
else
tmp = x / (a * t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y - (b * (y * (-1.0 - (b * 0.5))));
double tmp;
if (b <= -9.2e+197) {
tmp = x * ((1.0 / (y * a)) - (b / (y * a)));
} else if (b <= -1.8e-288) {
tmp = (x / a) / t_1;
} else if (b <= 6e-307) {
tmp = b * ((x / (a * (y * b))) - (x / (y * a)));
} else {
tmp = x / (a * t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y - (b * (y * (-1.0 - (b * 0.5)))) tmp = 0 if b <= -9.2e+197: tmp = x * ((1.0 / (y * a)) - (b / (y * a))) elif b <= -1.8e-288: tmp = (x / a) / t_1 elif b <= 6e-307: tmp = b * ((x / (a * (y * b))) - (x / (y * a))) else: tmp = x / (a * t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y - Float64(b * Float64(y * Float64(-1.0 - Float64(b * 0.5))))) tmp = 0.0 if (b <= -9.2e+197) tmp = Float64(x * Float64(Float64(1.0 / Float64(y * a)) - Float64(b / Float64(y * a)))); elseif (b <= -1.8e-288) tmp = Float64(Float64(x / a) / t_1); elseif (b <= 6e-307) tmp = Float64(b * Float64(Float64(x / Float64(a * Float64(y * b))) - Float64(x / Float64(y * a)))); else tmp = Float64(x / Float64(a * t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y - (b * (y * (-1.0 - (b * 0.5)))); tmp = 0.0; if (b <= -9.2e+197) tmp = x * ((1.0 / (y * a)) - (b / (y * a))); elseif (b <= -1.8e-288) tmp = (x / a) / t_1; elseif (b <= 6e-307) tmp = b * ((x / (a * (y * b))) - (x / (y * a))); else tmp = x / (a * t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y - N[(b * N[(y * N[(-1.0 - N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -9.2e+197], N[(x * N[(N[(1.0 / N[(y * a), $MachinePrecision]), $MachinePrecision] - N[(b / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1.8e-288], N[(N[(x / a), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[b, 6e-307], N[(b * N[(N[(x / N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * t$95$1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - b \cdot \left(y \cdot \left(-1 - b \cdot 0.5\right)\right)\\
\mathbf{if}\;b \leq -9.2 \cdot 10^{+197}:\\
\;\;\;\;x \cdot \left(\frac{1}{y \cdot a} - \frac{b}{y \cdot a}\right)\\
\mathbf{elif}\;b \leq -1.8 \cdot 10^{-288}:\\
\;\;\;\;\frac{\frac{x}{a}}{t\_1}\\
\mathbf{elif}\;b \leq 6 \cdot 10^{-307}:\\
\;\;\;\;b \cdot \left(\frac{x}{a \cdot \left(y \cdot b\right)} - \frac{x}{y \cdot a}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot t\_1}\\
\end{array}
\end{array}
if b < -9.2000000000000002e197Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum75.0%
associate-/l*75.0%
*-commutative75.0%
exp-to-pow75.0%
exp-diff50.0%
*-commutative50.0%
exp-to-pow50.0%
sub-neg50.0%
metadata-eval50.0%
Simplified50.0%
Taylor expanded in y around 0 50.1%
exp-to-pow50.1%
sub-neg50.1%
metadata-eval50.1%
associate-*r/62.6%
associate-/r*62.6%
Simplified62.6%
Taylor expanded in t around 0 91.8%
Taylor expanded in b around 0 35.9%
Taylor expanded in x around 0 52.0%
+-commutative52.0%
mul-1-neg52.0%
unsub-neg52.0%
Simplified52.0%
if -9.2000000000000002e197 < b < -1.8000000000000001e-288Initial program 99.0%
associate-/l*98.5%
associate--l+98.5%
exp-sum78.7%
associate-/l*78.7%
*-commutative78.7%
exp-to-pow78.7%
exp-diff69.3%
*-commutative69.3%
exp-to-pow69.7%
sub-neg69.7%
metadata-eval69.7%
Simplified69.7%
Taylor expanded in y around 0 62.7%
exp-to-pow63.2%
sub-neg63.2%
metadata-eval63.2%
associate-*r/65.6%
associate-/r*63.7%
Simplified63.7%
unpow-prod-up63.8%
unpow-163.8%
Applied egg-rr63.8%
associate-*r/63.8%
*-rgt-identity63.8%
Simplified63.8%
Taylor expanded in t around 0 49.4%
associate-/r*46.0%
Simplified46.0%
Taylor expanded in b around 0 37.1%
associate-*r*33.0%
distribute-rgt1-in33.0%
Simplified37.1%
if -1.8000000000000001e-288 < b < 5.9999999999999999e-307Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum83.3%
associate-/l*83.3%
*-commutative83.3%
exp-to-pow83.3%
exp-diff83.3%
*-commutative83.3%
exp-to-pow83.3%
sub-neg83.3%
metadata-eval83.3%
Simplified83.3%
Taylor expanded in y around 0 67.6%
exp-to-pow67.6%
sub-neg67.6%
metadata-eval67.6%
associate-*r/67.6%
associate-/r*67.6%
Simplified67.6%
Taylor expanded in t around 0 18.8%
Taylor expanded in b around 0 18.8%
Taylor expanded in b around inf 51.2%
mul-1-neg51.2%
+-commutative51.2%
unsub-neg51.2%
*-commutative51.2%
Simplified51.2%
if 5.9999999999999999e-307 < b Initial program 97.6%
associate-/l*98.5%
associate--l+98.5%
exp-sum86.0%
associate-/l*86.0%
*-commutative86.0%
exp-to-pow86.0%
exp-diff80.2%
*-commutative80.2%
exp-to-pow80.7%
sub-neg80.7%
metadata-eval80.7%
Simplified80.7%
Taylor expanded in y around 0 74.5%
exp-to-pow75.0%
sub-neg75.0%
metadata-eval75.0%
associate-*r/79.3%
associate-/r*72.6%
Simplified72.6%
Taylor expanded in t around 0 68.2%
Taylor expanded in b around 0 51.9%
associate-*r*51.9%
distribute-rgt1-in51.9%
Simplified51.9%
Final simplification45.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -2.05e+218)
(* x (- (/ 1.0 (* y a)) (/ b (* y a))))
(if (<= b -1.78e-296)
(/ (- (/ x a) (/ (* x b) a)) y)
(if (<= b 6e-307) (* (/ x (- y)) (/ b a)) (/ x (* a (+ y (* y b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.05e+218) {
tmp = x * ((1.0 / (y * a)) - (b / (y * a)));
} else if (b <= -1.78e-296) {
tmp = ((x / a) - ((x * b) / a)) / y;
} else if (b <= 6e-307) {
tmp = (x / -y) * (b / a);
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-2.05d+218)) then
tmp = x * ((1.0d0 / (y * a)) - (b / (y * a)))
else if (b <= (-1.78d-296)) then
tmp = ((x / a) - ((x * b) / a)) / y
else if (b <= 6d-307) then
tmp = (x / -y) * (b / a)
else
tmp = x / (a * (y + (y * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.05e+218) {
tmp = x * ((1.0 / (y * a)) - (b / (y * a)));
} else if (b <= -1.78e-296) {
tmp = ((x / a) - ((x * b) / a)) / y;
} else if (b <= 6e-307) {
tmp = (x / -y) * (b / a);
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -2.05e+218: tmp = x * ((1.0 / (y * a)) - (b / (y * a))) elif b <= -1.78e-296: tmp = ((x / a) - ((x * b) / a)) / y elif b <= 6e-307: tmp = (x / -y) * (b / a) else: tmp = x / (a * (y + (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.05e+218) tmp = Float64(x * Float64(Float64(1.0 / Float64(y * a)) - Float64(b / Float64(y * a)))); elseif (b <= -1.78e-296) tmp = Float64(Float64(Float64(x / a) - Float64(Float64(x * b) / a)) / y); elseif (b <= 6e-307) tmp = Float64(Float64(x / Float64(-y)) * Float64(b / a)); else tmp = Float64(x / Float64(a * Float64(y + Float64(y * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -2.05e+218) tmp = x * ((1.0 / (y * a)) - (b / (y * a))); elseif (b <= -1.78e-296) tmp = ((x / a) - ((x * b) / a)) / y; elseif (b <= 6e-307) tmp = (x / -y) * (b / a); else tmp = x / (a * (y + (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.05e+218], N[(x * N[(N[(1.0 / N[(y * a), $MachinePrecision]), $MachinePrecision] - N[(b / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1.78e-296], N[(N[(N[(x / a), $MachinePrecision] - N[(N[(x * b), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 6e-307], N[(N[(x / (-y)), $MachinePrecision] * N[(b / a), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.05 \cdot 10^{+218}:\\
\;\;\;\;x \cdot \left(\frac{1}{y \cdot a} - \frac{b}{y \cdot a}\right)\\
\mathbf{elif}\;b \leq -1.78 \cdot 10^{-296}:\\
\;\;\;\;\frac{\frac{x}{a} - \frac{x \cdot b}{a}}{y}\\
\mathbf{elif}\;b \leq 6 \cdot 10^{-307}:\\
\;\;\;\;\frac{x}{-y} \cdot \frac{b}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\end{array}
\end{array}
if b < -2.04999999999999983e218Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum87.5%
associate-/l*87.5%
*-commutative87.5%
exp-to-pow87.5%
exp-diff56.3%
*-commutative56.3%
exp-to-pow56.3%
sub-neg56.3%
metadata-eval56.3%
Simplified56.3%
Taylor expanded in y around 0 50.0%
exp-to-pow50.0%
sub-neg50.0%
metadata-eval50.0%
associate-*r/56.3%
associate-/r*56.3%
Simplified56.3%
Taylor expanded in t around 0 93.8%
Taylor expanded in b around 0 28.4%
Taylor expanded in x around 0 57.9%
+-commutative57.9%
mul-1-neg57.9%
unsub-neg57.9%
Simplified57.9%
if -2.04999999999999983e218 < b < -1.78000000000000003e-296Initial program 99.1%
associate-/l*98.7%
associate--l+98.7%
exp-sum76.3%
associate-/l*76.3%
*-commutative76.3%
exp-to-pow76.3%
exp-diff66.8%
*-commutative66.8%
exp-to-pow67.1%
sub-neg67.1%
metadata-eval67.1%
Simplified67.1%
Taylor expanded in y around 0 61.7%
exp-to-pow62.1%
sub-neg62.1%
metadata-eval62.1%
associate-*r/66.0%
associate-/r*64.3%
Simplified64.3%
Taylor expanded in t around 0 51.2%
Taylor expanded in b around 0 31.3%
Taylor expanded in y around 0 36.6%
+-commutative36.6%
mul-1-neg36.6%
unsub-neg36.6%
Simplified36.6%
if -1.78000000000000003e-296 < b < 5.9999999999999999e-307Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum100.0%
associate-/l*100.0%
*-commutative100.0%
exp-to-pow100.0%
exp-diff100.0%
*-commutative100.0%
exp-to-pow100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0 76.0%
exp-to-pow76.0%
sub-neg76.0%
metadata-eval76.0%
associate-*r/76.0%
associate-/r*76.0%
Simplified76.0%
Taylor expanded in t around 0 27.0%
Taylor expanded in b around 0 27.0%
Taylor expanded in b around inf 51.6%
mul-1-neg51.6%
times-frac75.4%
*-commutative75.4%
distribute-lft-neg-in75.4%
distribute-neg-frac275.4%
Simplified75.4%
if 5.9999999999999999e-307 < b Initial program 97.6%
associate-/l*98.5%
associate--l+98.5%
exp-sum86.0%
associate-/l*86.0%
*-commutative86.0%
exp-to-pow86.0%
exp-diff80.2%
*-commutative80.2%
exp-to-pow80.7%
sub-neg80.7%
metadata-eval80.7%
Simplified80.7%
Taylor expanded in y around 0 74.5%
exp-to-pow75.0%
sub-neg75.0%
metadata-eval75.0%
associate-*r/79.3%
associate-/r*72.6%
Simplified72.6%
Taylor expanded in t around 0 68.2%
Taylor expanded in b around 0 45.4%
Final simplification42.7%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1e-288) (/ (* (/ x a) (+ b -1.0)) (- y)) (/ x (* a (+ y (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1e-288) {
tmp = ((x / a) * (b + -1.0)) / -y;
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-1d-288)) then
tmp = ((x / a) * (b + (-1.0d0))) / -y
else
tmp = x / (a * (y + (y * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1e-288) {
tmp = ((x / a) * (b + -1.0)) / -y;
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1e-288: tmp = ((x / a) * (b + -1.0)) / -y else: tmp = x / (a * (y + (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1e-288) tmp = Float64(Float64(Float64(x / a) * Float64(b + -1.0)) / Float64(-y)); else tmp = Float64(x / Float64(a * Float64(y + Float64(y * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1e-288) tmp = ((x / a) * (b + -1.0)) / -y; else tmp = x / (a * (y + (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1e-288], N[(N[(N[(x / a), $MachinePrecision] * N[(b + -1.0), $MachinePrecision]), $MachinePrecision] / (-y)), $MachinePrecision], N[(x / N[(a * N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1 \cdot 10^{-288}:\\
\;\;\;\;\frac{\frac{x}{a} \cdot \left(b + -1\right)}{-y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\end{array}
\end{array}
if b < -1.00000000000000006e-288Initial program 99.2%
associate-/l*98.8%
associate--l+98.8%
exp-sum78.0%
associate-/l*78.0%
*-commutative78.0%
exp-to-pow78.0%
exp-diff65.7%
*-commutative65.7%
exp-to-pow66.1%
sub-neg66.1%
metadata-eval66.1%
Simplified66.1%
Taylor expanded in y around 0 60.4%
exp-to-pow60.8%
sub-neg60.8%
metadata-eval60.8%
associate-*r/65.0%
associate-/r*63.5%
Simplified63.5%
Taylor expanded in t around 0 57.2%
Taylor expanded in b around 0 31.4%
Taylor expanded in y around -inf 36.1%
mul-1-neg36.1%
distribute-neg-frac236.1%
+-commutative36.1%
associate-/l*34.7%
distribute-rgt-out34.7%
Simplified34.7%
if -1.00000000000000006e-288 < b Initial program 97.7%
associate-/l*98.6%
associate--l+98.6%
exp-sum85.9%
associate-/l*85.9%
*-commutative85.9%
exp-to-pow85.9%
exp-diff80.3%
*-commutative80.3%
exp-to-pow80.9%
sub-neg80.9%
metadata-eval80.9%
Simplified80.9%
Taylor expanded in y around 0 74.2%
exp-to-pow74.7%
sub-neg74.7%
metadata-eval74.7%
associate-*r/78.7%
associate-/r*72.4%
Simplified72.4%
Taylor expanded in t around 0 65.9%
Taylor expanded in b around 0 44.1%
Final simplification39.3%
(FPCore (x y z t a b) :precision binary64 (if (<= b 5e-294) (/ (* (/ x y) (+ b -1.0)) (- a)) (/ x (* a (+ y (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 5e-294) {
tmp = ((x / y) * (b + -1.0)) / -a;
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= 5d-294) then
tmp = ((x / y) * (b + (-1.0d0))) / -a
else
tmp = x / (a * (y + (y * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 5e-294) {
tmp = ((x / y) * (b + -1.0)) / -a;
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 5e-294: tmp = ((x / y) * (b + -1.0)) / -a else: tmp = x / (a * (y + (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 5e-294) tmp = Float64(Float64(Float64(x / y) * Float64(b + -1.0)) / Float64(-a)); else tmp = Float64(x / Float64(a * Float64(y + Float64(y * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 5e-294) tmp = ((x / y) * (b + -1.0)) / -a; else tmp = x / (a * (y + (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 5e-294], N[(N[(N[(x / y), $MachinePrecision] * N[(b + -1.0), $MachinePrecision]), $MachinePrecision] / (-a)), $MachinePrecision], N[(x / N[(a * N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 5 \cdot 10^{-294}:\\
\;\;\;\;\frac{\frac{x}{y} \cdot \left(b + -1\right)}{-a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\end{array}
\end{array}
if b < 5.0000000000000003e-294Initial program 98.5%
associate-/l*98.8%
associate--l+98.8%
exp-sum78.4%
associate-/l*78.4%
*-commutative78.4%
exp-to-pow78.4%
exp-diff66.7%
*-commutative66.7%
exp-to-pow67.1%
sub-neg67.1%
metadata-eval67.1%
Simplified67.1%
Taylor expanded in y around 0 60.3%
exp-to-pow60.7%
sub-neg60.7%
metadata-eval60.7%
associate-*r/65.4%
associate-/r*63.9%
Simplified63.9%
Taylor expanded in t around 0 55.8%
Taylor expanded in b around 0 31.3%
Taylor expanded in a around -inf 34.5%
mul-1-neg34.5%
distribute-neg-frac234.5%
+-commutative34.5%
associate-/l*36.6%
distribute-rgt-out36.6%
Simplified36.6%
if 5.0000000000000003e-294 < b Initial program 98.4%
associate-/l*98.6%
associate--l+98.6%
exp-sum86.0%
associate-/l*86.0%
*-commutative86.0%
exp-to-pow86.0%
exp-diff80.1%
*-commutative80.1%
exp-to-pow80.6%
sub-neg80.6%
metadata-eval80.6%
Simplified80.6%
Taylor expanded in y around 0 75.1%
exp-to-pow75.6%
sub-neg75.6%
metadata-eval75.6%
associate-*r/79.1%
associate-/r*72.4%
Simplified72.4%
Taylor expanded in t around 0 68.0%
Taylor expanded in b around 0 44.9%
Final simplification40.4%
(FPCore (x y z t a b) :precision binary64 (if (<= b 6e-299) (* (/ x (- y)) (/ b a)) (/ x (* a (+ y (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 6e-299) {
tmp = (x / -y) * (b / a);
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= 6d-299) then
tmp = (x / -y) * (b / a)
else
tmp = x / (a * (y + (y * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 6e-299) {
tmp = (x / -y) * (b / a);
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 6e-299: tmp = (x / -y) * (b / a) else: tmp = x / (a * (y + (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 6e-299) tmp = Float64(Float64(x / Float64(-y)) * Float64(b / a)); else tmp = Float64(x / Float64(a * Float64(y + Float64(y * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 6e-299) tmp = (x / -y) * (b / a); else tmp = x / (a * (y + (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 6e-299], N[(N[(x / (-y)), $MachinePrecision] * N[(b / a), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 6 \cdot 10^{-299}:\\
\;\;\;\;\frac{x}{-y} \cdot \frac{b}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\end{array}
\end{array}
if b < 5.99999999999999969e-299Initial program 99.2%
associate-/l*98.9%
associate--l+98.9%
exp-sum78.3%
associate-/l*78.3%
*-commutative78.3%
exp-to-pow78.3%
exp-diff66.5%
*-commutative66.5%
exp-to-pow66.8%
sub-neg66.8%
metadata-eval66.8%
Simplified66.8%
Taylor expanded in y around 0 60.7%
exp-to-pow61.1%
sub-neg61.1%
metadata-eval61.1%
associate-*r/65.2%
associate-/r*63.7%
Simplified63.7%
Taylor expanded in t around 0 55.5%
Taylor expanded in b around 0 30.8%
Taylor expanded in b around inf 28.4%
mul-1-neg28.4%
times-frac33.9%
*-commutative33.9%
distribute-lft-neg-in33.9%
distribute-neg-frac233.9%
Simplified33.9%
if 5.99999999999999969e-299 < b Initial program 97.6%
associate-/l*98.5%
associate--l+98.5%
exp-sum86.0%
associate-/l*86.0%
*-commutative86.0%
exp-to-pow86.0%
exp-diff80.2%
*-commutative80.2%
exp-to-pow80.7%
sub-neg80.7%
metadata-eval80.7%
Simplified80.7%
Taylor expanded in y around 0 74.5%
exp-to-pow75.0%
sub-neg75.0%
metadata-eval75.0%
associate-*r/79.3%
associate-/r*72.6%
Simplified72.6%
Taylor expanded in t around 0 68.2%
Taylor expanded in b around 0 45.4%
Final simplification39.3%
(FPCore (x y z t a b) :precision binary64 (/ 1.0 (* a (/ y x))))
double code(double x, double y, double z, double t, double a, double b) {
return 1.0 / (a * (y / x));
}
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 = 1.0d0 / (a * (y / x))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return 1.0 / (a * (y / x));
}
def code(x, y, z, t, a, b): return 1.0 / (a * (y / x))
function code(x, y, z, t, a, b) return Float64(1.0 / Float64(a * Float64(y / x))) end
function tmp = code(x, y, z, t, a, b) tmp = 1.0 / (a * (y / x)); end
code[x_, y_, z_, t_, a_, b_] := N[(1.0 / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{a \cdot \frac{y}{x}}
\end{array}
Initial program 98.4%
associate-/l*98.7%
associate--l+98.7%
exp-sum81.9%
associate-/l*81.9%
*-commutative81.9%
exp-to-pow81.9%
exp-diff72.9%
*-commutative72.9%
exp-to-pow73.3%
sub-neg73.3%
metadata-eval73.3%
Simplified73.3%
Taylor expanded in y around 0 67.2%
exp-to-pow67.6%
sub-neg67.6%
metadata-eval67.6%
associate-*r/71.8%
associate-/r*67.9%
Simplified67.9%
Taylor expanded in t around 0 61.5%
Taylor expanded in b around 0 32.6%
clear-num32.7%
inv-pow32.7%
Applied egg-rr32.7%
unpow-132.7%
associate-/l*35.6%
Simplified35.6%
Final simplification35.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.4%
associate-/l*98.7%
associate--l+98.7%
exp-sum81.9%
associate-/l*81.9%
*-commutative81.9%
exp-to-pow81.9%
exp-diff72.9%
*-commutative72.9%
exp-to-pow73.3%
sub-neg73.3%
metadata-eval73.3%
Simplified73.3%
Taylor expanded in y around 0 67.2%
exp-to-pow67.6%
sub-neg67.6%
metadata-eval67.6%
associate-*r/71.8%
associate-/r*67.9%
Simplified67.9%
Taylor expanded in t around 0 61.5%
Taylor expanded in b around 0 32.6%
Final simplification32.6%
(FPCore (x y z t a b) :precision binary64 (/ (/ x a) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x / a) / 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) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x / a) / y;
}
def code(x, y, z, t, a, b): return (x / a) / y
function code(x, y, z, t, a, b) return Float64(Float64(x / a) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x / a) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{x}{a}}{y}
\end{array}
Initial program 98.4%
Taylor expanded in t around 0 78.9%
+-commutative78.9%
mul-1-neg78.9%
unsub-neg78.9%
Simplified78.9%
Taylor expanded in b around 0 55.1%
div-exp55.1%
*-commutative55.1%
exp-to-pow55.1%
rem-exp-log55.5%
Simplified55.5%
Taylor expanded in y around 0 33.9%
Final simplification33.9%
(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 2024066
(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))