
(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.2%
Final simplification98.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.4e+99) (not (<= y 1.8e-21))) (/ (* 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 <= -3.4e+99) || !(y <= 1.8e-21)) {
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 <= (-3.4d+99)) .or. (.not. (y <= 1.8d-21))) 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 <= -3.4e+99) || !(y <= 1.8e-21)) {
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 <= -3.4e+99) or not (y <= 1.8e-21): 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 <= -3.4e+99) || !(y <= 1.8e-21)) 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 <= -3.4e+99) || ~((y <= 1.8e-21))) 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, -3.4e+99], N[Not[LessEqual[y, 1.8e-21]], $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 -3.4 \cdot 10^{+99} \lor \neg \left(y \leq 1.8 \cdot 10^{-21}\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 < -3.39999999999999984e99 or 1.79999999999999995e-21 < y Initial program 100.0%
Taylor expanded in t around 0 92.3%
mul-1-neg92.3%
Simplified92.3%
if -3.39999999999999984e99 < y < 1.79999999999999995e-21Initial program 96.7%
Taylor expanded in y around 0 95.4%
Final simplification94.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (+ t -1.0) -3400000.0) (not (<= (+ t -1.0) -0.9999999998))) (/ (* x (pow a (+ t -1.0))) y) (* x (/ (/ (pow z y) a) (* y (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t + -1.0) <= -3400000.0) || !((t + -1.0) <= -0.9999999998)) {
tmp = (x * pow(a, (t + -1.0))) / y;
} else {
tmp = x * ((pow(z, y) / a) / (y * exp(b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (((t + (-1.0d0)) <= (-3400000.0d0)) .or. (.not. ((t + (-1.0d0)) <= (-0.9999999998d0)))) then
tmp = (x * (a ** (t + (-1.0d0)))) / y
else
tmp = x * (((z ** y) / a) / (y * exp(b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t + -1.0) <= -3400000.0) || !((t + -1.0) <= -0.9999999998)) {
tmp = (x * Math.pow(a, (t + -1.0))) / y;
} else {
tmp = x * ((Math.pow(z, y) / a) / (y * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((t + -1.0) <= -3400000.0) or not ((t + -1.0) <= -0.9999999998): tmp = (x * math.pow(a, (t + -1.0))) / y else: tmp = x * ((math.pow(z, y) / a) / (y * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(t + -1.0) <= -3400000.0) || !(Float64(t + -1.0) <= -0.9999999998)) tmp = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y); else tmp = Float64(x * Float64(Float64((z ^ y) / a) / Float64(y * exp(b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((t + -1.0) <= -3400000.0) || ~(((t + -1.0) <= -0.9999999998))) tmp = (x * (a ^ (t + -1.0))) / y; else tmp = x * (((z ^ y) / a) / (y * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(t + -1.0), $MachinePrecision], -3400000.0], N[Not[LessEqual[N[(t + -1.0), $MachinePrecision], -0.9999999998]], $MachinePrecision]], N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t + -1 \leq -3400000 \lor \neg \left(t + -1 \leq -0.9999999998\right):\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{y \cdot e^{b}}\\
\end{array}
\end{array}
if (-.f64 t 1) < -3.4e6 or -0.9999999998 < (-.f64 t 1) Initial program 100.0%
Taylor expanded in y around 0 88.8%
Taylor expanded in b around 0 81.0%
if -3.4e6 < (-.f64 t 1) < -0.9999999998Initial program 96.7%
associate-*r/96.1%
sub-neg96.1%
exp-sum84.8%
associate-/l*84.8%
associate-/r/83.4%
exp-neg83.4%
associate-*r/83.4%
Simplified84.6%
Taylor expanded in t around 0 83.2%
associate-/r*86.7%
Simplified86.7%
Final simplification84.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.24e+132) (not (<= b 16000000000.0))) (/ x (* y (* a (exp b)))) (/ (* x (* (pow z y) (pow a (+ t -1.0)))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.24e+132) || !(b <= 16000000000.0)) {
tmp = x / (y * (a * exp(b)));
} else {
tmp = (x * (pow(z, y) * 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 ((b <= (-1.24d+132)) .or. (.not. (b <= 16000000000.0d0))) then
tmp = x / (y * (a * exp(b)))
else
tmp = (x * ((z ** y) * (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 ((b <= -1.24e+132) || !(b <= 16000000000.0)) {
tmp = x / (y * (a * Math.exp(b)));
} else {
tmp = (x * (Math.pow(z, y) * Math.pow(a, (t + -1.0)))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.24e+132) or not (b <= 16000000000.0): tmp = x / (y * (a * math.exp(b))) else: tmp = (x * (math.pow(z, y) * math.pow(a, (t + -1.0)))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.24e+132) || !(b <= 16000000000.0)) tmp = Float64(x / Float64(y * Float64(a * exp(b)))); else tmp = Float64(Float64(x * Float64((z ^ y) * (a ^ Float64(t + -1.0)))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -1.24e+132) || ~((b <= 16000000000.0))) tmp = x / (y * (a * exp(b))); else tmp = (x * ((z ^ y) * (a ^ (t + -1.0)))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.24e+132], N[Not[LessEqual[b, 16000000000.0]], $MachinePrecision]], N[(x / N[(y * N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.24 \cdot 10^{+132} \lor \neg \left(b \leq 16000000000\right):\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot e^{b}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left({z}^{y} \cdot {a}^{\left(t + -1\right)}\right)}{y}\\
\end{array}
\end{array}
if b < -1.24000000000000006e132 or 1.6e10 < b Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum67.4%
associate-/l*67.4%
associate-/r/65.2%
exp-neg65.2%
associate-*r/65.2%
Simplified55.4%
Taylor expanded in t around 0 70.7%
associate-/r*70.7%
Simplified70.7%
Taylor expanded in y around 0 85.0%
if -1.24000000000000006e132 < b < 1.6e10Initial program 97.2%
Taylor expanded in b around 0 93.9%
log-pow89.7%
exp-sum84.8%
rem-exp-log84.8%
sub-neg84.8%
metadata-eval84.8%
*-commutative84.8%
exp-to-pow85.7%
Simplified85.7%
Final simplification85.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -4.5e+99) (not (<= y 2.75e+63))) (* 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 <= -4.5e+99) || !(y <= 2.75e+63)) {
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 <= (-4.5d+99)) .or. (.not. (y <= 2.75d+63))) 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 <= -4.5e+99) || !(y <= 2.75e+63)) {
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 <= -4.5e+99) or not (y <= 2.75e+63): 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 <= -4.5e+99) || !(y <= 2.75e+63)) tmp = Float64(x * Float64(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 <= -4.5e+99) || ~((y <= 2.75e+63))) 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, -4.5e+99], N[Not[LessEqual[y, 2.75e+63]], $MachinePrecision]], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $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 -4.5 \cdot 10^{+99} \lor \neg \left(y \leq 2.75 \cdot 10^{+63}\right):\\
\;\;\;\;x \cdot \frac{\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 < -4.5e99 or 2.75000000000000002e63 < y Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum77.0%
associate-/l*77.0%
associate-/r/77.0%
exp-neg77.0%
associate-*r/77.0%
Simplified59.0%
Taylor expanded in t around 0 69.1%
associate-/r*73.1%
Simplified73.1%
Taylor expanded in b around 0 88.2%
if -4.5e99 < y < 2.75000000000000002e63Initial program 97.0%
Taylor expanded in y around 0 92.7%
Final simplification90.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -400000000000.0) (not (<= y 7e+63))) (* 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 <= -400000000000.0) || !(y <= 7e+63)) {
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 <= (-400000000000.0d0)) .or. (.not. (y <= 7d+63))) 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 <= -400000000000.0) || !(y <= 7e+63)) {
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 <= -400000000000.0) or not (y <= 7e+63): 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 <= -400000000000.0) || !(y <= 7e+63)) tmp = Float64(x * Float64(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 <= -400000000000.0) || ~((y <= 7e+63))) 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, -400000000000.0], N[Not[LessEqual[y, 7e+63]], $MachinePrecision]], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $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 -400000000000 \lor \neg \left(y \leq 7 \cdot 10^{+63}\right):\\
\;\;\;\;x \cdot \frac{\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 < -4e11 or 7.00000000000000059e63 < y Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum75.6%
associate-/l*75.6%
associate-/r/75.6%
exp-neg75.6%
associate-*r/75.6%
Simplified58.8%
Taylor expanded in t around 0 67.3%
associate-/r*70.7%
Simplified70.7%
Taylor expanded in b around 0 86.8%
if -4e11 < y < 7.00000000000000059e63Initial program 96.6%
Taylor expanded in y around 0 93.1%
exp-diff81.3%
sub-neg81.3%
metadata-eval81.3%
*-commutative81.3%
exp-to-pow82.6%
Simplified82.6%
Final simplification84.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (/ (/ (pow z y) a) y))))
(if (<= y -460000000000.0)
t_1
(if (<= y 4.5e-285)
(/ (/ x (* a (exp b))) y)
(if (<= y 3e-6) (/ (* x (pow a (+ t -1.0))) y) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * ((pow(z, y) / a) / y);
double tmp;
if (y <= -460000000000.0) {
tmp = t_1;
} else if (y <= 4.5e-285) {
tmp = (x / (a * exp(b))) / y;
} else if (y <= 3e-6) {
tmp = (x * pow(a, (t + -1.0))) / y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x * (((z ** y) / a) / y)
if (y <= (-460000000000.0d0)) then
tmp = t_1
else if (y <= 4.5d-285) then
tmp = (x / (a * exp(b))) / y
else if (y <= 3d-6) then
tmp = (x * (a ** (t + (-1.0d0)))) / y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * ((Math.pow(z, y) / a) / y);
double tmp;
if (y <= -460000000000.0) {
tmp = t_1;
} else if (y <= 4.5e-285) {
tmp = (x / (a * Math.exp(b))) / y;
} else if (y <= 3e-6) {
tmp = (x * Math.pow(a, (t + -1.0))) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * ((math.pow(z, y) / a) / y) tmp = 0 if y <= -460000000000.0: tmp = t_1 elif y <= 4.5e-285: tmp = (x / (a * math.exp(b))) / y elif y <= 3e-6: tmp = (x * math.pow(a, (t + -1.0))) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64(Float64((z ^ y) / a) / y)) tmp = 0.0 if (y <= -460000000000.0) tmp = t_1; elseif (y <= 4.5e-285) tmp = Float64(Float64(x / Float64(a * exp(b))) / y); elseif (y <= 3e-6) tmp = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * (((z ^ y) / a) / y); tmp = 0.0; if (y <= -460000000000.0) tmp = t_1; elseif (y <= 4.5e-285) tmp = (x / (a * exp(b))) / y; elseif (y <= 3e-6) tmp = (x * (a ^ (t + -1.0))) / y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -460000000000.0], t$95$1, If[LessEqual[y, 4.5e-285], N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 3e-6], N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\
\mathbf{if}\;y \leq -460000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-285}:\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\
\mathbf{elif}\;y \leq 3 \cdot 10^{-6}:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -4.6e11 or 3.0000000000000001e-6 < y Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum76.7%
associate-/l*76.7%
associate-/r/76.7%
exp-neg76.7%
associate-*r/76.7%
Simplified58.6%
Taylor expanded in t around 0 66.3%
associate-/r*70.0%
Simplified70.0%
Taylor expanded in b around 0 83.7%
if -4.6e11 < y < 4.5000000000000002e-285Initial program 96.8%
Taylor expanded in t around 0 76.9%
mul-1-neg76.9%
Simplified76.9%
Taylor expanded in y around 0 76.9%
exp-neg76.9%
associate-*l/76.9%
*-lft-identity76.9%
+-commutative76.9%
exp-sum76.9%
rem-exp-log78.4%
Simplified78.4%
if 4.5000000000000002e-285 < y < 3.0000000000000001e-6Initial program 95.7%
Taylor expanded in y around 0 95.7%
Taylor expanded in b around 0 76.7%
Final simplification80.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -240000000000.0) (not (<= y 2.1))) (* x (/ (/ (pow z y) a) y)) (/ (/ x (* a (exp b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -240000000000.0) || !(y <= 2.1)) {
tmp = x * ((pow(z, y) / a) / y);
} else {
tmp = (x / (a * exp(b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-240000000000.0d0)) .or. (.not. (y <= 2.1d0))) then
tmp = x * (((z ** y) / a) / y)
else
tmp = (x / (a * exp(b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -240000000000.0) || !(y <= 2.1)) {
tmp = x * ((Math.pow(z, y) / a) / y);
} else {
tmp = (x / (a * Math.exp(b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -240000000000.0) or not (y <= 2.1): tmp = x * ((math.pow(z, y) / a) / y) else: tmp = (x / (a * math.exp(b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -240000000000.0) || !(y <= 2.1)) tmp = Float64(x * Float64(Float64((z ^ y) / a) / y)); else tmp = Float64(Float64(x / Float64(a * exp(b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -240000000000.0) || ~((y <= 2.1))) tmp = x * (((z ^ y) / a) / y); else tmp = (x / (a * exp(b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -240000000000.0], N[Not[LessEqual[y, 2.1]], $MachinePrecision]], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -240000000000 \lor \neg \left(y \leq 2.1\right):\\
\;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\
\end{array}
\end{array}
if y < -2.4e11 or 2.10000000000000009 < y Initial program 100.0%
associate-*r/100.0%
sub-neg100.0%
exp-sum77.3%
associate-/l*77.3%
associate-/r/77.3%
exp-neg77.3%
associate-*r/77.3%
Simplified59.1%
Taylor expanded in t around 0 66.0%
associate-/r*69.8%
Simplified69.8%
Taylor expanded in b around 0 84.3%
if -2.4e11 < y < 2.10000000000000009Initial program 96.3%
Taylor expanded in t around 0 70.4%
mul-1-neg70.4%
Simplified70.4%
Taylor expanded in y around 0 70.4%
exp-neg70.4%
associate-*l/70.4%
*-lft-identity70.4%
+-commutative70.4%
exp-sum70.3%
rem-exp-log71.8%
Simplified71.8%
Final simplification78.3%
(FPCore (x y z t a b) :precision binary64 (/ x (* y (* a (exp b)))))
double code(double x, double y, double z, double t, double a, double b) {
return x / (y * (a * exp(b)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x / (y * (a * exp(b)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / (y * (a * Math.exp(b)));
}
def code(x, y, z, t, a, b): return x / (y * (a * math.exp(b)))
function code(x, y, z, t, a, b) return Float64(x / Float64(y * Float64(a * exp(b)))) end
function tmp = code(x, y, z, t, a, b) tmp = x / (y * (a * exp(b))); end
code[x_, y_, z_, t_, a_, b_] := N[(x / N[(y * N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y \cdot \left(a \cdot e^{b}\right)}
\end{array}
Initial program 98.2%
associate-*r/97.8%
sub-neg97.8%
exp-sum79.9%
associate-/l*79.9%
associate-/r/79.1%
exp-neg79.1%
associate-*r/79.1%
Simplified70.4%
Taylor expanded in t around 0 68.4%
associate-/r*70.4%
Simplified70.4%
Taylor expanded in y around 0 56.4%
Final simplification56.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -14000.0)
(+ (- (/ x (* y a)) (* (/ b y) (/ x a))) (/ (/ (* x (* b b)) y) a))
(if (<= b -4.1e-279)
(/ (/ x (* a (+ 1.0 b))) y)
(if (<= b 1.15e-31) (* x (/ (/ 1.0 a) y)) (/ (/ x (* a b)) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -14000.0) {
tmp = ((x / (y * a)) - ((b / y) * (x / a))) + (((x * (b * b)) / y) / a);
} else if (b <= -4.1e-279) {
tmp = (x / (a * (1.0 + b))) / y;
} else if (b <= 1.15e-31) {
tmp = x * ((1.0 / a) / y);
} else {
tmp = (x / (a * b)) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-14000.0d0)) then
tmp = ((x / (y * a)) - ((b / y) * (x / a))) + (((x * (b * b)) / y) / a)
else if (b <= (-4.1d-279)) then
tmp = (x / (a * (1.0d0 + b))) / y
else if (b <= 1.15d-31) then
tmp = x * ((1.0d0 / a) / y)
else
tmp = (x / (a * b)) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -14000.0) {
tmp = ((x / (y * a)) - ((b / y) * (x / a))) + (((x * (b * b)) / y) / a);
} else if (b <= -4.1e-279) {
tmp = (x / (a * (1.0 + b))) / y;
} else if (b <= 1.15e-31) {
tmp = x * ((1.0 / a) / y);
} else {
tmp = (x / (a * b)) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -14000.0: tmp = ((x / (y * a)) - ((b / y) * (x / a))) + (((x * (b * b)) / y) / a) elif b <= -4.1e-279: tmp = (x / (a * (1.0 + b))) / y elif b <= 1.15e-31: tmp = x * ((1.0 / a) / y) else: tmp = (x / (a * b)) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -14000.0) tmp = Float64(Float64(Float64(x / Float64(y * a)) - Float64(Float64(b / y) * Float64(x / a))) + Float64(Float64(Float64(x * Float64(b * b)) / y) / a)); elseif (b <= -4.1e-279) tmp = Float64(Float64(x / Float64(a * Float64(1.0 + b))) / y); elseif (b <= 1.15e-31) tmp = Float64(x * Float64(Float64(1.0 / a) / y)); else tmp = Float64(Float64(x / Float64(a * b)) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -14000.0) tmp = ((x / (y * a)) - ((b / y) * (x / a))) + (((x * (b * b)) / y) / a); elseif (b <= -4.1e-279) tmp = (x / (a * (1.0 + b))) / y; elseif (b <= 1.15e-31) tmp = x * ((1.0 / a) / y); else tmp = (x / (a * b)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -14000.0], N[(N[(N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision] - N[(N[(b / y), $MachinePrecision] * N[(x / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x * N[(b * b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -4.1e-279], N[(N[(x / N[(a * N[(1.0 + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 1.15e-31], N[(x * N[(N[(1.0 / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(a * b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -14000:\\
\;\;\;\;\left(\frac{x}{y \cdot a} - \frac{b}{y} \cdot \frac{x}{a}\right) + \frac{\frac{x \cdot \left(b \cdot b\right)}{y}}{a}\\
\mathbf{elif}\;b \leq -4.1 \cdot 10^{-279}:\\
\;\;\;\;\frac{\frac{x}{a \cdot \left(1 + b\right)}}{y}\\
\mathbf{elif}\;b \leq 1.15 \cdot 10^{-31}:\\
\;\;\;\;x \cdot \frac{\frac{1}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a \cdot b}}{y}\\
\end{array}
\end{array}
if b < -14000Initial program 100.0%
Taylor expanded in t around 0 89.1%
mul-1-neg89.1%
Simplified89.1%
Taylor expanded in y around 0 79.7%
exp-neg79.7%
associate-*l/79.7%
*-lft-identity79.7%
+-commutative79.7%
exp-sum79.7%
rem-exp-log79.7%
Simplified79.7%
Taylor expanded in b around 0 10.8%
Taylor expanded in b around 0 56.7%
+-commutative56.7%
mul-1-neg56.7%
times-frac61.1%
*-commutative61.1%
associate-/r*68.9%
*-commutative68.9%
unpow268.9%
Simplified68.9%
if -14000 < b < -4.10000000000000017e-279Initial program 98.7%
Taylor expanded in t around 0 80.2%
mul-1-neg80.2%
Simplified80.2%
Taylor expanded in y around 0 36.8%
exp-neg36.8%
associate-*l/36.8%
*-lft-identity36.8%
+-commutative36.8%
exp-sum36.6%
rem-exp-log38.0%
Simplified38.0%
Taylor expanded in b around 0 38.0%
*-commutative38.0%
distribute-lft1-in38.0%
Applied egg-rr38.0%
if -4.10000000000000017e-279 < b < 1.1499999999999999e-31Initial program 94.4%
associate-*r/96.8%
sub-neg96.8%
exp-sum96.8%
associate-/l*96.8%
associate-/r/96.8%
exp-neg96.8%
associate-*r/96.8%
Simplified91.3%
Taylor expanded in t around 0 73.0%
associate-/r*77.4%
Simplified77.4%
Taylor expanded in b around 0 77.4%
Taylor expanded in y around 0 44.1%
associate-/l/44.1%
Simplified44.1%
if 1.1499999999999999e-31 < b Initial program 100.0%
Taylor expanded in t around 0 83.8%
mul-1-neg83.8%
Simplified83.8%
Taylor expanded in y around 0 69.0%
exp-neg69.0%
associate-*l/69.0%
*-lft-identity69.0%
+-commutative69.0%
exp-sum69.0%
rem-exp-log69.0%
Simplified69.0%
Taylor expanded in b around 0 42.4%
Taylor expanded in b around inf 42.5%
Final simplification48.4%
(FPCore (x y z t a b) :precision binary64 (if (<= b -9.6e-167) (/ (+ (- (/ x a) (/ b (/ a x))) (/ (* b b) (/ a x))) y) (/ x (* y (+ a (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -9.6e-167) {
tmp = (((x / a) - (b / (a / x))) + ((b * b) / (a / x))) / y;
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-9.6d-167)) then
tmp = (((x / a) - (b / (a / x))) + ((b * b) / (a / x))) / y
else
tmp = x / (y * (a + (a * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -9.6e-167) {
tmp = (((x / a) - (b / (a / x))) + ((b * b) / (a / x))) / y;
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -9.6e-167: tmp = (((x / a) - (b / (a / x))) + ((b * b) / (a / x))) / y else: tmp = x / (y * (a + (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -9.6e-167) tmp = Float64(Float64(Float64(Float64(x / a) - Float64(b / Float64(a / x))) + Float64(Float64(b * b) / Float64(a / x))) / y); else tmp = Float64(x / Float64(y * Float64(a + Float64(a * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -9.6e-167) tmp = (((x / a) - (b / (a / x))) + ((b * b) / (a / x))) / y; else tmp = x / (y * (a + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -9.6e-167], N[(N[(N[(N[(x / a), $MachinePrecision] - N[(b / N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * b), $MachinePrecision] / N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -9.6 \cdot 10^{-167}:\\
\;\;\;\;\frac{\left(\frac{x}{a} - \frac{b}{\frac{a}{x}}\right) + \frac{b \cdot b}{\frac{a}{x}}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\
\end{array}
\end{array}
if b < -9.59999999999999972e-167Initial program 99.3%
Taylor expanded in t around 0 88.2%
mul-1-neg88.2%
Simplified88.2%
Taylor expanded in y around 0 67.1%
exp-neg67.2%
associate-*l/67.2%
*-lft-identity67.2%
+-commutative67.2%
exp-sum67.1%
rem-exp-log67.8%
Simplified67.8%
Taylor expanded in b around 0 23.1%
Taylor expanded in b around 0 57.9%
+-commutative57.9%
+-commutative57.9%
mul-1-neg57.9%
unsub-neg57.9%
associate-/l*57.9%
associate-/l*49.9%
unpow249.9%
Simplified49.9%
if -9.59999999999999972e-167 < b Initial program 97.5%
associate-*r/98.6%
sub-neg98.6%
exp-sum84.1%
associate-/l*84.1%
associate-/r/82.8%
exp-neg82.8%
associate-*r/82.8%
Simplified73.6%
Taylor expanded in t around 0 66.0%
associate-/r*68.5%
Simplified68.5%
Taylor expanded in y around 0 51.2%
Taylor expanded in b around 0 39.3%
Final simplification43.3%
(FPCore (x y z t a b) :precision binary64 (if (<= b -4.6e-274) (- (/ (/ x a) y) (* (/ b y) (/ x a))) (/ x (* y (+ a (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -4.6e-274) {
tmp = ((x / a) / y) - ((b / y) * (x / a));
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-4.6d-274)) then
tmp = ((x / a) / y) - ((b / y) * (x / a))
else
tmp = x / (y * (a + (a * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -4.6e-274) {
tmp = ((x / a) / y) - ((b / y) * (x / a));
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -4.6e-274: tmp = ((x / a) / y) - ((b / y) * (x / a)) else: tmp = x / (y * (a + (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -4.6e-274) tmp = Float64(Float64(Float64(x / a) / y) - Float64(Float64(b / y) * Float64(x / a))); else tmp = Float64(x / Float64(y * Float64(a + Float64(a * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -4.6e-274) tmp = ((x / a) / y) - ((b / y) * (x / a)); else tmp = x / (y * (a + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -4.6e-274], N[(N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision] - N[(N[(b / y), $MachinePrecision] * N[(x / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.6 \cdot 10^{-274}:\\
\;\;\;\;\frac{\frac{x}{a}}{y} - \frac{b}{y} \cdot \frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\
\end{array}
\end{array}
if b < -4.59999999999999992e-274Initial program 99.4%
associate-*r/97.2%
sub-neg97.2%
exp-sum78.2%
associate-/l*78.2%
associate-/r/78.2%
exp-neg78.2%
associate-*r/78.2%
Simplified67.9%
Taylor expanded in t around 0 70.6%
associate-/r*72.3%
Simplified72.3%
Taylor expanded in y around 0 56.6%
Taylor expanded in b around 0 29.7%
*-commutative29.7%
mul-1-neg29.7%
unsub-neg29.7%
associate-/l/30.5%
*-commutative30.5%
*-commutative30.5%
times-frac36.8%
Simplified36.8%
if -4.59999999999999992e-274 < b Initial program 97.1%
associate-*r/98.4%
sub-neg98.4%
exp-sum81.3%
associate-/l*81.3%
associate-/r/79.8%
exp-neg79.8%
associate-*r/79.8%
Simplified72.6%
Taylor expanded in t around 0 66.4%
associate-/r*68.7%
Simplified68.7%
Taylor expanded in y around 0 56.2%
Taylor expanded in b around 0 42.2%
Final simplification39.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b -2.9e-276) (/ (- (/ x a) (/ b (/ a x))) y) (/ x (* y (+ a (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.9e-276) {
tmp = ((x / a) - (b / (a / x))) / y;
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-2.9d-276)) then
tmp = ((x / a) - (b / (a / x))) / y
else
tmp = x / (y * (a + (a * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.9e-276) {
tmp = ((x / a) - (b / (a / x))) / y;
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -2.9e-276: tmp = ((x / a) - (b / (a / x))) / y else: tmp = x / (y * (a + (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.9e-276) tmp = Float64(Float64(Float64(x / a) - Float64(b / Float64(a / x))) / y); else tmp = Float64(x / Float64(y * Float64(a + Float64(a * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -2.9e-276) tmp = ((x / a) - (b / (a / x))) / y; else tmp = x / (y * (a + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.9e-276], N[(N[(N[(x / a), $MachinePrecision] - N[(b / N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.9 \cdot 10^{-276}:\\
\;\;\;\;\frac{\frac{x}{a} - \frac{b}{\frac{a}{x}}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\
\end{array}
\end{array}
if b < -2.89999999999999987e-276Initial program 99.4%
Taylor expanded in t around 0 84.8%
mul-1-neg84.8%
Simplified84.8%
Taylor expanded in y around 0 59.1%
exp-neg59.1%
associate-*l/59.1%
*-lft-identity59.1%
+-commutative59.1%
exp-sum59.0%
rem-exp-log59.7%
Simplified59.7%
Taylor expanded in b around 0 23.8%
Taylor expanded in b around 0 33.6%
+-commutative33.6%
mul-1-neg33.6%
unsub-neg33.6%
associate-/l*32.0%
Simplified32.0%
if -2.89999999999999987e-276 < b Initial program 97.1%
associate-*r/98.4%
sub-neg98.4%
exp-sum81.3%
associate-/l*81.3%
associate-/r/79.8%
exp-neg79.8%
associate-*r/79.8%
Simplified72.6%
Taylor expanded in t around 0 66.4%
associate-/r*68.7%
Simplified68.7%
Taylor expanded in y around 0 56.2%
Taylor expanded in b around 0 42.2%
Final simplification37.4%
(FPCore (x y z t a b) :precision binary64 (if (<= b -2.5e-279) (/ (- (/ x a) (/ x (/ a b))) y) (/ x (* y (+ a (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.5e-279) {
tmp = ((x / a) - (x / (a / b))) / y;
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-2.5d-279)) then
tmp = ((x / a) - (x / (a / b))) / y
else
tmp = x / (y * (a + (a * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.5e-279) {
tmp = ((x / a) - (x / (a / b))) / y;
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -2.5e-279: tmp = ((x / a) - (x / (a / b))) / y else: tmp = x / (y * (a + (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.5e-279) tmp = Float64(Float64(Float64(x / a) - Float64(x / Float64(a / b))) / y); else tmp = Float64(x / Float64(y * Float64(a + Float64(a * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -2.5e-279) tmp = ((x / a) - (x / (a / b))) / y; else tmp = x / (y * (a + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.5e-279], N[(N[(N[(x / a), $MachinePrecision] - N[(x / N[(a / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.5 \cdot 10^{-279}:\\
\;\;\;\;\frac{\frac{x}{a} - \frac{x}{\frac{a}{b}}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\
\end{array}
\end{array}
if b < -2.49999999999999984e-279Initial program 99.4%
Taylor expanded in t around 0 84.8%
mul-1-neg84.8%
Simplified84.8%
Taylor expanded in y around 0 59.1%
exp-neg59.1%
associate-*l/59.1%
*-lft-identity59.1%
+-commutative59.1%
exp-sum59.0%
rem-exp-log59.7%
Simplified59.7%
Taylor expanded in b around 0 33.6%
+-commutative33.6%
mul-1-neg33.6%
unsub-neg33.6%
*-commutative33.6%
associate-/l*35.1%
Simplified35.1%
if -2.49999999999999984e-279 < b Initial program 97.1%
associate-*r/98.4%
sub-neg98.4%
exp-sum81.3%
associate-/l*81.3%
associate-/r/79.8%
exp-neg79.8%
associate-*r/79.8%
Simplified72.6%
Taylor expanded in t around 0 66.4%
associate-/r*68.7%
Simplified68.7%
Taylor expanded in y around 0 56.2%
Taylor expanded in b around 0 42.2%
Final simplification38.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.16e-275) (/ (/ x y) a) (/ x (* y (+ a (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.16e-275) {
tmp = (x / y) / a;
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-1.16d-275)) then
tmp = (x / y) / a
else
tmp = x / (y * (a + (a * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.16e-275) {
tmp = (x / y) / a;
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.16e-275: tmp = (x / y) / a else: tmp = x / (y * (a + (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.16e-275) tmp = Float64(Float64(x / y) / a); else tmp = Float64(x / Float64(y * Float64(a + Float64(a * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.16e-275) tmp = (x / y) / a; else tmp = x / (y * (a + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.16e-275], N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision], N[(x / N[(y * N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.16 \cdot 10^{-275}:\\
\;\;\;\;\frac{\frac{x}{y}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\
\end{array}
\end{array}
if b < -1.15999999999999995e-275Initial program 99.4%
associate-*r/97.2%
sub-neg97.2%
exp-sum78.2%
associate-/l*78.2%
associate-/r/78.2%
exp-neg78.2%
associate-*r/78.2%
Simplified67.9%
Taylor expanded in t around 0 70.6%
associate-/r*72.3%
Simplified72.3%
Taylor expanded in b around 0 63.6%
Taylor expanded in y around 0 24.5%
div-inv23.7%
associate-/r*28.6%
Applied egg-rr28.6%
if -1.15999999999999995e-275 < b Initial program 97.1%
associate-*r/98.4%
sub-neg98.4%
exp-sum81.3%
associate-/l*81.3%
associate-/r/79.8%
exp-neg79.8%
associate-*r/79.8%
Simplified72.6%
Taylor expanded in t around 0 66.4%
associate-/r*68.7%
Simplified68.7%
Taylor expanded in y around 0 56.2%
Taylor expanded in b around 0 42.2%
Final simplification35.8%
(FPCore (x y z t a b) :precision binary64 (if (<= t 9.6e-287) (* (/ x a) (/ 1.0 y)) (/ (/ x y) a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 9.6e-287) {
tmp = (x / a) * (1.0 / y);
} else {
tmp = (x / y) / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= 9.6d-287) then
tmp = (x / a) * (1.0d0 / y)
else
tmp = (x / y) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 9.6e-287) {
tmp = (x / a) * (1.0 / y);
} else {
tmp = (x / y) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= 9.6e-287: tmp = (x / a) * (1.0 / y) else: tmp = (x / y) / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= 9.6e-287) tmp = Float64(Float64(x / a) * Float64(1.0 / y)); else tmp = Float64(Float64(x / y) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= 9.6e-287) tmp = (x / a) * (1.0 / y); else tmp = (x / y) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, 9.6e-287], N[(N[(x / a), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 9.6 \cdot 10^{-287}:\\
\;\;\;\;\frac{x}{a} \cdot \frac{1}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{a}\\
\end{array}
\end{array}
if t < 9.59999999999999997e-287Initial program 97.9%
associate-*r/98.5%
sub-neg98.5%
exp-sum80.2%
associate-/l*80.2%
associate-/r/79.5%
exp-neg79.5%
associate-*r/79.5%
Simplified73.0%
Taylor expanded in t around 0 68.4%
times-frac66.9%
*-commutative66.9%
associate-/r*66.9%
Simplified66.9%
Taylor expanded in b around 0 53.1%
Taylor expanded in y around 0 31.4%
if 9.59999999999999997e-287 < t Initial program 98.6%
associate-*r/97.1%
sub-neg97.1%
exp-sum79.4%
associate-/l*79.4%
associate-/r/78.6%
exp-neg78.6%
associate-*r/78.6%
Simplified67.3%
Taylor expanded in t around 0 68.5%
associate-/r*69.4%
Simplified69.4%
Taylor expanded in b around 0 63.7%
Taylor expanded in y around 0 25.8%
div-inv25.7%
associate-/r*30.5%
Applied egg-rr30.5%
Final simplification31.0%
(FPCore (x y z t a b) :precision binary64 (if (<= t 6.3e-267) (/ 1.0 (* y (/ a x))) (/ (/ x y) a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 6.3e-267) {
tmp = 1.0 / (y * (a / x));
} else {
tmp = (x / y) / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= 6.3d-267) then
tmp = 1.0d0 / (y * (a / x))
else
tmp = (x / y) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 6.3e-267) {
tmp = 1.0 / (y * (a / x));
} else {
tmp = (x / y) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= 6.3e-267: tmp = 1.0 / (y * (a / x)) else: tmp = (x / y) / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= 6.3e-267) tmp = Float64(1.0 / Float64(y * Float64(a / x))); else tmp = Float64(Float64(x / y) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= 6.3e-267) tmp = 1.0 / (y * (a / x)); else tmp = (x / y) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, 6.3e-267], N[(1.0 / N[(y * N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 6.3 \cdot 10^{-267}:\\
\;\;\;\;\frac{1}{y \cdot \frac{a}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{a}\\
\end{array}
\end{array}
if t < 6.30000000000000042e-267Initial program 97.9%
associate-*r/98.5%
sub-neg98.5%
exp-sum80.9%
associate-/l*80.9%
associate-/r/80.2%
exp-neg80.2%
associate-*r/80.2%
Simplified74.0%
Taylor expanded in t around 0 68.8%
associate-/r*72.3%
Simplified72.3%
Taylor expanded in b around 0 60.3%
Taylor expanded in y around 0 30.5%
associate-/r*30.5%
associate-*r/28.5%
associate-*l/32.4%
clear-num33.7%
frac-times33.1%
metadata-eval33.1%
Applied egg-rr33.1%
if 6.30000000000000042e-267 < t Initial program 98.6%
associate-*r/97.0%
sub-neg97.0%
exp-sum78.6%
associate-/l*78.6%
associate-/r/77.7%
exp-neg77.7%
associate-*r/77.7%
Simplified65.9%
Taylor expanded in t around 0 68.0%
associate-/r*68.0%
Simplified68.0%
Taylor expanded in b around 0 62.1%
Taylor expanded in y around 0 24.2%
div-inv24.2%
associate-/r*29.2%
Applied egg-rr29.2%
Final simplification31.3%
(FPCore (x y z t a b) :precision binary64 (if (<= b 1.7e+53) (/ (/ x y) a) (/ x (* a (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 1.7e+53) {
tmp = (x / y) / a;
} else {
tmp = x / (a * (y * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= 1.7d+53) then
tmp = (x / y) / a
else
tmp = x / (a * (y * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 1.7e+53) {
tmp = (x / y) / a;
} else {
tmp = x / (a * (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 1.7e+53: tmp = (x / y) / a else: tmp = x / (a * (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 1.7e+53) tmp = Float64(Float64(x / y) / a); else tmp = Float64(x / Float64(a * Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 1.7e+53) tmp = (x / y) / a; else tmp = x / (a * (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 1.7e+53], N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision], N[(x / N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.7 \cdot 10^{+53}:\\
\;\;\;\;\frac{\frac{x}{y}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot b\right)}\\
\end{array}
\end{array}
if b < 1.69999999999999999e53Initial program 97.8%
associate-*r/97.4%
sub-neg97.4%
exp-sum82.6%
associate-/l*82.6%
associate-/r/82.1%
exp-neg82.1%
associate-*r/82.1%
Simplified73.9%
Taylor expanded in t around 0 68.2%
associate-/r*70.6%
Simplified70.6%
Taylor expanded in b around 0 67.5%
Taylor expanded in y around 0 30.4%
div-inv29.9%
associate-/r*31.7%
Applied egg-rr31.7%
if 1.69999999999999999e53 < b Initial program 100.0%
Taylor expanded in t around 0 91.4%
mul-1-neg91.4%
Simplified91.4%
Taylor expanded in y around 0 85.0%
exp-neg85.0%
associate-*l/85.0%
*-lft-identity85.0%
+-commutative85.0%
exp-sum85.0%
rem-exp-log85.0%
Simplified85.0%
Taylor expanded in b around 0 48.9%
Taylor expanded in b around inf 39.8%
Final simplification33.1%
(FPCore (x y z t a b) :precision binary64 (if (<= b 3.9e-69) (/ (/ x y) a) (/ (/ x (* a b)) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 3.9e-69) {
tmp = (x / y) / a;
} else {
tmp = (x / (a * b)) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= 3.9d-69) then
tmp = (x / y) / a
else
tmp = (x / (a * b)) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 3.9e-69) {
tmp = (x / y) / a;
} else {
tmp = (x / (a * b)) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 3.9e-69: tmp = (x / y) / a else: tmp = (x / (a * b)) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 3.9e-69) tmp = Float64(Float64(x / y) / a); else tmp = Float64(Float64(x / Float64(a * b)) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 3.9e-69) tmp = (x / y) / a; else tmp = (x / (a * b)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 3.9e-69], N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision], N[(N[(x / N[(a * b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 3.9 \cdot 10^{-69}:\\
\;\;\;\;\frac{\frac{x}{y}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a \cdot b}}{y}\\
\end{array}
\end{array}
if b < 3.89999999999999981e-69Initial program 97.4%
associate-*r/96.9%
sub-neg96.9%
exp-sum84.2%
associate-/l*84.2%
associate-/r/84.2%
exp-neg84.2%
associate-*r/84.2%
Simplified75.8%
Taylor expanded in t around 0 71.2%
associate-/r*74.0%
Simplified74.0%
Taylor expanded in b around 0 68.1%
Taylor expanded in y around 0 31.4%
div-inv30.9%
associate-/r*32.9%
Applied egg-rr32.9%
if 3.89999999999999981e-69 < b Initial program 100.0%
Taylor expanded in t around 0 81.9%
mul-1-neg81.9%
Simplified81.9%
Taylor expanded in y around 0 63.7%
exp-neg63.7%
associate-*l/63.7%
*-lft-identity63.7%
+-commutative63.7%
exp-sum63.7%
rem-exp-log63.7%
Simplified63.7%
Taylor expanded in b around 0 40.4%
Taylor expanded in b around inf 41.6%
Final simplification35.5%
(FPCore (x y z t a b) :precision binary64 (if (<= t 1e-286) (/ (/ x a) y) (/ (/ x y) a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 1e-286) {
tmp = (x / a) / y;
} else {
tmp = (x / y) / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= 1d-286) then
tmp = (x / a) / y
else
tmp = (x / y) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 1e-286) {
tmp = (x / a) / y;
} else {
tmp = (x / y) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= 1e-286: tmp = (x / a) / y else: tmp = (x / y) / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= 1e-286) tmp = Float64(Float64(x / a) / y); else tmp = Float64(Float64(x / y) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= 1e-286) tmp = (x / a) / y; else tmp = (x / y) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, 1e-286], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 10^{-286}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{a}\\
\end{array}
\end{array}
if t < 1.00000000000000005e-286Initial program 97.9%
associate-*r/98.5%
sub-neg98.5%
exp-sum80.2%
associate-/l*80.2%
associate-/r/79.5%
exp-neg79.5%
associate-*r/79.5%
Simplified73.0%
Taylor expanded in t around 0 68.4%
associate-/r*71.3%
Simplified71.3%
Taylor expanded in b around 0 58.9%
Taylor expanded in y around 0 28.7%
associate-/l/31.4%
Simplified31.4%
if 1.00000000000000005e-286 < t Initial program 98.6%
associate-*r/97.1%
sub-neg97.1%
exp-sum79.4%
associate-/l*79.4%
associate-/r/78.6%
exp-neg78.6%
associate-*r/78.6%
Simplified67.3%
Taylor expanded in t around 0 68.5%
associate-/r*69.4%
Simplified69.4%
Taylor expanded in b around 0 63.7%
Taylor expanded in y around 0 25.8%
div-inv25.7%
associate-/r*30.5%
Applied egg-rr30.5%
Final simplification31.0%
(FPCore (x y z t a b) :precision binary64 (/ x (* y a)))
double code(double x, double y, double z, double t, double a, double b) {
return x / (y * a);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x / (y * a)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / (y * a);
}
def code(x, y, z, t, a, b): return x / (y * a)
function code(x, y, z, t, a, b) return Float64(x / Float64(y * a)) end
function tmp = code(x, y, z, t, a, b) tmp = x / (y * a); end
code[x_, y_, z_, t_, a_, b_] := N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y \cdot a}
\end{array}
Initial program 98.2%
associate-*r/97.8%
sub-neg97.8%
exp-sum79.9%
associate-/l*79.9%
associate-/r/79.1%
exp-neg79.1%
associate-*r/79.1%
Simplified70.4%
Taylor expanded in t around 0 68.4%
associate-/r*70.4%
Simplified70.4%
Taylor expanded in b around 0 61.1%
Taylor expanded in y around 0 27.3%
Final simplification27.3%
(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.2%
associate-*r/97.8%
sub-neg97.8%
exp-sum79.9%
associate-/l*79.9%
associate-/r/79.1%
exp-neg79.1%
associate-*r/79.1%
Simplified70.4%
Taylor expanded in t around 0 68.4%
associate-/r*70.4%
Simplified70.4%
Taylor expanded in b around 0 61.1%
Taylor expanded in y around 0 27.3%
associate-/l/28.0%
Simplified28.0%
Final simplification28.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (pow a (- t 1.0)))
(t_2 (/ (* x (/ t_1 y)) (- (+ b 1.0) (* y (log z))))))
(if (< t -0.8845848504127471)
t_2
(if (< t 852031.2288374073)
(/ (* (/ x y) t_1) (exp (- b (* (log z) y))))
t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = pow(a, (t - 1.0));
double t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * log(z)));
double tmp;
if (t < -0.8845848504127471) {
tmp = t_2;
} else if (t < 852031.2288374073) {
tmp = ((x / y) * t_1) / exp((b - (log(z) * y)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a ** (t - 1.0d0)
t_2 = (x * (t_1 / y)) / ((b + 1.0d0) - (y * log(z)))
if (t < (-0.8845848504127471d0)) then
tmp = t_2
else if (t < 852031.2288374073d0) then
tmp = ((x / y) * t_1) / exp((b - (log(z) * y)))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = Math.pow(a, (t - 1.0));
double t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * Math.log(z)));
double tmp;
if (t < -0.8845848504127471) {
tmp = t_2;
} else if (t < 852031.2288374073) {
tmp = ((x / y) * t_1) / Math.exp((b - (Math.log(z) * y)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = math.pow(a, (t - 1.0)) t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * math.log(z))) tmp = 0 if t < -0.8845848504127471: tmp = t_2 elif t < 852031.2288374073: tmp = ((x / y) * t_1) / math.exp((b - (math.log(z) * y))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = a ^ Float64(t - 1.0) t_2 = Float64(Float64(x * Float64(t_1 / y)) / Float64(Float64(b + 1.0) - Float64(y * log(z)))) tmp = 0.0 if (t < -0.8845848504127471) tmp = t_2; elseif (t < 852031.2288374073) tmp = Float64(Float64(Float64(x / y) * t_1) / exp(Float64(b - Float64(log(z) * y)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a ^ (t - 1.0); t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * log(z))); tmp = 0.0; if (t < -0.8845848504127471) tmp = t_2; elseif (t < 852031.2288374073) tmp = ((x / y) * t_1) / exp((b - (log(z) * y))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision] / N[(N[(b + 1.0), $MachinePrecision] - N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -0.8845848504127471], t$95$2, If[Less[t, 852031.2288374073], N[(N[(N[(x / y), $MachinePrecision] * t$95$1), $MachinePrecision] / N[Exp[N[(b - N[(N[Log[z], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {a}^{\left(t - 1\right)}\\
t_2 := \frac{x \cdot \frac{t_1}{y}}{\left(b + 1\right) - y \cdot \log z}\\
\mathbf{if}\;t < -0.8845848504127471:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t < 852031.2288374073:\\
\;\;\;\;\frac{\frac{x}{y} \cdot t_1}{e^{b - \log z \cdot y}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
herbie shell --seed 2023185
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2, A"
:precision binary64
:herbie-target
(if (< t -0.8845848504127471) (/ (* x (/ (pow a (- t 1.0)) y)) (- (+ b 1.0) (* y (log z)))) (if (< t 852031.2288374073) (/ (* (/ x y) (pow a (- t 1.0))) (exp (- b (* (log z) y)))) (/ (* x (/ (pow a (- t 1.0)) y)) (- (+ b 1.0) (* y (log z))))))
(/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))