
(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 21 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.5%
Final simplification98.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (+ t -1.0) -2e+64) (not (<= (+ t -1.0) -0.95))) (/ (* x (exp (- (* (+ t -1.0) (log a)) b))) y) (/ (* x (exp (- (- (* y (log z)) (log a)) b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t + -1.0) <= -2e+64) || !((t + -1.0) <= -0.95)) {
tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y;
} else {
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (((t + (-1.0d0)) <= (-2d+64)) .or. (.not. ((t + (-1.0d0)) <= (-0.95d0)))) then
tmp = (x * exp((((t + (-1.0d0)) * log(a)) - b))) / y
else
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t + -1.0) <= -2e+64) || !((t + -1.0) <= -0.95)) {
tmp = (x * Math.exp((((t + -1.0) * Math.log(a)) - b))) / y;
} else {
tmp = (x * Math.exp((((y * Math.log(z)) - Math.log(a)) - b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((t + -1.0) <= -2e+64) or not ((t + -1.0) <= -0.95): tmp = (x * math.exp((((t + -1.0) * math.log(a)) - b))) / y else: tmp = (x * math.exp((((y * math.log(z)) - math.log(a)) - b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(t + -1.0) <= -2e+64) || !(Float64(t + -1.0) <= -0.95)) tmp = Float64(Float64(x * exp(Float64(Float64(Float64(t + -1.0) * log(a)) - b))) / y); else tmp = Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) - log(a)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((t + -1.0) <= -2e+64) || ~(((t + -1.0) <= -0.95))) tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y; else tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(t + -1.0), $MachinePrecision], -2e+64], N[Not[LessEqual[N[(t + -1.0), $MachinePrecision], -0.95]], $MachinePrecision]], N[(N[(x * N[Exp[N[(N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] - N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t + -1 \leq -2 \cdot 10^{+64} \lor \neg \left(t + -1 \leq -0.95\right):\\
\;\;\;\;\frac{x \cdot e^{\left(t + -1\right) \cdot \log a - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z - \log a\right) - b}}{y}\\
\end{array}
\end{array}
if (-.f64 t 1) < -2.00000000000000004e64 or -0.94999999999999996 < (-.f64 t 1) Initial program 99.1%
Taylor expanded in y around 0 94.1%
if -2.00000000000000004e64 < (-.f64 t 1) < -0.94999999999999996Initial program 98.0%
Taylor expanded in t around 0 97.3%
+-commutative97.3%
mul-1-neg97.3%
unsub-neg97.3%
Simplified97.3%
Final simplification95.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.2e+66) (not (<= y 8.5e+124))) (/ (* x (/ (pow z y) y)) a) (/ (* 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.2e+66) || !(y <= 8.5e+124)) {
tmp = (x * (pow(z, y) / y)) / a;
} 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.2d+66)) .or. (.not. (y <= 8.5d+124))) then
tmp = (x * ((z ** y) / y)) / a
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.2e+66) || !(y <= 8.5e+124)) {
tmp = (x * (Math.pow(z, y) / y)) / a;
} 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.2e+66) or not (y <= 8.5e+124): tmp = (x * (math.pow(z, y) / y)) / a 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.2e+66) || !(y <= 8.5e+124)) tmp = Float64(Float64(x * Float64((z ^ y) / y)) / a); 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.2e+66) || ~((y <= 8.5e+124))) tmp = (x * ((z ^ y) / y)) / a; 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.2e+66], N[Not[LessEqual[y, 8.5e+124]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / a), $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.2 \cdot 10^{+66} \lor \neg \left(y \leq 8.5 \cdot 10^{+124}\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{y}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(t + -1\right) \cdot \log a - b}}{y}\\
\end{array}
\end{array}
if y < -3.2e66 or 8.4999999999999997e124 < y Initial program 100.0%
associate-*l/86.2%
*-commutative86.2%
exp-diff71.3%
exp-sum58.5%
*-commutative58.5%
exp-to-pow58.5%
*-commutative58.5%
exp-to-pow58.5%
sub-neg58.5%
metadata-eval58.5%
Simplified58.5%
Taylor expanded in t around 0 70.3%
times-frac69.2%
Simplified69.2%
Taylor expanded in b around 0 78.9%
times-frac77.9%
Simplified77.9%
associate-*l/84.3%
Applied egg-rr84.3%
if -3.2e66 < y < 8.4999999999999997e124Initial program 97.6%
Taylor expanded in y around 0 94.1%
Final simplification90.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -3.4e-48) (not (<= b 5.8e-32))) (/ (* x (exp (- (* (+ t -1.0) (log a)) b))) y) (/ (* x (* (pow z y) (/ (pow a t) a))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -3.4e-48) || !(b <= 5.8e-32)) {
tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y;
} else {
tmp = (x * (pow(z, y) * (pow(a, t) / a))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-3.4d-48)) .or. (.not. (b <= 5.8d-32))) then
tmp = (x * exp((((t + (-1.0d0)) * log(a)) - b))) / y
else
tmp = (x * ((z ** y) * ((a ** t) / a))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -3.4e-48) || !(b <= 5.8e-32)) {
tmp = (x * Math.exp((((t + -1.0) * Math.log(a)) - b))) / y;
} else {
tmp = (x * (Math.pow(z, y) * (Math.pow(a, t) / a))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -3.4e-48) or not (b <= 5.8e-32): tmp = (x * math.exp((((t + -1.0) * math.log(a)) - b))) / y else: tmp = (x * (math.pow(z, y) * (math.pow(a, t) / a))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -3.4e-48) || !(b <= 5.8e-32)) tmp = Float64(Float64(x * exp(Float64(Float64(Float64(t + -1.0) * log(a)) - b))) / y); else tmp = Float64(Float64(x * Float64((z ^ y) * Float64((a ^ t) / a))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -3.4e-48) || ~((b <= 5.8e-32))) tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y; else tmp = (x * ((z ^ y) * ((a ^ t) / a))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -3.4e-48], N[Not[LessEqual[b, 5.8e-32]], $MachinePrecision]], N[(N[(x * N[Exp[N[(N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] * N[(N[Power[a, t], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.4 \cdot 10^{-48} \lor \neg \left(b \leq 5.8 \cdot 10^{-32}\right):\\
\;\;\;\;\frac{x \cdot e^{\left(t + -1\right) \cdot \log a - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left({z}^{y} \cdot \frac{{a}^{t}}{a}\right)}{y}\\
\end{array}
\end{array}
if b < -3.40000000000000028e-48 or 5.79999999999999991e-32 < b Initial program 99.8%
Taylor expanded in y around 0 91.3%
if -3.40000000000000028e-48 < b < 5.79999999999999991e-32Initial program 96.8%
Taylor expanded in b around 0 96.8%
+-commutative96.8%
exp-sum88.7%
*-commutative88.7%
exp-to-pow88.7%
*-commutative88.7%
exp-to-pow89.6%
sub-neg89.6%
metadata-eval89.6%
Simplified89.6%
unpow-prod-up89.7%
unpow-189.7%
Applied egg-rr89.7%
associate-*r/89.7%
*-rgt-identity89.7%
Simplified89.7%
Final simplification90.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -5.2e+59) (not (<= t 1.72))) (/ x (/ y (pow a (+ t -1.0)))) (* (/ x a) (/ (pow z y) (* y (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -5.2e+59) || !(t <= 1.72)) {
tmp = x / (y / pow(a, (t + -1.0)));
} else {
tmp = (x / a) * (pow(z, y) / (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 <= (-5.2d+59)) .or. (.not. (t <= 1.72d0))) then
tmp = x / (y / (a ** (t + (-1.0d0))))
else
tmp = (x / a) * ((z ** y) / (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 <= -5.2e+59) || !(t <= 1.72)) {
tmp = x / (y / Math.pow(a, (t + -1.0)));
} else {
tmp = (x / a) * (Math.pow(z, y) / (y * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -5.2e+59) or not (t <= 1.72): tmp = x / (y / math.pow(a, (t + -1.0))) else: tmp = (x / a) * (math.pow(z, y) / (y * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -5.2e+59) || !(t <= 1.72)) tmp = Float64(x / Float64(y / (a ^ Float64(t + -1.0)))); else tmp = Float64(Float64(x / a) * Float64((z ^ y) / Float64(y * exp(b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -5.2e+59) || ~((t <= 1.72))) tmp = x / (y / (a ^ (t + -1.0))); else tmp = (x / a) * ((z ^ y) / (y * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -5.2e+59], N[Not[LessEqual[t, 1.72]], $MachinePrecision]], N[(x / N[(y / N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / a), $MachinePrecision] * N[(N[Power[z, y], $MachinePrecision] / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.2 \cdot 10^{+59} \lor \neg \left(t \leq 1.72\right):\\
\;\;\;\;\frac{x}{\frac{y}{{a}^{\left(t + -1\right)}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a} \cdot \frac{{z}^{y}}{y \cdot e^{b}}\\
\end{array}
\end{array}
if t < -5.19999999999999999e59 or 1.71999999999999997 < t Initial program 99.2%
Taylor expanded in y around 0 93.3%
Taylor expanded in b around 0 83.9%
associate-/l*83.9%
exp-to-pow83.9%
sub-neg83.9%
metadata-eval83.9%
+-commutative83.9%
Simplified83.9%
if -5.19999999999999999e59 < t < 1.71999999999999997Initial program 97.9%
associate-*l/85.6%
*-commutative85.6%
exp-diff74.2%
exp-sum74.2%
*-commutative74.2%
exp-to-pow74.2%
*-commutative74.2%
exp-to-pow75.0%
sub-neg75.0%
metadata-eval75.0%
Simplified75.0%
Taylor expanded in t around 0 83.0%
times-frac80.4%
Simplified80.4%
Final simplification82.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.05e+67) (not (<= y 1850000000.0))) (/ (* x (/ (pow z y) y)) a) (/ (* x (/ (/ (pow a t) a) (exp b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.05e+67) || !(y <= 1850000000.0)) {
tmp = (x * (pow(z, y) / y)) / a;
} else {
tmp = (x * ((pow(a, t) / a) / exp(b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.05d+67)) .or. (.not. (y <= 1850000000.0d0))) then
tmp = (x * ((z ** y) / y)) / a
else
tmp = (x * (((a ** t) / a) / exp(b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.05e+67) || !(y <= 1850000000.0)) {
tmp = (x * (Math.pow(z, y) / y)) / a;
} else {
tmp = (x * ((Math.pow(a, t) / a) / Math.exp(b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.05e+67) or not (y <= 1850000000.0): tmp = (x * (math.pow(z, y) / y)) / a else: tmp = (x * ((math.pow(a, t) / a) / math.exp(b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.05e+67) || !(y <= 1850000000.0)) tmp = Float64(Float64(x * Float64((z ^ y) / y)) / a); else tmp = Float64(Float64(x * Float64(Float64((a ^ t) / a) / exp(b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.05e+67) || ~((y <= 1850000000.0))) tmp = (x * ((z ^ y) / y)) / a; else tmp = (x * (((a ^ t) / a) / exp(b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.05e+67], N[Not[LessEqual[y, 1850000000.0]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(N[(x * N[(N[(N[Power[a, t], $MachinePrecision] / a), $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{+67} \lor \neg \left(y \leq 1850000000\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{y}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \frac{\frac{{a}^{t}}{a}}{e^{b}}}{y}\\
\end{array}
\end{array}
if y < -1.0500000000000001e67 or 1.85e9 < y Initial program 100.0%
associate-*l/86.2%
*-commutative86.2%
exp-diff66.4%
exp-sum53.4%
*-commutative53.4%
exp-to-pow53.4%
*-commutative53.4%
exp-to-pow53.4%
sub-neg53.4%
metadata-eval53.4%
Simplified53.4%
Taylor expanded in t around 0 66.5%
times-frac64.7%
Simplified64.7%
Taylor expanded in b around 0 74.4%
times-frac72.7%
Simplified72.7%
associate-*l/80.5%
Applied egg-rr80.5%
if -1.0500000000000001e67 < y < 1.85e9Initial program 97.3%
Taylor expanded in y around 0 95.3%
exp-diff85.3%
sub-neg85.3%
metadata-eval85.3%
pow-to-exp86.0%
div-inv86.0%
pow-prod-up86.0%
inv-pow86.0%
associate-*l*86.0%
rec-exp86.0%
Applied egg-rr86.0%
rem-exp-log85.3%
log-rec85.3%
mul-1-neg85.3%
exp-sum85.3%
sub-neg85.3%
exp-diff85.3%
mul-1-neg85.3%
log-rec85.3%
rem-exp-log86.0%
associate-*r/86.0%
associate-*r/86.0%
*-rgt-identity86.0%
Simplified86.0%
Final simplification83.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -5.1e+57) (not (<= t 5.8))) (/ x (/ y (pow a (+ t -1.0)))) (/ (* 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 <= -5.1e+57) || !(t <= 5.8)) {
tmp = x / (y / pow(a, (t + -1.0)));
} 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 <= (-5.1d+57)) .or. (.not. (t <= 5.8d0))) then
tmp = x / (y / (a ** (t + (-1.0d0))))
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 <= -5.1e+57) || !(t <= 5.8)) {
tmp = x / (y / Math.pow(a, (t + -1.0)));
} 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 <= -5.1e+57) or not (t <= 5.8): tmp = x / (y / math.pow(a, (t + -1.0))) else: tmp = (x * math.pow(z, y)) / (a * (y * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -5.1e+57) || !(t <= 5.8)) tmp = Float64(x / Float64(y / (a ^ Float64(t + -1.0)))); else tmp = Float64(Float64(x * (z ^ y)) / Float64(a * Float64(y * exp(b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -5.1e+57) || ~((t <= 5.8))) tmp = x / (y / (a ^ (t + -1.0))); else tmp = (x * (z ^ y)) / (a * (y * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -5.1e+57], N[Not[LessEqual[t, 5.8]], $MachinePrecision]], N[(x / N[(y / N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.1 \cdot 10^{+57} \lor \neg \left(t \leq 5.8\right):\\
\;\;\;\;\frac{x}{\frac{y}{{a}^{\left(t + -1\right)}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot {z}^{y}}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
if t < -5.10000000000000023e57 or 5.79999999999999982 < t Initial program 99.2%
Taylor expanded in y around 0 93.3%
Taylor expanded in b around 0 84.1%
associate-/l*84.1%
exp-to-pow84.1%
sub-neg84.1%
metadata-eval84.1%
+-commutative84.1%
Simplified84.1%
if -5.10000000000000023e57 < t < 5.79999999999999982Initial program 97.9%
associate-*l/85.5%
*-commutative85.5%
exp-diff74.0%
exp-sum74.0%
*-commutative74.0%
exp-to-pow74.0%
*-commutative74.0%
exp-to-pow74.8%
sub-neg74.8%
metadata-eval74.8%
Simplified74.8%
Taylor expanded in t around 0 83.6%
Final simplification83.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (/ x (* a (exp b))) y)) (t_2 (/ x (/ y (pow a (+ t -1.0))))))
(if (<= t -2.15e-44)
t_2
(if (<= t -4.7e-265)
t_1
(if (<= t 1.05e-204)
(* (/ (pow z y) y) (/ x a))
(if (<= t 2.6) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / (a * exp(b))) / y;
double t_2 = x / (y / pow(a, (t + -1.0)));
double tmp;
if (t <= -2.15e-44) {
tmp = t_2;
} else if (t <= -4.7e-265) {
tmp = t_1;
} else if (t <= 1.05e-204) {
tmp = (pow(z, y) / y) * (x / a);
} else if (t <= 2.6) {
tmp = t_1;
} 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 = (x / (a * exp(b))) / y
t_2 = x / (y / (a ** (t + (-1.0d0))))
if (t <= (-2.15d-44)) then
tmp = t_2
else if (t <= (-4.7d-265)) then
tmp = t_1
else if (t <= 1.05d-204) then
tmp = ((z ** y) / y) * (x / a)
else if (t <= 2.6d0) then
tmp = t_1
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 = (x / (a * Math.exp(b))) / y;
double t_2 = x / (y / Math.pow(a, (t + -1.0)));
double tmp;
if (t <= -2.15e-44) {
tmp = t_2;
} else if (t <= -4.7e-265) {
tmp = t_1;
} else if (t <= 1.05e-204) {
tmp = (Math.pow(z, y) / y) * (x / a);
} else if (t <= 2.6) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x / (a * math.exp(b))) / y t_2 = x / (y / math.pow(a, (t + -1.0))) tmp = 0 if t <= -2.15e-44: tmp = t_2 elif t <= -4.7e-265: tmp = t_1 elif t <= 1.05e-204: tmp = (math.pow(z, y) / y) * (x / a) elif t <= 2.6: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x / Float64(a * exp(b))) / y) t_2 = Float64(x / Float64(y / (a ^ Float64(t + -1.0)))) tmp = 0.0 if (t <= -2.15e-44) tmp = t_2; elseif (t <= -4.7e-265) tmp = t_1; elseif (t <= 1.05e-204) tmp = Float64(Float64((z ^ y) / y) * Float64(x / a)); elseif (t <= 2.6) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x / (a * exp(b))) / y; t_2 = x / (y / (a ^ (t + -1.0))); tmp = 0.0; if (t <= -2.15e-44) tmp = t_2; elseif (t <= -4.7e-265) tmp = t_1; elseif (t <= 1.05e-204) tmp = ((z ^ y) / y) * (x / a); elseif (t <= 2.6) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(y / N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.15e-44], t$95$2, If[LessEqual[t, -4.7e-265], t$95$1, If[LessEqual[t, 1.05e-204], N[(N[(N[Power[z, y], $MachinePrecision] / y), $MachinePrecision] * N[(x / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.6], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{a \cdot e^{b}}}{y}\\
t_2 := \frac{x}{\frac{y}{{a}^{\left(t + -1\right)}}}\\
\mathbf{if}\;t \leq -2.15 \cdot 10^{-44}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -4.7 \cdot 10^{-265}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-204}:\\
\;\;\;\;\frac{{z}^{y}}{y} \cdot \frac{x}{a}\\
\mathbf{elif}\;t \leq 2.6:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -2.15000000000000007e-44 or 2.60000000000000009 < t Initial program 99.2%
Taylor expanded in y around 0 89.9%
Taylor expanded in b around 0 79.8%
associate-/l*80.5%
exp-to-pow80.6%
sub-neg80.6%
metadata-eval80.6%
+-commutative80.6%
Simplified80.6%
if -2.15000000000000007e-44 < t < -4.69999999999999986e-265 or 1.05000000000000005e-204 < t < 2.60000000000000009Initial program 97.7%
Taylor expanded in y around 0 76.0%
exp-diff76.0%
exp-to-pow76.8%
sub-neg76.8%
metadata-eval76.8%
Simplified76.8%
Taylor expanded in t around 0 76.0%
if -4.69999999999999986e-265 < t < 1.05000000000000005e-204Initial program 97.5%
associate-*l/87.1%
*-commutative87.1%
exp-diff78.3%
exp-sum78.4%
*-commutative78.4%
exp-to-pow78.4%
*-commutative78.4%
exp-to-pow79.3%
sub-neg79.3%
metadata-eval79.3%
Simplified79.3%
Taylor expanded in t around 0 85.4%
times-frac80.9%
Simplified80.9%
Taylor expanded in b around 0 79.9%
times-frac75.4%
Simplified75.4%
Final simplification78.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (/ y (pow a (+ t -1.0))))))
(if (<= t -5.2)
t_1
(if (<= t 1.9e-119)
(/ (* x (/ (pow z y) y)) a)
(if (<= t 3.5) (/ (/ x (* a (exp b))) y) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (y / pow(a, (t + -1.0)));
double tmp;
if (t <= -5.2) {
tmp = t_1;
} else if (t <= 1.9e-119) {
tmp = (x * (pow(z, y) / y)) / a;
} else if (t <= 3.5) {
tmp = (x / (a * exp(b))) / 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 / (y / (a ** (t + (-1.0d0))))
if (t <= (-5.2d0)) then
tmp = t_1
else if (t <= 1.9d-119) then
tmp = (x * ((z ** y) / y)) / a
else if (t <= 3.5d0) then
tmp = (x / (a * exp(b))) / 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 / (y / Math.pow(a, (t + -1.0)));
double tmp;
if (t <= -5.2) {
tmp = t_1;
} else if (t <= 1.9e-119) {
tmp = (x * (Math.pow(z, y) / y)) / a;
} else if (t <= 3.5) {
tmp = (x / (a * Math.exp(b))) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (y / math.pow(a, (t + -1.0))) tmp = 0 if t <= -5.2: tmp = t_1 elif t <= 1.9e-119: tmp = (x * (math.pow(z, y) / y)) / a elif t <= 3.5: tmp = (x / (a * math.exp(b))) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(y / (a ^ Float64(t + -1.0)))) tmp = 0.0 if (t <= -5.2) tmp = t_1; elseif (t <= 1.9e-119) tmp = Float64(Float64(x * Float64((z ^ y) / y)) / a); elseif (t <= 3.5) tmp = Float64(Float64(x / Float64(a * exp(b))) / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (y / (a ^ (t + -1.0))); tmp = 0.0; if (t <= -5.2) tmp = t_1; elseif (t <= 1.9e-119) tmp = (x * ((z ^ y) / y)) / a; elseif (t <= 3.5) tmp = (x / (a * exp(b))) / y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(y / N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.2], t$95$1, If[LessEqual[t, 1.9e-119], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, 3.5], N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{y}{{a}^{\left(t + -1\right)}}}\\
\mathbf{if}\;t \leq -5.2:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-119}:\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{y}}{a}\\
\mathbf{elif}\;t \leq 3.5:\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -5.20000000000000018 or 3.5 < t Initial program 99.3%
Taylor expanded in y around 0 93.1%
Taylor expanded in b around 0 82.4%
associate-/l*82.4%
exp-to-pow82.4%
sub-neg82.4%
metadata-eval82.4%
+-commutative82.4%
Simplified82.4%
if -5.20000000000000018 < t < 1.89999999999999987e-119Initial program 97.7%
associate-*l/86.5%
*-commutative86.5%
exp-diff76.7%
exp-sum76.7%
*-commutative76.7%
exp-to-pow76.7%
*-commutative76.7%
exp-to-pow77.5%
sub-neg77.5%
metadata-eval77.5%
Simplified77.5%
Taylor expanded in t around 0 83.4%
times-frac79.9%
Simplified79.9%
Taylor expanded in b around 0 69.3%
times-frac68.8%
Simplified68.8%
associate-*l/75.1%
Applied egg-rr75.1%
if 1.89999999999999987e-119 < t < 3.5Initial program 98.0%
Taylor expanded in y around 0 78.9%
exp-diff78.9%
exp-to-pow80.3%
sub-neg80.3%
metadata-eval80.3%
Simplified80.3%
Taylor expanded in t around 0 77.4%
Final simplification79.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -230.0) (not (<= b 9.2e-15))) (/ x (* a (* y (exp b)))) (* (/ (pow z y) y) (/ x a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -230.0) || !(b <= 9.2e-15)) {
tmp = x / (a * (y * exp(b)));
} else {
tmp = (pow(z, y) / y) * (x / 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 <= (-230.0d0)) .or. (.not. (b <= 9.2d-15))) then
tmp = x / (a * (y * exp(b)))
else
tmp = ((z ** y) / y) * (x / 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 <= -230.0) || !(b <= 9.2e-15)) {
tmp = x / (a * (y * Math.exp(b)));
} else {
tmp = (Math.pow(z, y) / y) * (x / a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -230.0) or not (b <= 9.2e-15): tmp = x / (a * (y * math.exp(b))) else: tmp = (math.pow(z, y) / y) * (x / a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -230.0) || !(b <= 9.2e-15)) tmp = Float64(x / Float64(a * Float64(y * exp(b)))); else tmp = Float64(Float64((z ^ y) / y) * Float64(x / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -230.0) || ~((b <= 9.2e-15))) tmp = x / (a * (y * exp(b))); else tmp = ((z ^ y) / y) * (x / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -230.0], N[Not[LessEqual[b, 9.2e-15]], $MachinePrecision]], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[z, y], $MachinePrecision] / y), $MachinePrecision] * N[(x / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -230 \lor \neg \left(b \leq 9.2 \cdot 10^{-15}\right):\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{{z}^{y}}{y} \cdot \frac{x}{a}\\
\end{array}
\end{array}
if b < -230 or 9.19999999999999961e-15 < b Initial program 100.0%
associate-*l/85.8%
*-commutative85.8%
exp-diff57.5%
exp-sum50.4%
*-commutative50.4%
exp-to-pow50.4%
*-commutative50.4%
exp-to-pow50.4%
sub-neg50.4%
metadata-eval50.4%
Simplified50.4%
Taylor expanded in t around 0 67.9%
times-frac61.5%
Simplified61.5%
Taylor expanded in y around 0 83.7%
if -230 < b < 9.19999999999999961e-15Initial program 97.0%
associate-*l/83.7%
*-commutative83.7%
exp-diff83.7%
exp-sum72.1%
*-commutative72.1%
exp-to-pow72.1%
*-commutative72.1%
exp-to-pow72.9%
sub-neg72.9%
metadata-eval72.9%
Simplified72.9%
Taylor expanded in t around 0 65.1%
times-frac66.2%
Simplified66.2%
Taylor expanded in b around 0 65.1%
times-frac66.2%
Simplified66.2%
Final simplification74.9%
(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.5%
associate-*l/84.7%
*-commutative84.7%
exp-diff70.7%
exp-sum61.3%
*-commutative61.3%
exp-to-pow61.3%
*-commutative61.3%
exp-to-pow61.7%
sub-neg61.7%
metadata-eval61.7%
Simplified61.7%
Taylor expanded in t around 0 66.4%
times-frac63.9%
Simplified63.9%
Taylor expanded in y around 0 59.6%
Final simplification59.6%
(FPCore (x y z t a b) :precision binary64 (/ (/ x (* a (exp b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x / (a * exp(b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x / (a * exp(b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x / (a * Math.exp(b))) / y;
}
def code(x, y, z, t, a, b): return (x / (a * math.exp(b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x / Float64(a * exp(b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x / (a * exp(b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{x}{a \cdot e^{b}}}{y}
\end{array}
Initial program 98.5%
Taylor expanded in y around 0 81.2%
exp-diff70.6%
exp-to-pow71.0%
sub-neg71.0%
metadata-eval71.0%
Simplified71.0%
Taylor expanded in t around 0 61.1%
Final simplification61.1%
(FPCore (x y z t a b) :precision binary64 (if (<= b -3.7e-8) (/ (- (* y (* a (* b (/ x y)))) (* x a)) (* a (* a (- y)))) (if (<= b 5.5e+66) (/ (/ x a) (* y (+ 1.0 b))) (/ x (* y (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -3.7e-8) {
tmp = ((y * (a * (b * (x / y)))) - (x * a)) / (a * (a * -y));
} else if (b <= 5.5e+66) {
tmp = (x / a) / (y * (1.0 + b));
} else {
tmp = x / (y * (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 <= (-3.7d-8)) then
tmp = ((y * (a * (b * (x / y)))) - (x * a)) / (a * (a * -y))
else if (b <= 5.5d+66) then
tmp = (x / a) / (y * (1.0d0 + b))
else
tmp = x / (y * (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 <= -3.7e-8) {
tmp = ((y * (a * (b * (x / y)))) - (x * a)) / (a * (a * -y));
} else if (b <= 5.5e+66) {
tmp = (x / a) / (y * (1.0 + b));
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -3.7e-8: tmp = ((y * (a * (b * (x / y)))) - (x * a)) / (a * (a * -y)) elif b <= 5.5e+66: tmp = (x / a) / (y * (1.0 + b)) else: tmp = x / (y * (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -3.7e-8) tmp = Float64(Float64(Float64(y * Float64(a * Float64(b * Float64(x / y)))) - Float64(x * a)) / Float64(a * Float64(a * Float64(-y)))); elseif (b <= 5.5e+66) tmp = Float64(Float64(x / a) / Float64(y * Float64(1.0 + b))); else tmp = Float64(x / Float64(y * Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -3.7e-8) tmp = ((y * (a * (b * (x / y)))) - (x * a)) / (a * (a * -y)); elseif (b <= 5.5e+66) tmp = (x / a) / (y * (1.0 + b)); else tmp = x / (y * (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -3.7e-8], N[(N[(N[(y * N[(a * N[(b * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision] / N[(a * N[(a * (-y)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.5e+66], N[(N[(x / a), $MachinePrecision] / N[(y * N[(1.0 + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.7 \cdot 10^{-8}:\\
\;\;\;\;\frac{y \cdot \left(a \cdot \left(b \cdot \frac{x}{y}\right)\right) - x \cdot a}{a \cdot \left(a \cdot \left(-y\right)\right)}\\
\mathbf{elif}\;b \leq 5.5 \cdot 10^{+66}:\\
\;\;\;\;\frac{\frac{x}{a}}{y \cdot \left(1 + b\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot b\right)}\\
\end{array}
\end{array}
if b < -3.7e-8Initial program 100.0%
associate-*l/86.0%
*-commutative86.0%
exp-diff63.2%
exp-sum56.1%
*-commutative56.1%
exp-to-pow56.1%
*-commutative56.1%
exp-to-pow56.1%
sub-neg56.1%
metadata-eval56.1%
Simplified56.1%
Taylor expanded in t around 0 65.1%
times-frac58.1%
Simplified58.1%
Taylor expanded in y around 0 81.1%
Taylor expanded in b around 0 33.7%
+-commutative33.7%
mul-1-neg33.7%
unsub-neg33.7%
times-frac37.0%
Simplified37.0%
frac-2neg37.0%
associate-*l/40.4%
frac-sub32.6%
*-commutative32.6%
distribute-rgt-neg-in32.6%
*-commutative32.6%
distribute-rgt-neg-in32.6%
Applied egg-rr32.6%
*-commutative32.6%
associate-*l*44.8%
*-commutative44.8%
Simplified44.8%
if -3.7e-8 < b < 5.5e66Initial program 97.3%
associate-*l/83.5%
*-commutative83.5%
exp-diff80.7%
exp-sum70.0%
*-commutative70.0%
exp-to-pow70.0%
*-commutative70.0%
exp-to-pow70.7%
sub-neg70.7%
metadata-eval70.7%
Simplified70.7%
Taylor expanded in t around 0 65.0%
times-frac65.3%
Simplified65.3%
Taylor expanded in y around 0 38.8%
Taylor expanded in b around 0 34.0%
distribute-lft-out35.4%
distribute-rgt1-in35.4%
Simplified35.4%
*-un-lft-identity35.4%
associate-/r*38.7%
*-commutative38.7%
Applied egg-rr38.7%
if 5.5e66 < b Initial program 100.0%
associate-*l/86.4%
*-commutative86.4%
exp-diff54.2%
exp-sum45.8%
*-commutative45.8%
exp-to-pow45.8%
*-commutative45.8%
exp-to-pow45.8%
sub-neg45.8%
metadata-eval45.8%
Simplified45.8%
Taylor expanded in t around 0 71.3%
times-frac66.2%
Simplified66.2%
Taylor expanded in y around 0 88.3%
Taylor expanded in b around 0 45.8%
distribute-lft-out45.8%
distribute-rgt1-in45.8%
Simplified45.8%
Taylor expanded in b around inf 45.8%
associate-*r*50.6%
Simplified50.6%
Final simplification42.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.56e-6) (* x (- (/ b (* y a)))) (if (<= b 5.5e+66) (/ (/ x a) (* y (+ 1.0 b))) (/ x (* y (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.56e-6) {
tmp = x * -(b / (y * a));
} else if (b <= 5.5e+66) {
tmp = (x / a) / (y * (1.0 + b));
} else {
tmp = x / (y * (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.56d-6)) then
tmp = x * -(b / (y * a))
else if (b <= 5.5d+66) then
tmp = (x / a) / (y * (1.0d0 + b))
else
tmp = x / (y * (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.56e-6) {
tmp = x * -(b / (y * a));
} else if (b <= 5.5e+66) {
tmp = (x / a) / (y * (1.0 + b));
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.56e-6: tmp = x * -(b / (y * a)) elif b <= 5.5e+66: tmp = (x / a) / (y * (1.0 + b)) else: tmp = x / (y * (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.56e-6) tmp = Float64(x * Float64(-Float64(b / Float64(y * a)))); elseif (b <= 5.5e+66) tmp = Float64(Float64(x / a) / Float64(y * Float64(1.0 + b))); else tmp = Float64(x / Float64(y * Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.56e-6) tmp = x * -(b / (y * a)); elseif (b <= 5.5e+66) tmp = (x / a) / (y * (1.0 + b)); else tmp = x / (y * (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.56e-6], N[(x * (-N[(b / N[(y * a), $MachinePrecision]), $MachinePrecision])), $MachinePrecision], If[LessEqual[b, 5.5e+66], N[(N[(x / a), $MachinePrecision] / N[(y * N[(1.0 + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.56 \cdot 10^{-6}:\\
\;\;\;\;x \cdot \left(-\frac{b}{y \cdot a}\right)\\
\mathbf{elif}\;b \leq 5.5 \cdot 10^{+66}:\\
\;\;\;\;\frac{\frac{x}{a}}{y \cdot \left(1 + b\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot b\right)}\\
\end{array}
\end{array}
if b < -1.5600000000000001e-6Initial program 100.0%
associate-*l/86.0%
*-commutative86.0%
exp-diff63.2%
exp-sum56.1%
*-commutative56.1%
exp-to-pow56.1%
*-commutative56.1%
exp-to-pow56.1%
sub-neg56.1%
metadata-eval56.1%
Simplified56.1%
Taylor expanded in t around 0 65.1%
times-frac58.1%
Simplified58.1%
Taylor expanded in y around 0 81.1%
Taylor expanded in b around 0 33.7%
+-commutative33.7%
mul-1-neg33.7%
unsub-neg33.7%
times-frac37.0%
Simplified37.0%
Taylor expanded in b around inf 33.7%
associate-*r/33.7%
*-commutative33.7%
neg-mul-133.7%
distribute-lft-neg-in33.7%
*-commutative33.7%
associate-*r/37.2%
*-commutative37.2%
Simplified37.2%
if -1.5600000000000001e-6 < b < 5.5e66Initial program 97.3%
associate-*l/83.5%
*-commutative83.5%
exp-diff80.7%
exp-sum70.0%
*-commutative70.0%
exp-to-pow70.0%
*-commutative70.0%
exp-to-pow70.7%
sub-neg70.7%
metadata-eval70.7%
Simplified70.7%
Taylor expanded in t around 0 65.0%
times-frac65.3%
Simplified65.3%
Taylor expanded in y around 0 38.8%
Taylor expanded in b around 0 34.0%
distribute-lft-out35.4%
distribute-rgt1-in35.4%
Simplified35.4%
*-un-lft-identity35.4%
associate-/r*38.7%
*-commutative38.7%
Applied egg-rr38.7%
if 5.5e66 < b Initial program 100.0%
associate-*l/86.4%
*-commutative86.4%
exp-diff54.2%
exp-sum45.8%
*-commutative45.8%
exp-to-pow45.8%
*-commutative45.8%
exp-to-pow45.8%
sub-neg45.8%
metadata-eval45.8%
Simplified45.8%
Taylor expanded in t around 0 71.3%
times-frac66.2%
Simplified66.2%
Taylor expanded in y around 0 88.3%
Taylor expanded in b around 0 45.8%
distribute-lft-out45.8%
distribute-rgt1-in45.8%
Simplified45.8%
Taylor expanded in b around inf 45.8%
associate-*r*50.6%
Simplified50.6%
Final simplification41.1%
(FPCore (x y z t a b) :precision binary64 (if (<= b 5.5e-28) (/ (- (/ x a) (* x (/ b a))) y) (/ x (* y (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 5.5e-28) {
tmp = ((x / a) - (x * (b / a))) / y;
} else {
tmp = x / (y * (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 <= 5.5d-28) then
tmp = ((x / a) - (x * (b / a))) / y
else
tmp = x / (y * (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 <= 5.5e-28) {
tmp = ((x / a) - (x * (b / a))) / y;
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 5.5e-28: tmp = ((x / a) - (x * (b / a))) / y else: tmp = x / (y * (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 5.5e-28) tmp = Float64(Float64(Float64(x / a) - Float64(x * Float64(b / a))) / y); else tmp = Float64(x / Float64(y * Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 5.5e-28) tmp = ((x / a) - (x * (b / a))) / y; else tmp = x / (y * (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 5.5e-28], N[(N[(N[(x / a), $MachinePrecision] - N[(x * N[(b / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 5.5 \cdot 10^{-28}:\\
\;\;\;\;\frac{\frac{x}{a} - x \cdot \frac{b}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot b\right)}\\
\end{array}
\end{array}
if b < 5.49999999999999967e-28Initial program 97.8%
associate-*l/83.6%
*-commutative83.6%
exp-diff76.2%
exp-sum66.6%
*-commutative66.6%
exp-to-pow66.6%
*-commutative66.6%
exp-to-pow67.3%
sub-neg67.3%
metadata-eval67.3%
Simplified67.3%
Taylor expanded in t around 0 66.1%
times-frac64.6%
Simplified64.6%
Taylor expanded in y around 0 51.6%
Taylor expanded in b around 0 34.6%
+-commutative34.6%
mul-1-neg34.6%
unsub-neg34.6%
times-frac32.9%
Simplified32.9%
associate-/r*34.9%
associate-*r/39.0%
sub-div40.1%
Applied egg-rr40.1%
if 5.49999999999999967e-28 < b Initial program 100.0%
associate-*l/87.3%
*-commutative87.3%
exp-diff58.2%
exp-sum49.4%
*-commutative49.4%
exp-to-pow49.4%
*-commutative49.4%
exp-to-pow49.4%
sub-neg49.4%
metadata-eval49.4%
Simplified49.4%
Taylor expanded in t around 0 67.3%
times-frac62.2%
Simplified62.2%
Taylor expanded in y around 0 77.7%
Taylor expanded in b around 0 39.9%
distribute-lft-out39.9%
distribute-rgt1-in39.9%
Simplified39.9%
Taylor expanded in b around inf 39.9%
associate-*r*43.5%
Simplified43.5%
Final simplification41.1%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.1e-6) (* x (- (/ b (* y a)))) (if (<= b 1.95e+67) (* (/ x a) (/ 1.0 y)) (/ x (* y (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.1e-6) {
tmp = x * -(b / (y * a));
} else if (b <= 1.95e+67) {
tmp = (x / a) * (1.0 / y);
} else {
tmp = x / (y * (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.1d-6)) then
tmp = x * -(b / (y * a))
else if (b <= 1.95d+67) then
tmp = (x / a) * (1.0d0 / y)
else
tmp = x / (y * (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.1e-6) {
tmp = x * -(b / (y * a));
} else if (b <= 1.95e+67) {
tmp = (x / a) * (1.0 / y);
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.1e-6: tmp = x * -(b / (y * a)) elif b <= 1.95e+67: tmp = (x / a) * (1.0 / y) else: tmp = x / (y * (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.1e-6) tmp = Float64(x * Float64(-Float64(b / Float64(y * a)))); elseif (b <= 1.95e+67) tmp = Float64(Float64(x / a) * Float64(1.0 / y)); else tmp = Float64(x / Float64(y * Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.1e-6) tmp = x * -(b / (y * a)); elseif (b <= 1.95e+67) tmp = (x / a) * (1.0 / y); else tmp = x / (y * (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.1e-6], N[(x * (-N[(b / N[(y * a), $MachinePrecision]), $MachinePrecision])), $MachinePrecision], If[LessEqual[b, 1.95e+67], N[(N[(x / a), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.1 \cdot 10^{-6}:\\
\;\;\;\;x \cdot \left(-\frac{b}{y \cdot a}\right)\\
\mathbf{elif}\;b \leq 1.95 \cdot 10^{+67}:\\
\;\;\;\;\frac{x}{a} \cdot \frac{1}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot b\right)}\\
\end{array}
\end{array}
if b < -1.1000000000000001e-6Initial program 100.0%
associate-*l/86.0%
*-commutative86.0%
exp-diff63.2%
exp-sum56.1%
*-commutative56.1%
exp-to-pow56.1%
*-commutative56.1%
exp-to-pow56.1%
sub-neg56.1%
metadata-eval56.1%
Simplified56.1%
Taylor expanded in t around 0 65.1%
times-frac58.1%
Simplified58.1%
Taylor expanded in y around 0 81.1%
Taylor expanded in b around 0 33.7%
+-commutative33.7%
mul-1-neg33.7%
unsub-neg33.7%
times-frac37.0%
Simplified37.0%
Taylor expanded in b around inf 33.7%
associate-*r/33.7%
*-commutative33.7%
neg-mul-133.7%
distribute-lft-neg-in33.7%
*-commutative33.7%
associate-*r/37.2%
*-commutative37.2%
Simplified37.2%
if -1.1000000000000001e-6 < b < 1.95000000000000003e67Initial program 97.3%
associate-*l/83.6%
*-commutative83.6%
exp-diff80.1%
exp-sum69.5%
*-commutative69.5%
exp-to-pow69.5%
*-commutative69.5%
exp-to-pow70.2%
sub-neg70.2%
metadata-eval70.2%
Simplified70.2%
Taylor expanded in t around 0 64.5%
times-frac64.9%
Simplified64.9%
Taylor expanded in b around 0 63.9%
times-frac64.9%
Simplified64.9%
Taylor expanded in y around 0 37.9%
if 1.95000000000000003e67 < b Initial program 100.0%
associate-*l/86.2%
*-commutative86.2%
exp-diff55.2%
exp-sum46.6%
*-commutative46.6%
exp-to-pow46.6%
*-commutative46.6%
exp-to-pow46.6%
sub-neg46.6%
metadata-eval46.6%
Simplified46.6%
Taylor expanded in t around 0 72.5%
times-frac67.3%
Simplified67.3%
Taylor expanded in y around 0 89.8%
Taylor expanded in b around 0 46.5%
distribute-lft-out46.5%
distribute-rgt1-in46.5%
Simplified46.5%
Taylor expanded in b around inf 46.5%
associate-*r*51.5%
Simplified51.5%
Final simplification40.8%
(FPCore (x y z t a b) :precision binary64 (if (<= z 8.5e-77) (/ (/ x y) a) (* (/ x a) (/ 1.0 y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 8.5e-77) {
tmp = (x / y) / a;
} else {
tmp = (x / a) * (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 (z <= 8.5d-77) then
tmp = (x / y) / a
else
tmp = (x / a) * (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 (z <= 8.5e-77) {
tmp = (x / y) / a;
} else {
tmp = (x / a) * (1.0 / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= 8.5e-77: tmp = (x / y) / a else: tmp = (x / a) * (1.0 / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 8.5e-77) tmp = Float64(Float64(x / y) / a); else tmp = Float64(Float64(x / a) * Float64(1.0 / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= 8.5e-77) tmp = (x / y) / a; else tmp = (x / a) * (1.0 / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 8.5e-77], N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision], N[(N[(x / a), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 8.5 \cdot 10^{-77}:\\
\;\;\;\;\frac{\frac{x}{y}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a} \cdot \frac{1}{y}\\
\end{array}
\end{array}
if z < 8.4999999999999998e-77Initial program 99.4%
associate-*l/87.2%
*-commutative87.2%
exp-diff70.7%
exp-sum63.0%
*-commutative63.0%
exp-to-pow63.0%
*-commutative63.0%
exp-to-pow63.0%
sub-neg63.0%
metadata-eval63.0%
Simplified63.0%
Taylor expanded in t around 0 62.9%
times-frac59.5%
Simplified59.5%
Taylor expanded in b around 0 48.8%
times-frac46.5%
Simplified46.5%
associate-*l/51.8%
Applied egg-rr51.8%
Taylor expanded in y around 0 27.0%
if 8.4999999999999998e-77 < z Initial program 97.9%
associate-*l/83.1%
*-commutative83.1%
exp-diff70.6%
exp-sum60.2%
*-commutative60.2%
exp-to-pow60.2%
*-commutative60.2%
exp-to-pow60.9%
sub-neg60.9%
metadata-eval60.9%
Simplified60.9%
Taylor expanded in t around 0 68.8%
times-frac66.9%
Simplified66.9%
Taylor expanded in b around 0 56.5%
times-frac57.7%
Simplified57.7%
Taylor expanded in y around 0 35.8%
Final simplification32.3%
(FPCore (x y z t a b) :precision binary64 (if (<= b 1.15e+85) (* (/ x a) (/ 1.0 y)) (/ x (* a (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 1.15e+85) {
tmp = (x / a) * (1.0 / y);
} 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.15d+85) then
tmp = (x / a) * (1.0d0 / y)
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.15e+85) {
tmp = (x / a) * (1.0 / y);
} else {
tmp = x / (a * (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 1.15e+85: tmp = (x / a) * (1.0 / y) else: tmp = x / (a * (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 1.15e+85) tmp = Float64(Float64(x / a) * Float64(1.0 / y)); 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.15e+85) tmp = (x / a) * (1.0 / y); else tmp = x / (a * (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 1.15e+85], N[(N[(x / a), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.15 \cdot 10^{+85}:\\
\;\;\;\;\frac{x}{a} \cdot \frac{1}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot b\right)}\\
\end{array}
\end{array}
if b < 1.1499999999999999e85Initial program 98.1%
associate-*l/84.2%
*-commutative84.2%
exp-diff75.3%
exp-sum66.0%
*-commutative66.0%
exp-to-pow66.0%
*-commutative66.0%
exp-to-pow66.5%
sub-neg66.5%
metadata-eval66.5%
Simplified66.5%
Taylor expanded in t around 0 65.5%
times-frac63.3%
Simplified63.3%
Taylor expanded in b around 0 57.6%
times-frac57.9%
Simplified57.9%
Taylor expanded in y around 0 33.0%
if 1.1499999999999999e85 < b Initial program 100.0%
associate-*l/86.8%
*-commutative86.8%
exp-diff52.8%
exp-sum43.4%
*-commutative43.4%
exp-to-pow43.4%
*-commutative43.4%
exp-to-pow43.4%
sub-neg43.4%
metadata-eval43.4%
Simplified43.4%
Taylor expanded in t around 0 69.9%
times-frac66.1%
Simplified66.1%
Taylor expanded in y around 0 88.9%
Taylor expanded in b around 0 48.8%
distribute-lft-out48.8%
distribute-rgt1-in48.8%
Simplified48.8%
Taylor expanded in b around inf 48.8%
*-commutative48.8%
Simplified48.8%
Final simplification36.2%
(FPCore (x y z t a b) :precision binary64 (if (<= b 2.05e+68) (* (/ x a) (/ 1.0 y)) (/ x (* y (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 2.05e+68) {
tmp = (x / a) * (1.0 / y);
} else {
tmp = x / (y * (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.05d+68) then
tmp = (x / a) * (1.0d0 / y)
else
tmp = x / (y * (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.05e+68) {
tmp = (x / a) * (1.0 / y);
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 2.05e+68: tmp = (x / a) * (1.0 / y) else: tmp = x / (y * (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 2.05e+68) tmp = Float64(Float64(x / a) * Float64(1.0 / y)); else tmp = Float64(x / Float64(y * Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 2.05e+68) tmp = (x / a) * (1.0 / y); else tmp = x / (y * (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 2.05e+68], N[(N[(x / a), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.05 \cdot 10^{+68}:\\
\;\;\;\;\frac{x}{a} \cdot \frac{1}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot b\right)}\\
\end{array}
\end{array}
if b < 2.05e68Initial program 98.1%
associate-*l/84.3%
*-commutative84.3%
exp-diff75.2%
exp-sum65.6%
*-commutative65.6%
exp-to-pow65.6%
*-commutative65.6%
exp-to-pow66.2%
sub-neg66.2%
metadata-eval66.2%
Simplified66.2%
Taylor expanded in t around 0 64.7%
times-frac62.9%
Simplified62.9%
Taylor expanded in b around 0 59.0%
times-frac58.3%
Simplified58.3%
Taylor expanded in y around 0 32.8%
if 2.05e68 < b Initial program 100.0%
associate-*l/86.2%
*-commutative86.2%
exp-diff55.2%
exp-sum46.6%
*-commutative46.6%
exp-to-pow46.6%
*-commutative46.6%
exp-to-pow46.6%
sub-neg46.6%
metadata-eval46.6%
Simplified46.6%
Taylor expanded in t around 0 72.5%
times-frac67.3%
Simplified67.3%
Taylor expanded in y around 0 89.8%
Taylor expanded in b around 0 46.5%
distribute-lft-out46.5%
distribute-rgt1-in46.5%
Simplified46.5%
Taylor expanded in b around inf 46.5%
associate-*r*51.5%
Simplified51.5%
Final simplification37.0%
(FPCore (x y z t a b) :precision binary64 (if (<= a 1.6e-76) (/ (/ x y) a) (/ x (* y a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 1.6e-76) {
tmp = (x / y) / a;
} else {
tmp = x / (y * a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= 1.6d-76) then
tmp = (x / y) / a
else
tmp = x / (y * a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 1.6e-76) {
tmp = (x / y) / a;
} else {
tmp = x / (y * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= 1.6e-76: tmp = (x / y) / a else: tmp = x / (y * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= 1.6e-76) tmp = Float64(Float64(x / y) / a); else tmp = Float64(x / Float64(y * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= 1.6e-76) tmp = (x / y) / a; else tmp = x / (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, 1.6e-76], N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.6 \cdot 10^{-76}:\\
\;\;\;\;\frac{\frac{x}{y}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\end{array}
\end{array}
if a < 1.5999999999999999e-76Initial program 98.5%
associate-*l/84.0%
*-commutative84.0%
exp-diff79.9%
exp-sum67.6%
*-commutative67.6%
exp-to-pow67.6%
*-commutative67.6%
exp-to-pow68.0%
sub-neg68.0%
metadata-eval68.0%
Simplified68.0%
Taylor expanded in t around 0 77.8%
times-frac71.4%
Simplified71.4%
Taylor expanded in b around 0 66.8%
times-frac60.6%
Simplified60.6%
associate-*l/66.8%
Applied egg-rr66.8%
Taylor expanded in y around 0 35.0%
if 1.5999999999999999e-76 < a Initial program 98.5%
associate-*l/85.2%
*-commutative85.2%
exp-diff65.0%
exp-sum57.5%
*-commutative57.5%
exp-to-pow57.5%
*-commutative57.5%
exp-to-pow57.9%
sub-neg57.9%
metadata-eval57.9%
Simplified57.9%
Taylor expanded in t around 0 59.5%
times-frac59.3%
Simplified59.3%
Taylor expanded in y around 0 58.7%
Taylor expanded in b around 0 29.1%
Final simplification31.3%
(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.5%
associate-*l/84.7%
*-commutative84.7%
exp-diff70.7%
exp-sum61.3%
*-commutative61.3%
exp-to-pow61.3%
*-commutative61.3%
exp-to-pow61.7%
sub-neg61.7%
metadata-eval61.7%
Simplified61.7%
Taylor expanded in t around 0 66.4%
times-frac63.9%
Simplified63.9%
Taylor expanded in y around 0 59.6%
Taylor expanded in b around 0 28.7%
Final simplification28.7%
(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 2023333
(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))