
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (+ 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 (<= y -2.1e+35) (not (<= y 122.0))) (/ (* 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 <= -2.1e+35) || !(y <= 122.0)) {
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 <= (-2.1d+35)) .or. (.not. (y <= 122.0d0))) 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 <= -2.1e+35) || !(y <= 122.0)) {
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 <= -2.1e+35) or not (y <= 122.0): 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 <= -2.1e+35) || !(y <= 122.0)) 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 <= -2.1e+35) || ~((y <= 122.0))) 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, -2.1e+35], N[Not[LessEqual[y, 122.0]], $MachinePrecision]], N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] - N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.1 \cdot 10^{+35} \lor \neg \left(y \leq 122\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 < -2.0999999999999999e35 or 122 < y Initial program 100.0%
Taylor expanded in t around 0 90.7%
+-commutative90.7%
mul-1-neg90.7%
unsub-neg90.7%
Simplified90.7%
if -2.0999999999999999e35 < y < 122Initial program 97.2%
Taylor expanded in y around 0 96.7%
Final simplification94.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -5e+110) (not (<= y 8e+142))) (/ (/ (* 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 <= -5e+110) || !(y <= 8e+142)) {
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 <= (-5d+110)) .or. (.not. (y <= 8d+142))) 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 <= -5e+110) || !(y <= 8e+142)) {
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 <= -5e+110) or not (y <= 8e+142): 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 <= -5e+110) || !(y <= 8e+142)) tmp = Float64(Float64(Float64(x * (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 <= -5e+110) || ~((y <= 8e+142))) 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, -5e+110], N[Not[LessEqual[y, 8e+142]], $MachinePrecision]], N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / a), $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 -5 \cdot 10^{+110} \lor \neg \left(y \leq 8 \cdot 10^{+142}\right):\\
\;\;\;\;\frac{\frac{x \cdot {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.99999999999999978e110 or 8.00000000000000041e142 < y Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum59.7%
associate-/l*58.3%
*-commutative58.3%
exp-to-pow58.3%
exp-diff44.4%
*-commutative44.4%
exp-to-pow44.4%
sub-neg44.4%
metadata-eval44.4%
Simplified44.4%
Taylor expanded in b around 0 68.1%
*-commutative68.1%
exp-to-pow68.1%
sub-neg68.1%
metadata-eval68.1%
associate-*l*68.1%
Simplified68.1%
Taylor expanded in t around 0 86.3%
if -4.99999999999999978e110 < y < 8.00000000000000041e142Initial program 97.9%
Taylor expanded in y around 0 92.1%
Final simplification90.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.5e+109) (not (<= y 4e+84))) (/ (/ (* x (pow z y)) a) y) (* x (/ (pow a (+ t -1.0)) (* y (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.5e+109) || !(y <= 4e+84)) {
tmp = ((x * pow(z, y)) / a) / y;
} else {
tmp = x * (pow(a, (t + -1.0)) / (y * exp(b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-2.5d+109)) .or. (.not. (y <= 4d+84))) then
tmp = ((x * (z ** y)) / a) / y
else
tmp = x * ((a ** (t + (-1.0d0))) / (y * exp(b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.5e+109) || !(y <= 4e+84)) {
tmp = ((x * Math.pow(z, y)) / a) / y;
} else {
tmp = x * (Math.pow(a, (t + -1.0)) / (y * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.5e+109) or not (y <= 4e+84): tmp = ((x * math.pow(z, y)) / a) / y else: tmp = x * (math.pow(a, (t + -1.0)) / (y * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.5e+109) || !(y <= 4e+84)) tmp = Float64(Float64(Float64(x * (z ^ y)) / a) / y); else tmp = Float64(x * Float64((a ^ Float64(t + -1.0)) / Float64(y * exp(b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2.5e+109) || ~((y <= 4e+84))) tmp = ((x * (z ^ y)) / a) / y; else tmp = x * ((a ^ (t + -1.0)) / (y * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.5e+109], N[Not[LessEqual[y, 4e+84]], $MachinePrecision]], N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{+109} \lor \neg \left(y \leq 4 \cdot 10^{+84}\right):\\
\;\;\;\;\frac{\frac{x \cdot {z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{{a}^{\left(t + -1\right)}}{y \cdot e^{b}}\\
\end{array}
\end{array}
if y < -2.5000000000000001e109 or 4.00000000000000023e84 < y Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum61.0%
associate-/l*59.8%
*-commutative59.8%
exp-to-pow59.8%
exp-diff46.3%
*-commutative46.3%
exp-to-pow46.3%
sub-neg46.3%
metadata-eval46.3%
Simplified46.3%
Taylor expanded in b around 0 68.4%
*-commutative68.4%
exp-to-pow68.4%
sub-neg68.4%
metadata-eval68.4%
associate-*l*68.4%
Simplified68.4%
Taylor expanded in t around 0 84.4%
if -2.5000000000000001e109 < y < 4.00000000000000023e84Initial program 97.7%
associate-/l*96.8%
associate--l+96.8%
exp-sum84.7%
associate-/l*84.7%
*-commutative84.7%
exp-to-pow84.7%
exp-diff78.5%
*-commutative78.5%
exp-to-pow79.3%
sub-neg79.3%
metadata-eval79.3%
Simplified79.3%
Taylor expanded in y around 0 81.9%
exp-to-pow82.8%
sub-neg82.8%
metadata-eval82.8%
associate-*r/84.7%
Simplified84.7%
Final simplification84.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -7e-13)
(/ (* (pow a t) (/ x a)) y)
(if (<= t -2.5e-282)
(/ (* x (/ (/ 1.0 a) (exp b))) y)
(if (<= t 1.85e-178)
(/ (/ (* x (pow z y)) a) y)
(if (<= t 1.25e-27)
(/ (/ x (* a (exp b))) y)
(/ (* x (pow a (+ t -1.0))) y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -7e-13) {
tmp = (pow(a, t) * (x / a)) / y;
} else if (t <= -2.5e-282) {
tmp = (x * ((1.0 / a) / exp(b))) / y;
} else if (t <= 1.85e-178) {
tmp = ((x * pow(z, y)) / a) / y;
} else if (t <= 1.25e-27) {
tmp = (x / (a * exp(b))) / y;
} else {
tmp = (x * pow(a, (t + -1.0))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-7d-13)) then
tmp = ((a ** t) * (x / a)) / y
else if (t <= (-2.5d-282)) then
tmp = (x * ((1.0d0 / a) / exp(b))) / y
else if (t <= 1.85d-178) then
tmp = ((x * (z ** y)) / a) / y
else if (t <= 1.25d-27) then
tmp = (x / (a * exp(b))) / y
else
tmp = (x * (a ** (t + (-1.0d0)))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -7e-13) {
tmp = (Math.pow(a, t) * (x / a)) / y;
} else if (t <= -2.5e-282) {
tmp = (x * ((1.0 / a) / Math.exp(b))) / y;
} else if (t <= 1.85e-178) {
tmp = ((x * Math.pow(z, y)) / a) / y;
} else if (t <= 1.25e-27) {
tmp = (x / (a * Math.exp(b))) / y;
} else {
tmp = (x * Math.pow(a, (t + -1.0))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -7e-13: tmp = (math.pow(a, t) * (x / a)) / y elif t <= -2.5e-282: tmp = (x * ((1.0 / a) / math.exp(b))) / y elif t <= 1.85e-178: tmp = ((x * math.pow(z, y)) / a) / y elif t <= 1.25e-27: tmp = (x / (a * math.exp(b))) / y else: tmp = (x * math.pow(a, (t + -1.0))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -7e-13) tmp = Float64(Float64((a ^ t) * Float64(x / a)) / y); elseif (t <= -2.5e-282) tmp = Float64(Float64(x * Float64(Float64(1.0 / a) / exp(b))) / y); elseif (t <= 1.85e-178) tmp = Float64(Float64(Float64(x * (z ^ y)) / a) / y); elseif (t <= 1.25e-27) tmp = Float64(Float64(x / Float64(a * exp(b))) / y); else tmp = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -7e-13) tmp = ((a ^ t) * (x / a)) / y; elseif (t <= -2.5e-282) tmp = (x * ((1.0 / a) / exp(b))) / y; elseif (t <= 1.85e-178) tmp = ((x * (z ^ y)) / a) / y; elseif (t <= 1.25e-27) tmp = (x / (a * exp(b))) / y; else tmp = (x * (a ^ (t + -1.0))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -7e-13], N[(N[(N[Power[a, t], $MachinePrecision] * N[(x / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, -2.5e-282], N[(N[(x * N[(N[(1.0 / a), $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 1.85e-178], N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 1.25e-27], N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7 \cdot 10^{-13}:\\
\;\;\;\;\frac{{a}^{t} \cdot \frac{x}{a}}{y}\\
\mathbf{elif}\;t \leq -2.5 \cdot 10^{-282}:\\
\;\;\;\;\frac{x \cdot \frac{\frac{1}{a}}{e^{b}}}{y}\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{-178}:\\
\;\;\;\;\frac{\frac{x \cdot {z}^{y}}{a}}{y}\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-27}:\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\end{array}
\end{array}
if t < -7.0000000000000005e-13Initial program 99.7%
associate-/l*98.5%
associate--l+98.5%
exp-sum77.0%
associate-/l*77.0%
*-commutative77.0%
exp-to-pow77.0%
exp-diff58.5%
*-commutative58.5%
exp-to-pow58.5%
sub-neg58.5%
metadata-eval58.5%
Simplified58.5%
associate-/l/58.5%
unpow-prod-up58.5%
associate-/l*58.5%
unpow-158.5%
Applied egg-rr58.5%
associate-*r/58.5%
associate-*r/58.5%
*-rgt-identity58.5%
Simplified58.5%
Taylor expanded in y around 0 67.9%
times-frac69.3%
Simplified69.3%
Taylor expanded in b around 0 80.4%
associate-/r*81.8%
associate-*l/81.8%
*-commutative81.8%
Simplified81.8%
if -7.0000000000000005e-13 < t < -2.5e-282Initial program 97.3%
Taylor expanded in y around 0 81.3%
Taylor expanded in t around 0 81.3%
exp-diff81.4%
mul-1-neg81.4%
log-rec81.4%
rem-exp-log82.3%
Simplified82.3%
if -2.5e-282 < t < 1.85000000000000002e-178Initial program 95.9%
associate-/l*98.2%
associate--l+98.2%
exp-sum79.7%
associate-/l*77.1%
*-commutative77.1%
exp-to-pow77.1%
exp-diff77.1%
*-commutative77.1%
exp-to-pow78.8%
sub-neg78.8%
metadata-eval78.8%
Simplified78.8%
Taylor expanded in b around 0 84.8%
*-commutative84.8%
exp-to-pow86.0%
sub-neg86.0%
metadata-eval86.0%
associate-*l*86.0%
Simplified86.0%
Taylor expanded in t around 0 86.0%
if 1.85000000000000002e-178 < t < 1.25e-27Initial program 98.4%
add-cube-cbrt98.4%
pow398.4%
exp-diff86.7%
exp-sum86.7%
*-commutative86.7%
pow-to-exp86.7%
sub-neg86.7%
metadata-eval86.7%
*-commutative86.7%
pow-to-exp87.9%
associate-*r/87.9%
Applied egg-rr87.9%
Taylor expanded in t around 0 88.1%
Taylor expanded in y around 0 88.1%
if 1.25e-27 < t Initial program 99.8%
associate-/l*98.4%
associate--l+98.4%
exp-sum75.5%
associate-/l*75.5%
*-commutative75.5%
exp-to-pow75.5%
exp-diff59.1%
*-commutative59.1%
exp-to-pow59.1%
sub-neg59.1%
metadata-eval59.1%
Simplified59.1%
Taylor expanded in b around 0 72.0%
*-commutative72.0%
exp-to-pow72.2%
sub-neg72.2%
metadata-eval72.2%
associate-*l*72.2%
Simplified72.2%
Taylor expanded in y around 0 82.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (/ x (* a (exp b))) y)))
(if (<= t -7e-13)
(/ (* (pow a t) (/ x a)) y)
(if (<= t -1.3e-281)
t_1
(if (<= t 2.12e-178)
(/ (/ (* x (pow z y)) a) y)
(if (<= t 1.25e-27) t_1 (/ (* x (pow a (+ t -1.0))) y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / (a * exp(b))) / y;
double tmp;
if (t <= -7e-13) {
tmp = (pow(a, t) * (x / a)) / y;
} else if (t <= -1.3e-281) {
tmp = t_1;
} else if (t <= 2.12e-178) {
tmp = ((x * pow(z, y)) / a) / y;
} else if (t <= 1.25e-27) {
tmp = t_1;
} else {
tmp = (x * pow(a, (t + -1.0))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x / (a * exp(b))) / y
if (t <= (-7d-13)) then
tmp = ((a ** t) * (x / a)) / y
else if (t <= (-1.3d-281)) then
tmp = t_1
else if (t <= 2.12d-178) then
tmp = ((x * (z ** y)) / a) / y
else if (t <= 1.25d-27) then
tmp = t_1
else
tmp = (x * (a ** (t + (-1.0d0)))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / (a * Math.exp(b))) / y;
double tmp;
if (t <= -7e-13) {
tmp = (Math.pow(a, t) * (x / a)) / y;
} else if (t <= -1.3e-281) {
tmp = t_1;
} else if (t <= 2.12e-178) {
tmp = ((x * Math.pow(z, y)) / a) / y;
} else if (t <= 1.25e-27) {
tmp = t_1;
} else {
tmp = (x * Math.pow(a, (t + -1.0))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x / (a * math.exp(b))) / y tmp = 0 if t <= -7e-13: tmp = (math.pow(a, t) * (x / a)) / y elif t <= -1.3e-281: tmp = t_1 elif t <= 2.12e-178: tmp = ((x * math.pow(z, y)) / a) / y elif t <= 1.25e-27: tmp = t_1 else: tmp = (x * math.pow(a, (t + -1.0))) / y return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x / Float64(a * exp(b))) / y) tmp = 0.0 if (t <= -7e-13) tmp = Float64(Float64((a ^ t) * Float64(x / a)) / y); elseif (t <= -1.3e-281) tmp = t_1; elseif (t <= 2.12e-178) tmp = Float64(Float64(Float64(x * (z ^ y)) / a) / y); elseif (t <= 1.25e-27) tmp = t_1; else tmp = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x / (a * exp(b))) / y; tmp = 0.0; if (t <= -7e-13) tmp = ((a ^ t) * (x / a)) / y; elseif (t <= -1.3e-281) tmp = t_1; elseif (t <= 2.12e-178) tmp = ((x * (z ^ y)) / a) / y; elseif (t <= 1.25e-27) tmp = t_1; else tmp = (x * (a ^ (t + -1.0))) / y; 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]}, If[LessEqual[t, -7e-13], N[(N[(N[Power[a, t], $MachinePrecision] * N[(x / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, -1.3e-281], t$95$1, If[LessEqual[t, 2.12e-178], N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 1.25e-27], t$95$1, N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{a \cdot e^{b}}}{y}\\
\mathbf{if}\;t \leq -7 \cdot 10^{-13}:\\
\;\;\;\;\frac{{a}^{t} \cdot \frac{x}{a}}{y}\\
\mathbf{elif}\;t \leq -1.3 \cdot 10^{-281}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.12 \cdot 10^{-178}:\\
\;\;\;\;\frac{\frac{x \cdot {z}^{y}}{a}}{y}\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-27}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\end{array}
\end{array}
if t < -7.0000000000000005e-13Initial program 99.7%
associate-/l*98.5%
associate--l+98.5%
exp-sum77.0%
associate-/l*77.0%
*-commutative77.0%
exp-to-pow77.0%
exp-diff58.5%
*-commutative58.5%
exp-to-pow58.5%
sub-neg58.5%
metadata-eval58.5%
Simplified58.5%
associate-/l/58.5%
unpow-prod-up58.5%
associate-/l*58.5%
unpow-158.5%
Applied egg-rr58.5%
associate-*r/58.5%
associate-*r/58.5%
*-rgt-identity58.5%
Simplified58.5%
Taylor expanded in y around 0 67.9%
times-frac69.3%
Simplified69.3%
Taylor expanded in b around 0 80.4%
associate-/r*81.8%
associate-*l/81.8%
*-commutative81.8%
Simplified81.8%
if -7.0000000000000005e-13 < t < -1.30000000000000002e-281 or 2.11999999999999998e-178 < t < 1.25e-27Initial program 97.7%
add-cube-cbrt97.7%
pow397.7%
exp-diff78.2%
exp-sum78.2%
*-commutative78.2%
pow-to-exp78.2%
sub-neg78.2%
metadata-eval78.2%
*-commutative78.2%
pow-to-exp79.2%
associate-*r/79.2%
Applied egg-rr79.2%
Taylor expanded in t around 0 79.3%
Taylor expanded in y around 0 84.5%
if -1.30000000000000002e-281 < t < 2.11999999999999998e-178Initial program 95.9%
associate-/l*98.2%
associate--l+98.2%
exp-sum79.7%
associate-/l*77.1%
*-commutative77.1%
exp-to-pow77.1%
exp-diff77.1%
*-commutative77.1%
exp-to-pow78.8%
sub-neg78.8%
metadata-eval78.8%
Simplified78.8%
Taylor expanded in b around 0 84.8%
*-commutative84.8%
exp-to-pow86.0%
sub-neg86.0%
metadata-eval86.0%
associate-*l*86.0%
Simplified86.0%
Taylor expanded in t around 0 86.0%
if 1.25e-27 < t Initial program 99.8%
associate-/l*98.4%
associate--l+98.4%
exp-sum75.5%
associate-/l*75.5%
*-commutative75.5%
exp-to-pow75.5%
exp-diff59.1%
*-commutative59.1%
exp-to-pow59.1%
sub-neg59.1%
metadata-eval59.1%
Simplified59.1%
Taylor expanded in b around 0 72.0%
*-commutative72.0%
exp-to-pow72.2%
sub-neg72.2%
metadata-eval72.2%
associate-*l*72.2%
Simplified72.2%
Taylor expanded in y around 0 82.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -7e-13) (not (<= t 1.25e-27))) (/ (* x (pow a (+ t -1.0))) y) (/ (/ x (* a (exp b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -7e-13) || !(t <= 1.25e-27)) {
tmp = (x * pow(a, (t + -1.0))) / 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 ((t <= (-7d-13)) .or. (.not. (t <= 1.25d-27))) then
tmp = (x * (a ** (t + (-1.0d0)))) / 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 ((t <= -7e-13) || !(t <= 1.25e-27)) {
tmp = (x * Math.pow(a, (t + -1.0))) / y;
} else {
tmp = (x / (a * Math.exp(b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -7e-13) or not (t <= 1.25e-27): tmp = (x * math.pow(a, (t + -1.0))) / y else: tmp = (x / (a * math.exp(b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -7e-13) || !(t <= 1.25e-27)) tmp = Float64(Float64(x * (a ^ Float64(t + -1.0))) / 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 ((t <= -7e-13) || ~((t <= 1.25e-27))) tmp = (x * (a ^ (t + -1.0))) / y; else tmp = (x / (a * exp(b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -7e-13], N[Not[LessEqual[t, 1.25e-27]], $MachinePrecision]], N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7 \cdot 10^{-13} \lor \neg \left(t \leq 1.25 \cdot 10^{-27}\right):\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\
\end{array}
\end{array}
if t < -7.0000000000000005e-13 or 1.25e-27 < t Initial program 99.8%
associate-/l*98.5%
associate--l+98.5%
exp-sum76.2%
associate-/l*76.2%
*-commutative76.2%
exp-to-pow76.2%
exp-diff58.8%
*-commutative58.8%
exp-to-pow58.8%
sub-neg58.8%
metadata-eval58.8%
Simplified58.8%
Taylor expanded in b around 0 70.5%
*-commutative70.5%
exp-to-pow70.6%
sub-neg70.6%
metadata-eval70.6%
associate-*l*70.6%
Simplified70.6%
Taylor expanded in y around 0 81.9%
if -7.0000000000000005e-13 < t < 1.25e-27Initial program 97.2%
add-cube-cbrt97.2%
pow397.2%
exp-diff78.0%
exp-sum78.0%
*-commutative78.0%
pow-to-exp78.0%
sub-neg78.0%
metadata-eval78.0%
*-commutative78.0%
pow-to-exp79.0%
associate-*r/79.0%
Applied egg-rr79.0%
Taylor expanded in t around 0 79.2%
Taylor expanded in y around 0 78.6%
Final simplification80.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -7e-13)
(/ (* (pow a t) (/ x a)) y)
(if (<= t 1.25e-27)
(/ (/ x (* a (exp b))) y)
(/ (* x (pow a (+ t -1.0))) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -7e-13) {
tmp = (pow(a, t) * (x / a)) / y;
} else if (t <= 1.25e-27) {
tmp = (x / (a * exp(b))) / y;
} else {
tmp = (x * pow(a, (t + -1.0))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-7d-13)) then
tmp = ((a ** t) * (x / a)) / y
else if (t <= 1.25d-27) then
tmp = (x / (a * exp(b))) / y
else
tmp = (x * (a ** (t + (-1.0d0)))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -7e-13) {
tmp = (Math.pow(a, t) * (x / a)) / y;
} else if (t <= 1.25e-27) {
tmp = (x / (a * Math.exp(b))) / y;
} else {
tmp = (x * Math.pow(a, (t + -1.0))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -7e-13: tmp = (math.pow(a, t) * (x / a)) / y elif t <= 1.25e-27: tmp = (x / (a * math.exp(b))) / y else: tmp = (x * math.pow(a, (t + -1.0))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -7e-13) tmp = Float64(Float64((a ^ t) * Float64(x / a)) / y); elseif (t <= 1.25e-27) tmp = Float64(Float64(x / Float64(a * exp(b))) / y); else tmp = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -7e-13) tmp = ((a ^ t) * (x / a)) / y; elseif (t <= 1.25e-27) tmp = (x / (a * exp(b))) / y; else tmp = (x * (a ^ (t + -1.0))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -7e-13], N[(N[(N[Power[a, t], $MachinePrecision] * N[(x / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 1.25e-27], N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7 \cdot 10^{-13}:\\
\;\;\;\;\frac{{a}^{t} \cdot \frac{x}{a}}{y}\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-27}:\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\end{array}
\end{array}
if t < -7.0000000000000005e-13Initial program 99.7%
associate-/l*98.5%
associate--l+98.5%
exp-sum77.0%
associate-/l*77.0%
*-commutative77.0%
exp-to-pow77.0%
exp-diff58.5%
*-commutative58.5%
exp-to-pow58.5%
sub-neg58.5%
metadata-eval58.5%
Simplified58.5%
associate-/l/58.5%
unpow-prod-up58.5%
associate-/l*58.5%
unpow-158.5%
Applied egg-rr58.5%
associate-*r/58.5%
associate-*r/58.5%
*-rgt-identity58.5%
Simplified58.5%
Taylor expanded in y around 0 67.9%
times-frac69.3%
Simplified69.3%
Taylor expanded in b around 0 80.4%
associate-/r*81.8%
associate-*l/81.8%
*-commutative81.8%
Simplified81.8%
if -7.0000000000000005e-13 < t < 1.25e-27Initial program 97.2%
add-cube-cbrt97.2%
pow397.2%
exp-diff78.0%
exp-sum78.0%
*-commutative78.0%
pow-to-exp78.0%
sub-neg78.0%
metadata-eval78.0%
*-commutative78.0%
pow-to-exp79.0%
associate-*r/79.0%
Applied egg-rr79.0%
Taylor expanded in t around 0 79.2%
Taylor expanded in y around 0 78.6%
if 1.25e-27 < t Initial program 99.8%
associate-/l*98.4%
associate--l+98.4%
exp-sum75.5%
associate-/l*75.5%
*-commutative75.5%
exp-to-pow75.5%
exp-diff59.1%
*-commutative59.1%
exp-to-pow59.1%
sub-neg59.1%
metadata-eval59.1%
Simplified59.1%
Taylor expanded in b around 0 72.0%
*-commutative72.0%
exp-to-pow72.2%
sub-neg72.2%
metadata-eval72.2%
associate-*l*72.2%
Simplified72.2%
Taylor expanded in y around 0 82.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -4800.0) (not (<= t 2.8e+16))) (* x (/ (pow a t) y)) (/ (/ x (* a (exp b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -4800.0) || !(t <= 2.8e+16)) {
tmp = x * (pow(a, t) / 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 ((t <= (-4800.0d0)) .or. (.not. (t <= 2.8d+16))) then
tmp = x * ((a ** t) / 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 ((t <= -4800.0) || !(t <= 2.8e+16)) {
tmp = x * (Math.pow(a, t) / y);
} else {
tmp = (x / (a * Math.exp(b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -4800.0) or not (t <= 2.8e+16): tmp = x * (math.pow(a, t) / y) else: tmp = (x / (a * math.exp(b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -4800.0) || !(t <= 2.8e+16)) tmp = Float64(x * Float64((a ^ t) / 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 ((t <= -4800.0) || ~((t <= 2.8e+16))) tmp = x * ((a ^ t) / y); else tmp = (x / (a * exp(b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -4800.0], N[Not[LessEqual[t, 2.8e+16]], $MachinePrecision]], N[(x * N[(N[Power[a, t], $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}\;t \leq -4800 \lor \neg \left(t \leq 2.8 \cdot 10^{+16}\right):\\
\;\;\;\;x \cdot \frac{{a}^{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\
\end{array}
\end{array}
if t < -4800 or 2.8e16 < t Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum76.9%
associate-/l*76.9%
*-commutative76.9%
exp-to-pow76.9%
exp-diff58.7%
*-commutative58.7%
exp-to-pow58.7%
sub-neg58.7%
metadata-eval58.7%
Simplified58.7%
Taylor expanded in y around 0 67.1%
exp-to-pow67.1%
sub-neg67.1%
metadata-eval67.1%
associate-*r/67.1%
Simplified67.1%
Taylor expanded in b around 0 81.3%
Taylor expanded in t around inf 81.3%
if -4800 < t < 2.8e16Initial program 97.1%
add-cube-cbrt97.1%
pow397.1%
exp-diff78.6%
exp-sum78.6%
*-commutative78.6%
pow-to-exp78.6%
sub-neg78.6%
metadata-eval78.6%
*-commutative78.6%
pow-to-exp79.7%
associate-*r/79.7%
Applied egg-rr79.7%
Taylor expanded in t around 0 79.2%
Taylor expanded in y around 0 78.6%
Final simplification79.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -21.0) (not (<= t 70.0))) (* x (/ (pow a t) y)) (/ x (* a (* y (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -21.0) || !(t <= 70.0)) {
tmp = x * (pow(a, t) / y);
} else {
tmp = x / (a * (y * exp(b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-21.0d0)) .or. (.not. (t <= 70.0d0))) then
tmp = x * ((a ** t) / y)
else
tmp = x / (a * (y * exp(b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -21.0) || !(t <= 70.0)) {
tmp = x * (Math.pow(a, t) / y);
} else {
tmp = x / (a * (y * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -21.0) or not (t <= 70.0): tmp = x * (math.pow(a, t) / y) else: tmp = x / (a * (y * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -21.0) || !(t <= 70.0)) tmp = Float64(x * Float64((a ^ t) / y)); else tmp = Float64(x / Float64(a * Float64(y * exp(b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -21.0) || ~((t <= 70.0))) tmp = x * ((a ^ t) / y); else tmp = x / (a * (y * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -21.0], N[Not[LessEqual[t, 70.0]], $MachinePrecision]], N[(x * N[(N[Power[a, t], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -21 \lor \neg \left(t \leq 70\right):\\
\;\;\;\;x \cdot \frac{{a}^{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
if t < -21 or 70 < t Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum76.9%
associate-/l*76.9%
*-commutative76.9%
exp-to-pow76.9%
exp-diff58.7%
*-commutative58.7%
exp-to-pow58.7%
sub-neg58.7%
metadata-eval58.7%
Simplified58.7%
Taylor expanded in y around 0 67.1%
exp-to-pow67.1%
sub-neg67.1%
metadata-eval67.1%
associate-*r/67.1%
Simplified67.1%
Taylor expanded in b around 0 81.3%
Taylor expanded in t around inf 81.3%
if -21 < t < 70Initial program 97.1%
associate-/l*95.9%
associate--l+95.9%
exp-sum77.4%
associate-/l*76.6%
*-commutative76.6%
exp-to-pow76.6%
exp-diff76.7%
*-commutative76.7%
exp-to-pow77.8%
sub-neg77.8%
metadata-eval77.8%
Simplified77.8%
Taylor expanded in y around 0 73.6%
exp-to-pow74.8%
sub-neg74.8%
metadata-eval74.8%
associate-*r/76.2%
Simplified76.2%
Taylor expanded in t around 0 76.1%
Final simplification78.5%
(FPCore (x y z t a b) :precision binary64 (if (<= t -8e-5) (* x (/ (pow a (+ t -1.0)) y)) (if (<= t 380.0) (/ (/ x (* a (exp b))) y) (* x (/ (pow a t) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -8e-5) {
tmp = x * (pow(a, (t + -1.0)) / y);
} else if (t <= 380.0) {
tmp = (x / (a * exp(b))) / y;
} else {
tmp = x * (pow(a, t) / 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 <= (-8d-5)) then
tmp = x * ((a ** (t + (-1.0d0))) / y)
else if (t <= 380.0d0) then
tmp = (x / (a * exp(b))) / y
else
tmp = x * ((a ** t) / 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 <= -8e-5) {
tmp = x * (Math.pow(a, (t + -1.0)) / y);
} else if (t <= 380.0) {
tmp = (x / (a * Math.exp(b))) / y;
} else {
tmp = x * (Math.pow(a, t) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -8e-5: tmp = x * (math.pow(a, (t + -1.0)) / y) elif t <= 380.0: tmp = (x / (a * math.exp(b))) / y else: tmp = x * (math.pow(a, t) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -8e-5) tmp = Float64(x * Float64((a ^ Float64(t + -1.0)) / y)); elseif (t <= 380.0) tmp = Float64(Float64(x / Float64(a * exp(b))) / y); else tmp = Float64(x * Float64((a ^ t) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -8e-5) tmp = x * ((a ^ (t + -1.0)) / y); elseif (t <= 380.0) tmp = (x / (a * exp(b))) / y; else tmp = x * ((a ^ t) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -8e-5], N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 380.0], N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x * N[(N[Power[a, t], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8 \cdot 10^{-5}:\\
\;\;\;\;x \cdot \frac{{a}^{\left(t + -1\right)}}{y}\\
\mathbf{elif}\;t \leq 380:\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{{a}^{t}}{y}\\
\end{array}
\end{array}
if t < -8.00000000000000065e-5Initial program 100.0%
associate-/l*99.9%
associate--l+99.9%
exp-sum78.1%
associate-/l*78.1%
*-commutative78.1%
exp-to-pow78.1%
exp-diff59.3%
*-commutative59.3%
exp-to-pow59.3%
sub-neg59.3%
metadata-eval59.3%
Simplified59.3%
Taylor expanded in y around 0 68.8%
exp-to-pow68.8%
sub-neg68.8%
metadata-eval68.8%
associate-*r/68.8%
Simplified68.8%
Taylor expanded in b around 0 81.5%
if -8.00000000000000065e-5 < t < 380Initial program 97.1%
add-cube-cbrt97.1%
pow397.1%
exp-diff78.5%
exp-sum78.5%
*-commutative78.5%
pow-to-exp78.5%
sub-neg78.5%
metadata-eval78.5%
*-commutative78.5%
pow-to-exp79.6%
associate-*r/79.6%
Applied egg-rr79.6%
Taylor expanded in t around 0 79.6%
Taylor expanded in y around 0 79.0%
if 380 < t Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum75.9%
associate-/l*75.9%
*-commutative75.9%
exp-to-pow75.9%
exp-diff58.6%
*-commutative58.6%
exp-to-pow58.6%
sub-neg58.6%
metadata-eval58.6%
Simplified58.6%
Taylor expanded in y around 0 65.7%
exp-to-pow65.7%
sub-neg65.7%
metadata-eval65.7%
associate-*r/65.7%
Simplified65.7%
Taylor expanded in b around 0 81.3%
Taylor expanded in t around inf 81.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -7e-13) (not (<= t 2.2))) (* x (/ (pow a t) y)) (/ (/ x (exp b)) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -7e-13) || !(t <= 2.2)) {
tmp = x * (pow(a, t) / y);
} else {
tmp = (x / 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 ((t <= (-7d-13)) .or. (.not. (t <= 2.2d0))) then
tmp = x * ((a ** t) / y)
else
tmp = (x / 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 ((t <= -7e-13) || !(t <= 2.2)) {
tmp = x * (Math.pow(a, t) / y);
} else {
tmp = (x / Math.exp(b)) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -7e-13) or not (t <= 2.2): tmp = x * (math.pow(a, t) / y) else: tmp = (x / math.exp(b)) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -7e-13) || !(t <= 2.2)) tmp = Float64(x * Float64((a ^ t) / y)); else tmp = Float64(Float64(x / exp(b)) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -7e-13) || ~((t <= 2.2))) tmp = x * ((a ^ t) / y); else tmp = (x / exp(b)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -7e-13], N[Not[LessEqual[t, 2.2]], $MachinePrecision]], N[(x * N[(N[Power[a, t], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[Exp[b], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7 \cdot 10^{-13} \lor \neg \left(t \leq 2.2\right):\\
\;\;\;\;x \cdot \frac{{a}^{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{e^{b}}}{y}\\
\end{array}
\end{array}
if t < -7.0000000000000005e-13 or 2.2000000000000002 < t Initial program 99.9%
associate-/l*99.2%
associate--l+99.2%
exp-sum76.4%
associate-/l*76.4%
*-commutative76.4%
exp-to-pow76.4%
exp-diff58.6%
*-commutative58.6%
exp-to-pow58.5%
sub-neg58.5%
metadata-eval58.5%
Simplified58.5%
Taylor expanded in y around 0 67.5%
exp-to-pow67.5%
sub-neg67.5%
metadata-eval67.5%
associate-*r/66.8%
Simplified66.8%
Taylor expanded in b around 0 80.8%
Taylor expanded in t around inf 80.1%
if -7.0000000000000005e-13 < t < 2.2000000000000002Initial program 97.2%
Taylor expanded in y around 0 77.8%
Taylor expanded in b around inf 59.0%
neg-mul-159.0%
Simplified59.0%
Taylor expanded in b around -inf 59.0%
mul-1-neg59.0%
rec-exp59.0%
associate-*r/59.0%
*-rgt-identity59.0%
Simplified59.0%
Final simplification69.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -430000.0) (not (<= b 5.4e+14))) (/ (/ x (exp b)) y) (/ (/ x a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -430000.0) || !(b <= 5.4e+14)) {
tmp = (x / exp(b)) / y;
} else {
tmp = (x / 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 <= (-430000.0d0)) .or. (.not. (b <= 5.4d+14))) then
tmp = (x / exp(b)) / y
else
tmp = (x / 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 <= -430000.0) || !(b <= 5.4e+14)) {
tmp = (x / Math.exp(b)) / y;
} else {
tmp = (x / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -430000.0) or not (b <= 5.4e+14): tmp = (x / math.exp(b)) / y else: tmp = (x / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -430000.0) || !(b <= 5.4e+14)) tmp = Float64(Float64(x / exp(b)) / y); else tmp = Float64(Float64(x / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -430000.0) || ~((b <= 5.4e+14))) tmp = (x / exp(b)) / y; else tmp = (x / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -430000.0], N[Not[LessEqual[b, 5.4e+14]], $MachinePrecision]], N[(N[(x / N[Exp[b], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -430000 \lor \neg \left(b \leq 5.4 \cdot 10^{+14}\right):\\
\;\;\;\;\frac{\frac{x}{e^{b}}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if b < -4.3e5 or 5.4e14 < b Initial program 100.0%
Taylor expanded in y around 0 92.0%
Taylor expanded in b around inf 82.6%
neg-mul-182.6%
Simplified82.6%
Taylor expanded in b around -inf 82.6%
mul-1-neg82.6%
rec-exp82.6%
associate-*r/82.6%
*-rgt-identity82.6%
Simplified82.6%
if -4.3e5 < b < 5.4e14Initial program 96.7%
associate-/l*95.4%
associate--l+95.4%
exp-sum82.0%
associate-/l*81.2%
*-commutative81.2%
exp-to-pow81.2%
exp-diff78.8%
*-commutative78.8%
exp-to-pow80.1%
sub-neg80.1%
metadata-eval80.1%
Simplified80.1%
Taylor expanded in b around 0 82.5%
*-commutative82.5%
exp-to-pow83.6%
sub-neg83.6%
metadata-eval83.6%
associate-*l*83.6%
Simplified83.6%
Taylor expanded in t around 0 66.3%
Taylor expanded in y around 0 41.0%
Final simplification63.1%
(FPCore (x y z t a b) :precision binary64 (if (<= b -6.1e+28) (/ (* x (+ 1.0 (* b (+ -1.0 (* b (* b -0.16666666666666666)))))) y) (if (<= b -1.7e-95) (* x (/ 1.0 (* y a))) (/ (/ x a) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -6.1e+28) {
tmp = (x * (1.0 + (b * (-1.0 + (b * (b * -0.16666666666666666)))))) / y;
} else if (b <= -1.7e-95) {
tmp = x * (1.0 / (y * a));
} else {
tmp = (x / 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 <= (-6.1d+28)) then
tmp = (x * (1.0d0 + (b * ((-1.0d0) + (b * (b * (-0.16666666666666666d0))))))) / y
else if (b <= (-1.7d-95)) then
tmp = x * (1.0d0 / (y * a))
else
tmp = (x / 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 <= -6.1e+28) {
tmp = (x * (1.0 + (b * (-1.0 + (b * (b * -0.16666666666666666)))))) / y;
} else if (b <= -1.7e-95) {
tmp = x * (1.0 / (y * a));
} else {
tmp = (x / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -6.1e+28: tmp = (x * (1.0 + (b * (-1.0 + (b * (b * -0.16666666666666666)))))) / y elif b <= -1.7e-95: tmp = x * (1.0 / (y * a)) else: tmp = (x / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -6.1e+28) tmp = Float64(Float64(x * Float64(1.0 + Float64(b * Float64(-1.0 + Float64(b * Float64(b * -0.16666666666666666)))))) / y); elseif (b <= -1.7e-95) tmp = Float64(x * Float64(1.0 / Float64(y * a))); else tmp = Float64(Float64(x / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -6.1e+28) tmp = (x * (1.0 + (b * (-1.0 + (b * (b * -0.16666666666666666)))))) / y; elseif (b <= -1.7e-95) tmp = x * (1.0 / (y * a)); else tmp = (x / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -6.1e+28], N[(N[(x * N[(1.0 + N[(b * N[(-1.0 + N[(b * N[(b * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, -1.7e-95], N[(x * N[(1.0 / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.1 \cdot 10^{+28}:\\
\;\;\;\;\frac{x \cdot \left(1 + b \cdot \left(-1 + b \cdot \left(b \cdot -0.16666666666666666\right)\right)\right)}{y}\\
\mathbf{elif}\;b \leq -1.7 \cdot 10^{-95}:\\
\;\;\;\;x \cdot \frac{1}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if b < -6.1000000000000002e28Initial program 100.0%
Taylor expanded in y around 0 92.8%
Taylor expanded in b around inf 89.3%
neg-mul-189.3%
Simplified89.3%
Taylor expanded in b around 0 75.3%
Taylor expanded in b around inf 75.3%
*-commutative75.3%
Simplified75.3%
if -6.1000000000000002e28 < b < -1.69999999999999997e-95Initial program 95.3%
associate-/l*98.2%
associate--l+98.2%
exp-sum78.2%
associate-/l*78.2%
*-commutative78.2%
exp-to-pow78.2%
exp-diff68.4%
*-commutative68.4%
exp-to-pow69.9%
sub-neg69.9%
metadata-eval69.9%
Simplified69.9%
Taylor expanded in y around 0 72.2%
exp-to-pow73.6%
sub-neg73.6%
metadata-eval73.6%
associate-*r/76.8%
Simplified76.8%
Taylor expanded in b around 0 80.6%
Taylor expanded in t around 0 42.0%
if -1.69999999999999997e-95 < b Initial program 98.5%
associate-/l*97.1%
associate--l+97.1%
exp-sum77.8%
associate-/l*77.2%
*-commutative77.2%
exp-to-pow77.2%
exp-diff69.6%
*-commutative69.6%
exp-to-pow70.2%
sub-neg70.2%
metadata-eval70.2%
Simplified70.2%
Taylor expanded in b around 0 72.5%
*-commutative72.5%
exp-to-pow73.1%
sub-neg73.1%
metadata-eval73.1%
associate-*l*73.1%
Simplified73.1%
Taylor expanded in t around 0 62.1%
Taylor expanded in y around 0 36.6%
Final simplification45.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b -290000.0) (/ (* x (+ 1.0 (* b (+ -1.0 (* b 0.5))))) y) (/ (/ x a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -290000.0) {
tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y;
} else {
tmp = (x / 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 <= (-290000.0d0)) then
tmp = (x * (1.0d0 + (b * ((-1.0d0) + (b * 0.5d0))))) / y
else
tmp = (x / 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 <= -290000.0) {
tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y;
} else {
tmp = (x / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -290000.0: tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y else: tmp = (x / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -290000.0) tmp = Float64(Float64(x * Float64(1.0 + Float64(b * Float64(-1.0 + Float64(b * 0.5))))) / y); else tmp = Float64(Float64(x / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -290000.0) tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y; else tmp = (x / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -290000.0], N[(N[(x * N[(1.0 + N[(b * N[(-1.0 + N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -290000:\\
\;\;\;\;\frac{x \cdot \left(1 + b \cdot \left(-1 + b \cdot 0.5\right)\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if b < -2.9e5Initial program 100.0%
Taylor expanded in y around 0 93.8%
Taylor expanded in b around inf 84.4%
neg-mul-184.4%
Simplified84.4%
Taylor expanded in b around 0 59.4%
if -2.9e5 < b Initial program 98.0%
associate-/l*97.1%
associate--l+97.1%
exp-sum77.4%
associate-/l*76.9%
*-commutative76.9%
exp-to-pow76.9%
exp-diff70.2%
*-commutative70.2%
exp-to-pow71.0%
sub-neg71.0%
metadata-eval71.0%
Simplified71.0%
Taylor expanded in b around 0 71.7%
*-commutative71.7%
exp-to-pow72.4%
sub-neg72.4%
metadata-eval72.4%
associate-*l*72.4%
Simplified72.4%
Taylor expanded in t around 0 59.8%
Taylor expanded in y around 0 35.2%
Final simplification41.2%
(FPCore (x y z t a b) :precision binary64 (if (<= b -340000.0) (* x (/ (- 1.0 b) y)) (/ (/ x a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -340000.0) {
tmp = x * ((1.0 - b) / y);
} else {
tmp = (x / 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 <= (-340000.0d0)) then
tmp = x * ((1.0d0 - b) / y)
else
tmp = (x / 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 <= -340000.0) {
tmp = x * ((1.0 - b) / y);
} else {
tmp = (x / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -340000.0: tmp = x * ((1.0 - b) / y) else: tmp = (x / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -340000.0) tmp = Float64(x * Float64(Float64(1.0 - b) / y)); else tmp = Float64(Float64(x / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -340000.0) tmp = x * ((1.0 - b) / y); else tmp = (x / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -340000.0], N[(x * N[(N[(1.0 - b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -340000:\\
\;\;\;\;x \cdot \frac{1 - b}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if b < -3.4e5Initial program 100.0%
Taylor expanded in y around 0 93.8%
Taylor expanded in b around inf 84.4%
neg-mul-184.4%
Simplified84.4%
Taylor expanded in b around 0 36.4%
*-lft-identity36.4%
associate-*r*36.4%
mul-1-neg36.4%
distribute-rgt-out36.4%
unsub-neg36.4%
Simplified36.4%
Taylor expanded in b around 0 36.4%
mul-1-neg36.4%
associate-/l*37.4%
distribute-lft-neg-in37.4%
*-lft-identity37.4%
distribute-rgt-in37.4%
+-commutative37.4%
sub-neg37.4%
associate-*l/36.4%
associate-*r/49.8%
Simplified49.8%
if -3.4e5 < b Initial program 98.0%
associate-/l*97.1%
associate--l+97.1%
exp-sum77.4%
associate-/l*76.9%
*-commutative76.9%
exp-to-pow76.9%
exp-diff70.2%
*-commutative70.2%
exp-to-pow71.0%
sub-neg71.0%
metadata-eval71.0%
Simplified71.0%
Taylor expanded in b around 0 71.7%
*-commutative71.7%
exp-to-pow72.4%
sub-neg72.4%
metadata-eval72.4%
associate-*l*72.4%
Simplified72.4%
Taylor expanded in t around 0 59.8%
Taylor expanded in y around 0 35.2%
(FPCore (x y z t a b) :precision binary64 (if (<= b -6900.0) (/ (* b (- x)) y) (/ (/ x a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -6900.0) {
tmp = (b * -x) / y;
} else {
tmp = (x / 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 <= (-6900.0d0)) then
tmp = (b * -x) / y
else
tmp = (x / 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 <= -6900.0) {
tmp = (b * -x) / y;
} else {
tmp = (x / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -6900.0: tmp = (b * -x) / y else: tmp = (x / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -6900.0) tmp = Float64(Float64(b * Float64(-x)) / y); else tmp = Float64(Float64(x / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -6900.0) tmp = (b * -x) / y; else tmp = (x / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -6900.0], N[(N[(b * (-x)), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6900:\\
\;\;\;\;\frac{b \cdot \left(-x\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if b < -6900Initial program 100.0%
Taylor expanded in y around 0 93.8%
Taylor expanded in b around inf 84.4%
neg-mul-184.4%
Simplified84.4%
Taylor expanded in b around 0 36.4%
*-lft-identity36.4%
associate-*r*36.4%
mul-1-neg36.4%
distribute-rgt-out36.4%
unsub-neg36.4%
Simplified36.4%
Taylor expanded in b around inf 36.4%
associate-*r/36.4%
associate-*r*36.4%
neg-mul-136.4%
Simplified36.4%
if -6900 < b Initial program 98.0%
associate-/l*97.1%
associate--l+97.1%
exp-sum77.4%
associate-/l*76.9%
*-commutative76.9%
exp-to-pow76.9%
exp-diff70.2%
*-commutative70.2%
exp-to-pow71.0%
sub-neg71.0%
metadata-eval71.0%
Simplified71.0%
Taylor expanded in b around 0 71.7%
*-commutative71.7%
exp-to-pow72.4%
sub-neg72.4%
metadata-eval72.4%
associate-*l*72.4%
Simplified72.4%
Taylor expanded in t around 0 59.8%
Taylor expanded in y around 0 35.2%
Final simplification35.5%
(FPCore (x y z t a b) :precision binary64 (if (<= b -4.5e-94) (/ x (* y a)) (/ (/ x a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -4.5e-94) {
tmp = x / (y * a);
} else {
tmp = (x / 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 <= (-4.5d-94)) then
tmp = x / (y * a)
else
tmp = (x / 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 <= -4.5e-94) {
tmp = x / (y * a);
} else {
tmp = (x / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -4.5e-94: tmp = x / (y * a) else: tmp = (x / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -4.5e-94) tmp = Float64(x / Float64(y * a)); else tmp = Float64(Float64(x / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -4.5e-94) tmp = x / (y * a); else tmp = (x / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -4.5e-94], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.5 \cdot 10^{-94}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if b < -4.5000000000000002e-94Initial program 98.3%
associate-/l*99.4%
associate--l+99.4%
exp-sum75.8%
associate-/l*75.8%
*-commutative75.8%
exp-to-pow75.8%
exp-diff65.3%
*-commutative65.3%
exp-to-pow65.9%
sub-neg65.9%
metadata-eval65.9%
Simplified65.9%
Taylor expanded in y around 0 71.4%
exp-to-pow71.9%
sub-neg71.9%
metadata-eval71.9%
associate-*r/77.8%
Simplified77.8%
Taylor expanded in b around 0 58.4%
Taylor expanded in t around 0 27.9%
if -4.5000000000000002e-94 < b Initial program 98.5%
associate-/l*97.1%
associate--l+97.1%
exp-sum77.8%
associate-/l*77.2%
*-commutative77.2%
exp-to-pow77.2%
exp-diff69.6%
*-commutative69.6%
exp-to-pow70.2%
sub-neg70.2%
metadata-eval70.2%
Simplified70.2%
Taylor expanded in b around 0 72.5%
*-commutative72.5%
exp-to-pow73.1%
sub-neg73.1%
metadata-eval73.1%
associate-*l*73.1%
Simplified73.1%
Taylor expanded in t around 0 62.1%
Taylor expanded in y around 0 36.6%
Final simplification33.7%
(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*97.8%
associate--l+97.8%
exp-sum77.1%
associate-/l*76.7%
*-commutative76.7%
exp-to-pow76.7%
exp-diff68.2%
*-commutative68.2%
exp-to-pow68.8%
sub-neg68.8%
metadata-eval68.8%
Simplified68.8%
Taylor expanded in y around 0 70.5%
exp-to-pow71.2%
sub-neg71.2%
metadata-eval71.2%
associate-*r/71.9%
Simplified71.9%
Taylor expanded in b around 0 58.1%
Taylor expanded in t around 0 30.9%
Final simplification30.9%
(FPCore (x y z t a b) :precision binary64 (/ x y))
double code(double x, double y, double z, double t, double a, double b) {
return x / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / y;
}
def code(x, y, z, t, a, b): return x / y
function code(x, y, z, t, a, b) return Float64(x / y) end
function tmp = code(x, y, z, t, a, b) tmp = x / y; end
code[x_, y_, z_, t_, a_, b_] := N[(x / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y}
\end{array}
Initial program 98.5%
Taylor expanded in y around 0 83.8%
Taylor expanded in b around inf 51.0%
neg-mul-151.0%
Simplified51.0%
Taylor expanded in b around 0 16.6%
(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 2024144
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2, A"
:precision binary64
:alt
(! :herbie-platform default (if (< t -8845848504127471/10000000000000000) (/ (* x (/ (pow a (- t 1)) y)) (- (+ b 1) (* y (log z)))) (if (< t 8520312288374073/10000000000) (/ (* (/ x y) (pow a (- t 1))) (exp (- b (* (log z) y)))) (/ (* x (/ (pow a (- t 1)) y)) (- (+ b 1) (* y (log z)))))))
(/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))