
(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 24 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 97.9%
Final simplification97.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (+ t -1.0) -5e+38) (not (<= (+ t -1.0) 10000000.0))) (/ (* 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) <= -5e+38) || !((t + -1.0) <= 10000000.0)) {
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)) <= (-5d+38)) .or. (.not. ((t + (-1.0d0)) <= 10000000.0d0))) 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) <= -5e+38) || !((t + -1.0) <= 10000000.0)) {
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) <= -5e+38) or not ((t + -1.0) <= 10000000.0): 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) <= -5e+38) || !(Float64(t + -1.0) <= 10000000.0)) 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) <= -5e+38) || ~(((t + -1.0) <= 10000000.0))) 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], -5e+38], N[Not[LessEqual[N[(t + -1.0), $MachinePrecision], 10000000.0]], $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 -5 \cdot 10^{+38} \lor \neg \left(t + -1 \leq 10000000\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) < -4.9999999999999997e38 or 1e7 < (-.f64 t 1) Initial program 99.2%
associate-*l/88.1%
associate--l+88.1%
associate--l+88.1%
fma-def88.1%
sub-neg88.1%
metadata-eval88.1%
Simplified88.1%
Taylor expanded in y around 0 92.5%
if -4.9999999999999997e38 < (-.f64 t 1) < 1e7Initial program 96.8%
Taylor expanded in t around 0 96.8%
*-commutative96.8%
mul-1-neg96.8%
unsub-neg96.8%
Simplified96.8%
Final simplification94.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (/ (pow a (+ t -1.0)) y) (/ x (exp b))))
(t_2 (/ (/ (* x (pow z y)) a) y)))
(if (<= y -2.85e+26)
t_2
(if (<= y -3e-296)
t_1
(if (<= y 5.3e-62)
(/ (/ x (* a (exp b))) y)
(if (<= y 1020000.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (pow(a, (t + -1.0)) / y) * (x / exp(b));
double t_2 = ((x * pow(z, y)) / a) / y;
double tmp;
if (y <= -2.85e+26) {
tmp = t_2;
} else if (y <= -3e-296) {
tmp = t_1;
} else if (y <= 5.3e-62) {
tmp = (x / (a * exp(b))) / y;
} else if (y <= 1020000.0) {
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 = ((a ** (t + (-1.0d0))) / y) * (x / exp(b))
t_2 = ((x * (z ** y)) / a) / y
if (y <= (-2.85d+26)) then
tmp = t_2
else if (y <= (-3d-296)) then
tmp = t_1
else if (y <= 5.3d-62) then
tmp = (x / (a * exp(b))) / y
else if (y <= 1020000.0d0) 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 = (Math.pow(a, (t + -1.0)) / y) * (x / Math.exp(b));
double t_2 = ((x * Math.pow(z, y)) / a) / y;
double tmp;
if (y <= -2.85e+26) {
tmp = t_2;
} else if (y <= -3e-296) {
tmp = t_1;
} else if (y <= 5.3e-62) {
tmp = (x / (a * Math.exp(b))) / y;
} else if (y <= 1020000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (math.pow(a, (t + -1.0)) / y) * (x / math.exp(b)) t_2 = ((x * math.pow(z, y)) / a) / y tmp = 0 if y <= -2.85e+26: tmp = t_2 elif y <= -3e-296: tmp = t_1 elif y <= 5.3e-62: tmp = (x / (a * math.exp(b))) / y elif y <= 1020000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64((a ^ Float64(t + -1.0)) / y) * Float64(x / exp(b))) t_2 = Float64(Float64(Float64(x * (z ^ y)) / a) / y) tmp = 0.0 if (y <= -2.85e+26) tmp = t_2; elseif (y <= -3e-296) tmp = t_1; elseif (y <= 5.3e-62) tmp = Float64(Float64(x / Float64(a * exp(b))) / y); elseif (y <= 1020000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((a ^ (t + -1.0)) / y) * (x / exp(b)); t_2 = ((x * (z ^ y)) / a) / y; tmp = 0.0; if (y <= -2.85e+26) tmp = t_2; elseif (y <= -3e-296) tmp = t_1; elseif (y <= 5.3e-62) tmp = (x / (a * exp(b))) / y; elseif (y <= 1020000.0) 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[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision] * N[(x / N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -2.85e+26], t$95$2, If[LessEqual[y, -3e-296], t$95$1, If[LessEqual[y, 5.3e-62], N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 1020000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{{a}^{\left(t + -1\right)}}{y} \cdot \frac{x}{e^{b}}\\
t_2 := \frac{\frac{x \cdot {z}^{y}}{a}}{y}\\
\mathbf{if}\;y \leq -2.85 \cdot 10^{+26}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -3 \cdot 10^{-296}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 5.3 \cdot 10^{-62}:\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\
\mathbf{elif}\;y \leq 1020000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -2.8500000000000002e26 or 1.02e6 < y Initial program 99.1%
Taylor expanded in t around 0 90.2%
*-commutative90.2%
mul-1-neg90.2%
unsub-neg90.2%
Simplified90.2%
Taylor expanded in b around 0 83.9%
*-commutative83.9%
div-exp83.9%
*-commutative83.9%
exp-to-pow83.9%
rem-exp-log83.9%
associate-*r/83.9%
Simplified83.9%
if -2.8500000000000002e26 < y < -2.9999999999999997e-296 or 5.2999999999999997e-62 < y < 1.02e6Initial program 98.6%
associate-*l/88.0%
*-commutative88.0%
exp-diff80.7%
exp-sum78.3%
*-commutative78.3%
exp-to-pow78.3%
*-commutative78.3%
exp-to-pow79.3%
Simplified79.3%
Taylor expanded in y around 0 87.7%
times-frac89.0%
sub-neg89.0%
metadata-eval89.0%
Simplified89.0%
if -2.9999999999999997e-296 < y < 5.2999999999999997e-62Initial program 94.8%
Taylor expanded in y around 0 94.8%
*-commutative94.8%
exp-diff82.3%
*-commutative82.3%
exp-to-pow83.2%
sub-neg83.2%
metadata-eval83.2%
Simplified83.2%
Taylor expanded in t around 0 88.1%
Final simplification86.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -5.3e+177) (not (<= y 8e+96))) (/ (/ (* 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 <= -5.3e+177) || !(y <= 8e+96)) {
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 <= (-5.3d+177)) .or. (.not. (y <= 8d+96))) 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 <= -5.3e+177) || !(y <= 8e+96)) {
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 <= -5.3e+177) or not (y <= 8e+96): 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 <= -5.3e+177) || !(y <= 8e+96)) 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 <= -5.3e+177) || ~((y <= 8e+96))) 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, -5.3e+177], N[Not[LessEqual[y, 8e+96]], $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.3 \cdot 10^{+177} \lor \neg \left(y \leq 8 \cdot 10^{+96}\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 < -5.2999999999999997e177 or 8.0000000000000004e96 < y Initial program 98.3%
Taylor expanded in t around 0 96.7%
*-commutative96.7%
mul-1-neg96.7%
unsub-neg96.7%
Simplified96.7%
Taylor expanded in b around 0 93.3%
*-commutative93.3%
div-exp93.3%
*-commutative93.3%
exp-to-pow93.3%
rem-exp-log93.3%
associate-*r/93.3%
Simplified93.3%
if -5.2999999999999997e177 < y < 8.0000000000000004e96Initial program 97.8%
associate-*l/90.0%
associate--l+90.0%
associate--l+90.0%
fma-def90.0%
sub-neg90.0%
metadata-eval90.0%
Simplified90.0%
Taylor expanded in y around 0 91.3%
Final simplification91.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -7e+31) (not (<= t 4e+29))) (* x (/ (pow a (+ t -1.0)) y)) (* (/ (pow z y) y) (/ x (* a (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -7e+31) || !(t <= 4e+29)) {
tmp = x * (pow(a, (t + -1.0)) / y);
} else {
tmp = (pow(z, y) / y) * (x / (a * exp(b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-7d+31)) .or. (.not. (t <= 4d+29))) then
tmp = x * ((a ** (t + (-1.0d0))) / y)
else
tmp = ((z ** y) / y) * (x / (a * exp(b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -7e+31) || !(t <= 4e+29)) {
tmp = x * (Math.pow(a, (t + -1.0)) / y);
} else {
tmp = (Math.pow(z, y) / y) * (x / (a * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -7e+31) or not (t <= 4e+29): tmp = x * (math.pow(a, (t + -1.0)) / y) else: tmp = (math.pow(z, y) / y) * (x / (a * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -7e+31) || !(t <= 4e+29)) tmp = Float64(x * Float64((a ^ Float64(t + -1.0)) / y)); else tmp = Float64(Float64((z ^ y) / y) * Float64(x / Float64(a * exp(b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -7e+31) || ~((t <= 4e+29))) tmp = x * ((a ^ (t + -1.0)) / y); else tmp = ((z ^ y) / y) * (x / (a * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -7e+31], N[Not[LessEqual[t, 4e+29]], $MachinePrecision]], N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[z, y], $MachinePrecision] / y), $MachinePrecision] * N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7 \cdot 10^{+31} \lor \neg \left(t \leq 4 \cdot 10^{+29}\right):\\
\;\;\;\;x \cdot \frac{{a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{{z}^{y}}{y} \cdot \frac{x}{a \cdot e^{b}}\\
\end{array}
\end{array}
if t < -7e31 or 3.99999999999999966e29 < t Initial program 99.1%
associate-*l/88.0%
*-commutative88.0%
exp-diff70.1%
exp-sum53.0%
*-commutative53.0%
exp-to-pow53.0%
*-commutative53.0%
exp-to-pow53.0%
Simplified53.0%
Taylor expanded in y around 0 71.9%
times-frac71.9%
sub-neg71.9%
metadata-eval71.9%
Simplified71.9%
Taylor expanded in b around 0 84.0%
if -7e31 < t < 3.99999999999999966e29Initial program 96.8%
associate-*r/96.1%
sub-neg96.1%
exp-sum87.4%
associate-/l*87.4%
associate-/r/86.0%
exp-neg86.0%
associate-*r/86.0%
Simplified84.2%
Taylor expanded in t around 0 84.9%
times-frac88.0%
Simplified88.0%
Final simplification86.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (/ (* x (pow z y)) a) y)))
(if (<= y -1.4e+26)
t_1
(if (<= y -2.35e-294)
(* x (/ (pow a (+ t -1.0)) y))
(if (<= y 1040000.0) (/ (/ 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 * pow(z, y)) / a) / y;
double tmp;
if (y <= -1.4e+26) {
tmp = t_1;
} else if (y <= -2.35e-294) {
tmp = x * (pow(a, (t + -1.0)) / y);
} else if (y <= 1040000.0) {
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 * (z ** y)) / a) / y
if (y <= (-1.4d+26)) then
tmp = t_1
else if (y <= (-2.35d-294)) then
tmp = x * ((a ** (t + (-1.0d0))) / y)
else if (y <= 1040000.0d0) 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 * Math.pow(z, y)) / a) / y;
double tmp;
if (y <= -1.4e+26) {
tmp = t_1;
} else if (y <= -2.35e-294) {
tmp = x * (Math.pow(a, (t + -1.0)) / y);
} else if (y <= 1040000.0) {
tmp = (x / (a * Math.exp(b))) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x * math.pow(z, y)) / a) / y tmp = 0 if y <= -1.4e+26: tmp = t_1 elif y <= -2.35e-294: tmp = x * (math.pow(a, (t + -1.0)) / y) elif y <= 1040000.0: tmp = (x / (a * math.exp(b))) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x * (z ^ y)) / a) / y) tmp = 0.0 if (y <= -1.4e+26) tmp = t_1; elseif (y <= -2.35e-294) tmp = Float64(x * Float64((a ^ Float64(t + -1.0)) / y)); elseif (y <= 1040000.0) 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 * (z ^ y)) / a) / y; tmp = 0.0; if (y <= -1.4e+26) tmp = t_1; elseif (y <= -2.35e-294) tmp = x * ((a ^ (t + -1.0)) / y); elseif (y <= 1040000.0) 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[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -1.4e+26], t$95$1, If[LessEqual[y, -2.35e-294], N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1040000.0], 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{\frac{x \cdot {z}^{y}}{a}}{y}\\
\mathbf{if}\;y \leq -1.4 \cdot 10^{+26}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2.35 \cdot 10^{-294}:\\
\;\;\;\;x \cdot \frac{{a}^{\left(t + -1\right)}}{y}\\
\mathbf{elif}\;y \leq 1040000:\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.4e26 or 1.04e6 < y Initial program 99.1%
Taylor expanded in t around 0 90.2%
*-commutative90.2%
mul-1-neg90.2%
unsub-neg90.2%
Simplified90.2%
Taylor expanded in b around 0 83.9%
*-commutative83.9%
div-exp83.9%
*-commutative83.9%
exp-to-pow83.9%
rem-exp-log83.9%
associate-*r/83.9%
Simplified83.9%
if -1.4e26 < y < -2.3500000000000001e-294Initial program 98.8%
associate-*l/87.5%
*-commutative87.5%
exp-diff80.2%
exp-sum77.2%
*-commutative77.2%
exp-to-pow77.2%
*-commutative77.2%
exp-to-pow78.0%
Simplified78.0%
Taylor expanded in y around 0 85.2%
times-frac89.6%
sub-neg89.6%
metadata-eval89.6%
Simplified89.6%
Taylor expanded in b around 0 78.4%
if -2.3500000000000001e-294 < y < 1.04e6Initial program 95.4%
Taylor expanded in y around 0 95.4%
*-commutative95.4%
exp-diff85.1%
*-commutative85.1%
exp-to-pow86.2%
sub-neg86.2%
metadata-eval86.2%
Simplified86.2%
Taylor expanded in t around 0 84.0%
Final simplification82.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -2.2e+25) (not (<= t 4.2e+23))) (* 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 <= -2.2e+25) || !(t <= 4.2e+23)) {
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 <= (-2.2d+25)) .or. (.not. (t <= 4.2d+23))) 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 <= -2.2e+25) || !(t <= 4.2e+23)) {
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 <= -2.2e+25) or not (t <= 4.2e+23): 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 <= -2.2e+25) || !(t <= 4.2e+23)) tmp = Float64(x * Float64((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 <= -2.2e+25) || ~((t <= 4.2e+23))) 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, -2.2e+25], N[Not[LessEqual[t, 4.2e+23]], $MachinePrecision]], N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $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 -2.2 \cdot 10^{+25} \lor \neg \left(t \leq 4.2 \cdot 10^{+23}\right):\\
\;\;\;\;x \cdot \frac{{a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\
\end{array}
\end{array}
if t < -2.2000000000000001e25 or 4.2000000000000003e23 < t Initial program 99.1%
associate-*l/88.0%
*-commutative88.0%
exp-diff70.1%
exp-sum53.0%
*-commutative53.0%
exp-to-pow53.0%
*-commutative53.0%
exp-to-pow53.0%
Simplified53.0%
Taylor expanded in y around 0 71.9%
times-frac71.9%
sub-neg71.9%
metadata-eval71.9%
Simplified71.9%
Taylor expanded in b around 0 84.0%
if -2.2000000000000001e25 < t < 4.2000000000000003e23Initial program 96.8%
Taylor expanded in y around 0 75.1%
*-commutative75.1%
exp-diff73.6%
*-commutative73.6%
exp-to-pow74.8%
sub-neg74.8%
metadata-eval74.8%
Simplified74.8%
Taylor expanded in t around 0 77.7%
Final simplification80.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (* y (exp b)))))
(if (<= b -440.0)
t_1
(if (<= b 4e-160)
(/ (* x (/ (- 1.0 b) y)) a)
(if (<= b 170000000.0) (* (/ 1.0 y) (/ x a)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (y * exp(b));
double tmp;
if (b <= -440.0) {
tmp = t_1;
} else if (b <= 4e-160) {
tmp = (x * ((1.0 - b) / y)) / a;
} else if (b <= 170000000.0) {
tmp = (1.0 / y) * (x / a);
} 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 * exp(b))
if (b <= (-440.0d0)) then
tmp = t_1
else if (b <= 4d-160) then
tmp = (x * ((1.0d0 - b) / y)) / a
else if (b <= 170000000.0d0) then
tmp = (1.0d0 / y) * (x / a)
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.exp(b));
double tmp;
if (b <= -440.0) {
tmp = t_1;
} else if (b <= 4e-160) {
tmp = (x * ((1.0 - b) / y)) / a;
} else if (b <= 170000000.0) {
tmp = (1.0 / y) * (x / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (y * math.exp(b)) tmp = 0 if b <= -440.0: tmp = t_1 elif b <= 4e-160: tmp = (x * ((1.0 - b) / y)) / a elif b <= 170000000.0: tmp = (1.0 / y) * (x / a) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(y * exp(b))) tmp = 0.0 if (b <= -440.0) tmp = t_1; elseif (b <= 4e-160) tmp = Float64(Float64(x * Float64(Float64(1.0 - b) / y)) / a); elseif (b <= 170000000.0) tmp = Float64(Float64(1.0 / y) * Float64(x / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (y * exp(b)); tmp = 0.0; if (b <= -440.0) tmp = t_1; elseif (b <= 4e-160) tmp = (x * ((1.0 - b) / y)) / a; elseif (b <= 170000000.0) tmp = (1.0 / y) * (x / a); 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[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -440.0], t$95$1, If[LessEqual[b, 4e-160], N[(N[(x * N[(N[(1.0 - b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[b, 170000000.0], N[(N[(1.0 / y), $MachinePrecision] * N[(x / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y \cdot e^{b}}\\
\mathbf{if}\;b \leq -440:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 4 \cdot 10^{-160}:\\
\;\;\;\;\frac{x \cdot \frac{1 - b}{y}}{a}\\
\mathbf{elif}\;b \leq 170000000:\\
\;\;\;\;\frac{1}{y} \cdot \frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if b < -440 or 1.7e8 < b Initial program 99.2%
associate-*l/87.7%
associate--l+87.7%
associate--l+87.7%
fma-def87.7%
sub-neg87.7%
metadata-eval87.7%
Simplified87.7%
Taylor expanded in b around inf 73.2%
neg-mul-173.2%
Simplified73.2%
Taylor expanded in x around 0 83.9%
*-commutative83.9%
rem-exp-log50.9%
exp-sum50.9%
sub-neg50.9%
exp-diff50.9%
rem-exp-log83.9%
associate-/l/83.9%
Simplified83.9%
if -440 < b < 4e-160Initial program 96.1%
Taylor expanded in y around 0 71.6%
*-commutative71.6%
exp-diff71.6%
*-commutative71.6%
exp-to-pow72.9%
sub-neg72.9%
metadata-eval72.9%
Simplified72.9%
Taylor expanded in t around 0 49.9%
Taylor expanded in b around 0 49.5%
Taylor expanded in b around 0 46.2%
+-commutative46.2%
*-commutative46.2%
mul-1-neg46.2%
unsub-neg46.2%
*-commutative46.2%
*-commutative46.2%
div-sub50.2%
*-commutative50.2%
associate-/r*53.4%
div-sub53.4%
associate-*r/53.4%
*-commutative53.4%
cancel-sign-sub-inv53.4%
*-lft-identity53.4%
associate-*l/53.4%
mul-1-neg53.4%
distribute-rgt-in53.4%
mul-1-neg53.4%
sub-neg53.4%
div-sub53.4%
Simplified53.4%
if 4e-160 < b < 1.7e8Initial program 98.9%
Taylor expanded in y around 0 76.2%
*-commutative76.2%
exp-diff72.9%
*-commutative72.9%
exp-to-pow73.9%
sub-neg73.9%
metadata-eval73.9%
Simplified73.9%
Taylor expanded in t around 0 45.4%
Taylor expanded in b around 0 39.2%
*-un-lft-identity39.2%
times-frac48.6%
Applied egg-rr48.6%
Final simplification67.3%
(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 97.9%
associate-*l/90.4%
*-commutative90.4%
exp-diff77.5%
exp-sum68.1%
*-commutative68.1%
exp-to-pow68.1%
*-commutative68.1%
exp-to-pow68.7%
Simplified68.7%
Taylor expanded in y around 0 70.7%
times-frac71.1%
sub-neg71.1%
metadata-eval71.1%
Simplified71.1%
Taylor expanded in t around 0 64.7%
Final simplification64.7%
(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 97.9%
Taylor expanded in y around 0 83.0%
*-commutative83.0%
exp-diff72.8%
*-commutative72.8%
exp-to-pow73.5%
sub-neg73.5%
metadata-eval73.5%
Simplified73.5%
Taylor expanded in t around 0 65.6%
Final simplification65.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ y (* x b))))
(if (<= b -6.4e+104)
(/ (- (* x t_1) y) (* y t_1))
(if (<= b -2e-212)
(/ (- (/ x a) (/ (* x b) a)) y)
(if (<= b 1.5e-156)
(/ (* x (/ (- 1.0 b) y)) a)
(/ (/ x (+ a (* a b))) y))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y / (x * b);
double tmp;
if (b <= -6.4e+104) {
tmp = ((x * t_1) - y) / (y * t_1);
} else if (b <= -2e-212) {
tmp = ((x / a) - ((x * b) / a)) / y;
} else if (b <= 1.5e-156) {
tmp = (x * ((1.0 - b) / y)) / a;
} else {
tmp = (x / (a + (a * b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = y / (x * b)
if (b <= (-6.4d+104)) then
tmp = ((x * t_1) - y) / (y * t_1)
else if (b <= (-2d-212)) then
tmp = ((x / a) - ((x * b) / a)) / y
else if (b <= 1.5d-156) then
tmp = (x * ((1.0d0 - b) / y)) / a
else
tmp = (x / (a + (a * b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y / (x * b);
double tmp;
if (b <= -6.4e+104) {
tmp = ((x * t_1) - y) / (y * t_1);
} else if (b <= -2e-212) {
tmp = ((x / a) - ((x * b) / a)) / y;
} else if (b <= 1.5e-156) {
tmp = (x * ((1.0 - b) / y)) / a;
} else {
tmp = (x / (a + (a * b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y / (x * b) tmp = 0 if b <= -6.4e+104: tmp = ((x * t_1) - y) / (y * t_1) elif b <= -2e-212: tmp = ((x / a) - ((x * b) / a)) / y elif b <= 1.5e-156: tmp = (x * ((1.0 - b) / y)) / a else: tmp = (x / (a + (a * b))) / y return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y / Float64(x * b)) tmp = 0.0 if (b <= -6.4e+104) tmp = Float64(Float64(Float64(x * t_1) - y) / Float64(y * t_1)); elseif (b <= -2e-212) tmp = Float64(Float64(Float64(x / a) - Float64(Float64(x * b) / a)) / y); elseif (b <= 1.5e-156) tmp = Float64(Float64(x * Float64(Float64(1.0 - b) / y)) / a); else tmp = Float64(Float64(x / Float64(a + Float64(a * b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y / (x * b); tmp = 0.0; if (b <= -6.4e+104) tmp = ((x * t_1) - y) / (y * t_1); elseif (b <= -2e-212) tmp = ((x / a) - ((x * b) / a)) / y; elseif (b <= 1.5e-156) tmp = (x * ((1.0 - b) / y)) / a; else tmp = (x / (a + (a * b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y / N[(x * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -6.4e+104], N[(N[(N[(x * t$95$1), $MachinePrecision] - y), $MachinePrecision] / N[(y * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -2e-212], N[(N[(N[(x / a), $MachinePrecision] - N[(N[(x * b), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 1.5e-156], N[(N[(x * N[(N[(1.0 - b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(N[(x / N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{x \cdot b}\\
\mathbf{if}\;b \leq -6.4 \cdot 10^{+104}:\\
\;\;\;\;\frac{x \cdot t_1 - y}{y \cdot t_1}\\
\mathbf{elif}\;b \leq -2 \cdot 10^{-212}:\\
\;\;\;\;\frac{\frac{x}{a} - \frac{x \cdot b}{a}}{y}\\
\mathbf{elif}\;b \leq 1.5 \cdot 10^{-156}:\\
\;\;\;\;\frac{x \cdot \frac{1 - b}{y}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a + a \cdot b}}{y}\\
\end{array}
\end{array}
if b < -6.4e104Initial program 100.0%
associate-*l/95.0%
associate--l+95.0%
associate--l+95.0%
fma-def95.0%
sub-neg95.0%
metadata-eval95.0%
Simplified95.0%
Taylor expanded in b around inf 90.1%
neg-mul-190.1%
Simplified90.1%
Taylor expanded in b around 0 47.8%
+-commutative47.8%
mul-1-neg47.8%
unsub-neg47.8%
Simplified47.8%
clear-num47.8%
frac-sub68.7%
*-commutative68.7%
*-commutative68.7%
Applied egg-rr68.7%
*-rgt-identity68.7%
Simplified68.7%
if -6.4e104 < b < -1.99999999999999991e-212Initial program 98.6%
Taylor expanded in y around 0 78.1%
*-commutative78.1%
exp-diff72.8%
*-commutative72.8%
exp-to-pow74.0%
sub-neg74.0%
metadata-eval74.0%
Simplified74.0%
Taylor expanded in t around 0 59.0%
Taylor expanded in b around 0 48.5%
if -1.99999999999999991e-212 < b < 1.5e-156Initial program 94.0%
Taylor expanded in y around 0 70.9%
*-commutative70.9%
exp-diff70.9%
*-commutative70.9%
exp-to-pow71.7%
sub-neg71.7%
metadata-eval71.7%
Simplified71.7%
Taylor expanded in t around 0 47.3%
Taylor expanded in b around 0 47.3%
Taylor expanded in b around 0 46.3%
+-commutative46.3%
*-commutative46.3%
mul-1-neg46.3%
unsub-neg46.3%
*-commutative46.3%
*-commutative46.3%
div-sub54.3%
*-commutative54.3%
associate-/r*59.8%
div-sub59.8%
associate-*r/59.8%
*-commutative59.8%
cancel-sign-sub-inv59.8%
*-lft-identity59.8%
associate-*l/59.8%
mul-1-neg59.8%
distribute-rgt-in59.8%
mul-1-neg59.8%
sub-neg59.8%
div-sub59.8%
Simplified59.8%
if 1.5e-156 < b Initial program 98.5%
Taylor expanded in y around 0 86.5%
*-commutative86.5%
exp-diff69.6%
*-commutative69.6%
exp-to-pow70.0%
sub-neg70.0%
metadata-eval70.0%
Simplified70.0%
Taylor expanded in t around 0 68.3%
Taylor expanded in b around 0 48.9%
Final simplification54.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (/ 1.0 a) (/ x y))))
(if (<= b -8.5e+16)
(* (/ b y) (- x))
(if (<= b 3.2e-157)
t_1
(if (<= b 1.35e+15)
(* (/ 1.0 y) (/ x a))
(if (<= b 7.5e+106) t_1 (/ x (+ y (* y b)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (1.0 / a) * (x / y);
double tmp;
if (b <= -8.5e+16) {
tmp = (b / y) * -x;
} else if (b <= 3.2e-157) {
tmp = t_1;
} else if (b <= 1.35e+15) {
tmp = (1.0 / y) * (x / a);
} else if (b <= 7.5e+106) {
tmp = t_1;
} else {
tmp = x / (y + (y * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (1.0d0 / a) * (x / y)
if (b <= (-8.5d+16)) then
tmp = (b / y) * -x
else if (b <= 3.2d-157) then
tmp = t_1
else if (b <= 1.35d+15) then
tmp = (1.0d0 / y) * (x / a)
else if (b <= 7.5d+106) then
tmp = t_1
else
tmp = x / (y + (y * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (1.0 / a) * (x / y);
double tmp;
if (b <= -8.5e+16) {
tmp = (b / y) * -x;
} else if (b <= 3.2e-157) {
tmp = t_1;
} else if (b <= 1.35e+15) {
tmp = (1.0 / y) * (x / a);
} else if (b <= 7.5e+106) {
tmp = t_1;
} else {
tmp = x / (y + (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (1.0 / a) * (x / y) tmp = 0 if b <= -8.5e+16: tmp = (b / y) * -x elif b <= 3.2e-157: tmp = t_1 elif b <= 1.35e+15: tmp = (1.0 / y) * (x / a) elif b <= 7.5e+106: tmp = t_1 else: tmp = x / (y + (y * b)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(1.0 / a) * Float64(x / y)) tmp = 0.0 if (b <= -8.5e+16) tmp = Float64(Float64(b / y) * Float64(-x)); elseif (b <= 3.2e-157) tmp = t_1; elseif (b <= 1.35e+15) tmp = Float64(Float64(1.0 / y) * Float64(x / a)); elseif (b <= 7.5e+106) tmp = t_1; else tmp = Float64(x / Float64(y + Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (1.0 / a) * (x / y); tmp = 0.0; if (b <= -8.5e+16) tmp = (b / y) * -x; elseif (b <= 3.2e-157) tmp = t_1; elseif (b <= 1.35e+15) tmp = (1.0 / y) * (x / a); elseif (b <= 7.5e+106) tmp = t_1; else tmp = x / (y + (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 / a), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -8.5e+16], N[(N[(b / y), $MachinePrecision] * (-x)), $MachinePrecision], If[LessEqual[b, 3.2e-157], t$95$1, If[LessEqual[b, 1.35e+15], N[(N[(1.0 / y), $MachinePrecision] * N[(x / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.5e+106], t$95$1, N[(x / N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{1}{a} \cdot \frac{x}{y}\\
\mathbf{if}\;b \leq -8.5 \cdot 10^{+16}:\\
\;\;\;\;\frac{b}{y} \cdot \left(-x\right)\\
\mathbf{elif}\;b \leq 3.2 \cdot 10^{-157}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 1.35 \cdot 10^{+15}:\\
\;\;\;\;\frac{1}{y} \cdot \frac{x}{a}\\
\mathbf{elif}\;b \leq 7.5 \cdot 10^{+106}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y + y \cdot b}\\
\end{array}
\end{array}
if b < -8.5e16Initial program 100.0%
associate-*l/93.2%
associate--l+93.2%
associate--l+93.2%
fma-def93.2%
sub-neg93.2%
metadata-eval93.2%
Simplified93.2%
Taylor expanded in b around inf 84.9%
neg-mul-184.9%
Simplified84.9%
Taylor expanded in b around 0 41.7%
+-commutative41.7%
mul-1-neg41.7%
unsub-neg41.7%
Simplified41.7%
Taylor expanded in b around inf 41.7%
mul-1-neg41.7%
associate-*l/48.0%
distribute-rgt-neg-in48.0%
Simplified48.0%
if -8.5e16 < b < 3.20000000000000021e-157 or 1.35e15 < b < 7.50000000000000058e106Initial program 96.7%
Taylor expanded in y around 0 75.4%
*-commutative75.4%
exp-diff69.7%
*-commutative69.7%
exp-to-pow70.8%
sub-neg70.8%
metadata-eval70.8%
Simplified70.8%
Taylor expanded in t around 0 51.6%
Taylor expanded in b around 0 46.8%
*-un-lft-identity46.8%
*-commutative46.8%
times-frac49.6%
Applied egg-rr49.6%
if 3.20000000000000021e-157 < b < 1.35e15Initial program 99.0%
Taylor expanded in y around 0 73.3%
*-commutative73.3%
exp-diff70.3%
*-commutative70.3%
exp-to-pow71.2%
sub-neg71.2%
metadata-eval71.2%
Simplified71.2%
Taylor expanded in t around 0 46.0%
Taylor expanded in b around 0 34.9%
*-un-lft-identity34.9%
times-frac46.0%
Applied egg-rr46.0%
if 7.50000000000000058e106 < b Initial program 97.4%
associate-*l/82.1%
associate--l+82.1%
associate--l+82.1%
fma-def82.1%
sub-neg82.1%
metadata-eval82.1%
Simplified82.1%
Taylor expanded in b around inf 74.5%
neg-mul-174.5%
Simplified74.5%
Taylor expanded in x around 0 89.9%
*-commutative89.9%
rem-exp-log56.5%
exp-sum56.5%
sub-neg56.5%
exp-diff56.5%
rem-exp-log89.9%
associate-/l/89.9%
Simplified89.9%
Taylor expanded in b around 0 48.0%
Final simplification48.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -5e+118)
(* (/ b y) (- x))
(if (<= b -0.00018)
(/ (* x (- b)) (* y a))
(if (<= b 1.55e-158)
(* (/ 1.0 a) (/ x y))
(if (<= b 7.5e+106) (* (/ 1.0 y) (/ x a)) (/ x (+ y (* y b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -5e+118) {
tmp = (b / y) * -x;
} else if (b <= -0.00018) {
tmp = (x * -b) / (y * a);
} else if (b <= 1.55e-158) {
tmp = (1.0 / a) * (x / y);
} else if (b <= 7.5e+106) {
tmp = (1.0 / y) * (x / a);
} else {
tmp = x / (y + (y * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-5d+118)) then
tmp = (b / y) * -x
else if (b <= (-0.00018d0)) then
tmp = (x * -b) / (y * a)
else if (b <= 1.55d-158) then
tmp = (1.0d0 / a) * (x / y)
else if (b <= 7.5d+106) then
tmp = (1.0d0 / y) * (x / a)
else
tmp = x / (y + (y * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -5e+118) {
tmp = (b / y) * -x;
} else if (b <= -0.00018) {
tmp = (x * -b) / (y * a);
} else if (b <= 1.55e-158) {
tmp = (1.0 / a) * (x / y);
} else if (b <= 7.5e+106) {
tmp = (1.0 / y) * (x / a);
} else {
tmp = x / (y + (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -5e+118: tmp = (b / y) * -x elif b <= -0.00018: tmp = (x * -b) / (y * a) elif b <= 1.55e-158: tmp = (1.0 / a) * (x / y) elif b <= 7.5e+106: tmp = (1.0 / y) * (x / a) else: tmp = x / (y + (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -5e+118) tmp = Float64(Float64(b / y) * Float64(-x)); elseif (b <= -0.00018) tmp = Float64(Float64(x * Float64(-b)) / Float64(y * a)); elseif (b <= 1.55e-158) tmp = Float64(Float64(1.0 / a) * Float64(x / y)); elseif (b <= 7.5e+106) tmp = Float64(Float64(1.0 / y) * Float64(x / a)); else tmp = Float64(x / Float64(y + Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -5e+118) tmp = (b / y) * -x; elseif (b <= -0.00018) tmp = (x * -b) / (y * a); elseif (b <= 1.55e-158) tmp = (1.0 / a) * (x / y); elseif (b <= 7.5e+106) tmp = (1.0 / y) * (x / a); else tmp = x / (y + (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -5e+118], N[(N[(b / y), $MachinePrecision] * (-x)), $MachinePrecision], If[LessEqual[b, -0.00018], N[(N[(x * (-b)), $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.55e-158], N[(N[(1.0 / a), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.5e+106], N[(N[(1.0 / y), $MachinePrecision] * N[(x / a), $MachinePrecision]), $MachinePrecision], N[(x / N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5 \cdot 10^{+118}:\\
\;\;\;\;\frac{b}{y} \cdot \left(-x\right)\\
\mathbf{elif}\;b \leq -0.00018:\\
\;\;\;\;\frac{x \cdot \left(-b\right)}{y \cdot a}\\
\mathbf{elif}\;b \leq 1.55 \cdot 10^{-158}:\\
\;\;\;\;\frac{1}{a} \cdot \frac{x}{y}\\
\mathbf{elif}\;b \leq 7.5 \cdot 10^{+106}:\\
\;\;\;\;\frac{1}{y} \cdot \frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y + y \cdot b}\\
\end{array}
\end{array}
if b < -4.99999999999999972e118Initial program 100.0%
associate-*l/94.9%
associate--l+94.9%
associate--l+94.9%
fma-def94.9%
sub-neg94.9%
metadata-eval94.9%
Simplified94.9%
Taylor expanded in b around inf 92.3%
neg-mul-192.3%
Simplified92.3%
Taylor expanded in b around 0 48.9%
+-commutative48.9%
mul-1-neg48.9%
unsub-neg48.9%
Simplified48.9%
Taylor expanded in b around inf 48.9%
mul-1-neg48.9%
associate-*l/60.9%
distribute-rgt-neg-in60.9%
Simplified60.9%
if -4.99999999999999972e118 < b < -1.80000000000000011e-4Initial program 99.7%
Taylor expanded in y around 0 92.1%
*-commutative92.1%
exp-diff72.7%
*-commutative72.7%
exp-to-pow73.2%
sub-neg73.2%
metadata-eval73.2%
Simplified73.2%
Taylor expanded in t around 0 69.8%
Taylor expanded in b around 0 38.9%
Taylor expanded in b around inf 41.9%
associate-*r/41.9%
mul-1-neg41.9%
*-commutative41.9%
distribute-rgt-neg-in41.9%
*-commutative41.9%
Simplified41.9%
if -1.80000000000000011e-4 < b < 1.55000000000000009e-158Initial program 96.1%
Taylor expanded in y around 0 71.2%
*-commutative71.2%
exp-diff71.2%
*-commutative71.2%
exp-to-pow72.4%
sub-neg72.4%
metadata-eval72.4%
Simplified72.4%
Taylor expanded in t around 0 49.9%
Taylor expanded in b around 0 49.4%
*-un-lft-identity49.4%
*-commutative49.4%
times-frac53.8%
Applied egg-rr53.8%
if 1.55000000000000009e-158 < b < 7.50000000000000058e106Initial program 99.3%
Taylor expanded in y around 0 81.8%
*-commutative81.8%
exp-diff67.8%
*-commutative67.8%
exp-to-pow68.4%
sub-neg68.4%
metadata-eval68.4%
Simplified68.4%
Taylor expanded in t around 0 51.5%
Taylor expanded in b around 0 30.3%
*-un-lft-identity30.3%
times-frac39.8%
Applied egg-rr39.8%
if 7.50000000000000058e106 < b Initial program 97.4%
associate-*l/82.1%
associate--l+82.1%
associate--l+82.1%
fma-def82.1%
sub-neg82.1%
metadata-eval82.1%
Simplified82.1%
Taylor expanded in b around inf 74.5%
neg-mul-174.5%
Simplified74.5%
Taylor expanded in x around 0 89.9%
*-commutative89.9%
rem-exp-log56.5%
exp-sum56.5%
sub-neg56.5%
exp-diff56.5%
rem-exp-log89.9%
associate-/l/89.9%
Simplified89.9%
Taylor expanded in b around 0 48.0%
Final simplification50.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -2.05e+209)
(* (/ b y) (- x))
(if (<= b -2.05e-278)
(/ (/ (- x (* x b)) a) y)
(if (<= b 7.2e-157)
(/ (* x (/ (- 1.0 b) y)) a)
(/ (/ x (+ a (* a b))) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.05e+209) {
tmp = (b / y) * -x;
} else if (b <= -2.05e-278) {
tmp = ((x - (x * b)) / a) / y;
} else if (b <= 7.2e-157) {
tmp = (x * ((1.0 - b) / y)) / a;
} else {
tmp = (x / (a + (a * b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-2.05d+209)) then
tmp = (b / y) * -x
else if (b <= (-2.05d-278)) then
tmp = ((x - (x * b)) / a) / y
else if (b <= 7.2d-157) then
tmp = (x * ((1.0d0 - b) / y)) / a
else
tmp = (x / (a + (a * b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.05e+209) {
tmp = (b / y) * -x;
} else if (b <= -2.05e-278) {
tmp = ((x - (x * b)) / a) / y;
} else if (b <= 7.2e-157) {
tmp = (x * ((1.0 - b) / y)) / a;
} else {
tmp = (x / (a + (a * b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -2.05e+209: tmp = (b / y) * -x elif b <= -2.05e-278: tmp = ((x - (x * b)) / a) / y elif b <= 7.2e-157: tmp = (x * ((1.0 - b) / y)) / a else: tmp = (x / (a + (a * b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.05e+209) tmp = Float64(Float64(b / y) * Float64(-x)); elseif (b <= -2.05e-278) tmp = Float64(Float64(Float64(x - Float64(x * b)) / a) / y); elseif (b <= 7.2e-157) tmp = Float64(Float64(x * Float64(Float64(1.0 - b) / y)) / a); else tmp = Float64(Float64(x / Float64(a + Float64(a * b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -2.05e+209) tmp = (b / y) * -x; elseif (b <= -2.05e-278) tmp = ((x - (x * b)) / a) / y; elseif (b <= 7.2e-157) tmp = (x * ((1.0 - b) / y)) / a; else tmp = (x / (a + (a * b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.05e+209], N[(N[(b / y), $MachinePrecision] * (-x)), $MachinePrecision], If[LessEqual[b, -2.05e-278], N[(N[(N[(x - N[(x * b), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 7.2e-157], N[(N[(x * N[(N[(1.0 - b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(N[(x / N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.05 \cdot 10^{+209}:\\
\;\;\;\;\frac{b}{y} \cdot \left(-x\right)\\
\mathbf{elif}\;b \leq -2.05 \cdot 10^{-278}:\\
\;\;\;\;\frac{\frac{x - x \cdot b}{a}}{y}\\
\mathbf{elif}\;b \leq 7.2 \cdot 10^{-157}:\\
\;\;\;\;\frac{x \cdot \frac{1 - b}{y}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a + a \cdot b}}{y}\\
\end{array}
\end{array}
if b < -2.05000000000000008e209Initial program 100.0%
associate-*l/93.1%
associate--l+93.1%
associate--l+93.1%
fma-def93.1%
sub-neg93.1%
metadata-eval93.1%
Simplified93.1%
Taylor expanded in b around inf 89.7%
neg-mul-189.7%
Simplified89.7%
Taylor expanded in b around 0 54.1%
+-commutative54.1%
mul-1-neg54.1%
unsub-neg54.1%
Simplified54.1%
Taylor expanded in b around inf 54.1%
mul-1-neg54.1%
associate-*l/73.4%
distribute-rgt-neg-in73.4%
Simplified73.4%
if -2.05000000000000008e209 < b < -2.05000000000000001e-278Initial program 98.9%
Taylor expanded in y around 0 81.0%
*-commutative81.0%
exp-diff74.8%
*-commutative74.8%
exp-to-pow75.8%
sub-neg75.8%
metadata-eval75.8%
Simplified75.8%
Taylor expanded in t around 0 62.3%
Taylor expanded in b around 0 47.2%
Taylor expanded in a around 0 47.2%
+-commutative47.2%
mul-1-neg47.2%
sub-neg47.2%
*-commutative47.2%
Simplified47.2%
if -2.05000000000000001e-278 < b < 7.2e-157Initial program 92.5%
Taylor expanded in y around 0 67.9%
*-commutative67.9%
exp-diff67.9%
*-commutative67.9%
exp-to-pow68.8%
sub-neg68.8%
metadata-eval68.8%
Simplified68.8%
Taylor expanded in t around 0 44.9%
Taylor expanded in b around 0 44.9%
Taylor expanded in b around 0 41.4%
+-commutative41.4%
*-commutative41.4%
mul-1-neg41.4%
unsub-neg41.4%
*-commutative41.4%
*-commutative41.4%
div-sub51.5%
*-commutative51.5%
associate-/r*60.9%
div-sub60.9%
associate-*r/60.9%
*-commutative60.9%
cancel-sign-sub-inv60.9%
*-lft-identity60.9%
associate-*l/60.9%
mul-1-neg60.9%
distribute-rgt-in60.9%
mul-1-neg60.9%
sub-neg60.9%
div-sub60.9%
Simplified60.9%
if 7.2e-157 < b Initial program 98.5%
Taylor expanded in y around 0 86.5%
*-commutative86.5%
exp-diff69.6%
*-commutative69.6%
exp-to-pow70.0%
sub-neg70.0%
metadata-eval70.0%
Simplified70.0%
Taylor expanded in t around 0 68.3%
Taylor expanded in b around 0 48.9%
Final simplification52.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -1.2e+211)
(* (/ b y) (- x))
(if (<= b -2.4e-278)
(/ (- (/ x a) (/ (* x b) a)) y)
(if (<= b 1.5e-156)
(/ (* x (/ (- 1.0 b) y)) a)
(/ (/ x (+ a (* a b))) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.2e+211) {
tmp = (b / y) * -x;
} else if (b <= -2.4e-278) {
tmp = ((x / a) - ((x * b) / a)) / y;
} else if (b <= 1.5e-156) {
tmp = (x * ((1.0 - b) / y)) / a;
} else {
tmp = (x / (a + (a * b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-1.2d+211)) then
tmp = (b / y) * -x
else if (b <= (-2.4d-278)) then
tmp = ((x / a) - ((x * b) / a)) / y
else if (b <= 1.5d-156) then
tmp = (x * ((1.0d0 - b) / y)) / a
else
tmp = (x / (a + (a * b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.2e+211) {
tmp = (b / y) * -x;
} else if (b <= -2.4e-278) {
tmp = ((x / a) - ((x * b) / a)) / y;
} else if (b <= 1.5e-156) {
tmp = (x * ((1.0 - b) / y)) / a;
} else {
tmp = (x / (a + (a * b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.2e+211: tmp = (b / y) * -x elif b <= -2.4e-278: tmp = ((x / a) - ((x * b) / a)) / y elif b <= 1.5e-156: tmp = (x * ((1.0 - b) / y)) / a else: tmp = (x / (a + (a * b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.2e+211) tmp = Float64(Float64(b / y) * Float64(-x)); elseif (b <= -2.4e-278) tmp = Float64(Float64(Float64(x / a) - Float64(Float64(x * b) / a)) / y); elseif (b <= 1.5e-156) tmp = Float64(Float64(x * Float64(Float64(1.0 - b) / y)) / a); else tmp = Float64(Float64(x / Float64(a + Float64(a * b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.2e+211) tmp = (b / y) * -x; elseif (b <= -2.4e-278) tmp = ((x / a) - ((x * b) / a)) / y; elseif (b <= 1.5e-156) tmp = (x * ((1.0 - b) / y)) / a; else tmp = (x / (a + (a * b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.2e+211], N[(N[(b / y), $MachinePrecision] * (-x)), $MachinePrecision], If[LessEqual[b, -2.4e-278], N[(N[(N[(x / a), $MachinePrecision] - N[(N[(x * b), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 1.5e-156], N[(N[(x * N[(N[(1.0 - b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(N[(x / N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.2 \cdot 10^{+211}:\\
\;\;\;\;\frac{b}{y} \cdot \left(-x\right)\\
\mathbf{elif}\;b \leq -2.4 \cdot 10^{-278}:\\
\;\;\;\;\frac{\frac{x}{a} - \frac{x \cdot b}{a}}{y}\\
\mathbf{elif}\;b \leq 1.5 \cdot 10^{-156}:\\
\;\;\;\;\frac{x \cdot \frac{1 - b}{y}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a + a \cdot b}}{y}\\
\end{array}
\end{array}
if b < -1.20000000000000009e211Initial program 100.0%
associate-*l/93.1%
associate--l+93.1%
associate--l+93.1%
fma-def93.1%
sub-neg93.1%
metadata-eval93.1%
Simplified93.1%
Taylor expanded in b around inf 89.7%
neg-mul-189.7%
Simplified89.7%
Taylor expanded in b around 0 54.1%
+-commutative54.1%
mul-1-neg54.1%
unsub-neg54.1%
Simplified54.1%
Taylor expanded in b around inf 54.1%
mul-1-neg54.1%
associate-*l/73.4%
distribute-rgt-neg-in73.4%
Simplified73.4%
if -1.20000000000000009e211 < b < -2.4e-278Initial program 98.9%
Taylor expanded in y around 0 81.0%
*-commutative81.0%
exp-diff74.8%
*-commutative74.8%
exp-to-pow75.8%
sub-neg75.8%
metadata-eval75.8%
Simplified75.8%
Taylor expanded in t around 0 62.3%
Taylor expanded in b around 0 47.2%
if -2.4e-278 < b < 1.5e-156Initial program 92.5%
Taylor expanded in y around 0 67.9%
*-commutative67.9%
exp-diff67.9%
*-commutative67.9%
exp-to-pow68.8%
sub-neg68.8%
metadata-eval68.8%
Simplified68.8%
Taylor expanded in t around 0 44.9%
Taylor expanded in b around 0 44.9%
Taylor expanded in b around 0 41.4%
+-commutative41.4%
*-commutative41.4%
mul-1-neg41.4%
unsub-neg41.4%
*-commutative41.4%
*-commutative41.4%
div-sub51.5%
*-commutative51.5%
associate-/r*60.9%
div-sub60.9%
associate-*r/60.9%
*-commutative60.9%
cancel-sign-sub-inv60.9%
*-lft-identity60.9%
associate-*l/60.9%
mul-1-neg60.9%
distribute-rgt-in60.9%
mul-1-neg60.9%
sub-neg60.9%
div-sub60.9%
Simplified60.9%
if 1.5e-156 < b Initial program 98.5%
Taylor expanded in y around 0 86.5%
*-commutative86.5%
exp-diff69.6%
*-commutative69.6%
exp-to-pow70.0%
sub-neg70.0%
metadata-eval70.0%
Simplified70.0%
Taylor expanded in t around 0 68.3%
Taylor expanded in b around 0 48.9%
Final simplification52.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -6.6e+16)
(* (/ b y) (- x))
(if (<= b 3.4e-157)
(* (/ 1.0 a) (/ x y))
(if (<= b 5e+14) (* (/ 1.0 y) (/ x a)) (/ 1.0 (* y (/ a x)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -6.6e+16) {
tmp = (b / y) * -x;
} else if (b <= 3.4e-157) {
tmp = (1.0 / a) * (x / y);
} else if (b <= 5e+14) {
tmp = (1.0 / y) * (x / a);
} else {
tmp = 1.0 / (y * (a / x));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-6.6d+16)) then
tmp = (b / y) * -x
else if (b <= 3.4d-157) then
tmp = (1.0d0 / a) * (x / y)
else if (b <= 5d+14) then
tmp = (1.0d0 / y) * (x / a)
else
tmp = 1.0d0 / (y * (a / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -6.6e+16) {
tmp = (b / y) * -x;
} else if (b <= 3.4e-157) {
tmp = (1.0 / a) * (x / y);
} else if (b <= 5e+14) {
tmp = (1.0 / y) * (x / a);
} else {
tmp = 1.0 / (y * (a / x));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -6.6e+16: tmp = (b / y) * -x elif b <= 3.4e-157: tmp = (1.0 / a) * (x / y) elif b <= 5e+14: tmp = (1.0 / y) * (x / a) else: tmp = 1.0 / (y * (a / x)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -6.6e+16) tmp = Float64(Float64(b / y) * Float64(-x)); elseif (b <= 3.4e-157) tmp = Float64(Float64(1.0 / a) * Float64(x / y)); elseif (b <= 5e+14) tmp = Float64(Float64(1.0 / y) * Float64(x / a)); else tmp = Float64(1.0 / Float64(y * Float64(a / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -6.6e+16) tmp = (b / y) * -x; elseif (b <= 3.4e-157) tmp = (1.0 / a) * (x / y); elseif (b <= 5e+14) tmp = (1.0 / y) * (x / a); else tmp = 1.0 / (y * (a / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -6.6e+16], N[(N[(b / y), $MachinePrecision] * (-x)), $MachinePrecision], If[LessEqual[b, 3.4e-157], N[(N[(1.0 / a), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5e+14], N[(N[(1.0 / y), $MachinePrecision] * N[(x / a), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(y * N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.6 \cdot 10^{+16}:\\
\;\;\;\;\frac{b}{y} \cdot \left(-x\right)\\
\mathbf{elif}\;b \leq 3.4 \cdot 10^{-157}:\\
\;\;\;\;\frac{1}{a} \cdot \frac{x}{y}\\
\mathbf{elif}\;b \leq 5 \cdot 10^{+14}:\\
\;\;\;\;\frac{1}{y} \cdot \frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{y \cdot \frac{a}{x}}\\
\end{array}
\end{array}
if b < -6.6e16Initial program 100.0%
associate-*l/93.2%
associate--l+93.2%
associate--l+93.2%
fma-def93.2%
sub-neg93.2%
metadata-eval93.2%
Simplified93.2%
Taylor expanded in b around inf 84.9%
neg-mul-184.9%
Simplified84.9%
Taylor expanded in b around 0 41.7%
+-commutative41.7%
mul-1-neg41.7%
unsub-neg41.7%
Simplified41.7%
Taylor expanded in b around inf 41.7%
mul-1-neg41.7%
associate-*l/48.0%
distribute-rgt-neg-in48.0%
Simplified48.0%
if -6.6e16 < b < 3.39999999999999977e-157Initial program 96.2%
Taylor expanded in y around 0 71.8%
*-commutative71.8%
exp-diff70.8%
*-commutative70.8%
exp-to-pow72.1%
sub-neg72.1%
metadata-eval72.1%
Simplified72.1%
Taylor expanded in t around 0 49.9%
Taylor expanded in b around 0 50.7%
*-un-lft-identity50.7%
*-commutative50.7%
times-frac52.8%
Applied egg-rr52.8%
if 3.39999999999999977e-157 < b < 5e14Initial program 99.0%
Taylor expanded in y around 0 73.3%
*-commutative73.3%
exp-diff70.3%
*-commutative70.3%
exp-to-pow71.2%
sub-neg71.2%
metadata-eval71.2%
Simplified71.2%
Taylor expanded in t around 0 46.0%
Taylor expanded in b around 0 34.9%
*-un-lft-identity34.9%
times-frac46.0%
Applied egg-rr46.0%
if 5e14 < b Initial program 98.2%
Taylor expanded in y around 0 94.6%
*-commutative94.6%
exp-diff69.2%
*-commutative69.2%
exp-to-pow69.2%
sub-neg69.2%
metadata-eval69.2%
Simplified69.2%
Taylor expanded in t around 0 82.1%
Taylor expanded in b around 0 22.2%
clear-num22.5%
inv-pow22.5%
*-commutative22.5%
Applied egg-rr22.5%
unpow-122.5%
associate-*l/24.3%
*-commutative24.3%
Simplified24.3%
Final simplification44.7%
(FPCore (x y z t a b) :precision binary64 (if (<= b -7.2e+16) (* (/ b y) (- x)) (if (<= b 1.4e-156) (* (/ 1.0 a) (/ x y)) (/ (/ x a) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -7.2e+16) {
tmp = (b / y) * -x;
} else if (b <= 1.4e-156) {
tmp = (1.0 / a) * (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 <= (-7.2d+16)) then
tmp = (b / y) * -x
else if (b <= 1.4d-156) then
tmp = (1.0d0 / a) * (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 <= -7.2e+16) {
tmp = (b / y) * -x;
} else if (b <= 1.4e-156) {
tmp = (1.0 / a) * (x / y);
} else {
tmp = (x / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -7.2e+16: tmp = (b / y) * -x elif b <= 1.4e-156: tmp = (1.0 / a) * (x / y) else: tmp = (x / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -7.2e+16) tmp = Float64(Float64(b / y) * Float64(-x)); elseif (b <= 1.4e-156) tmp = Float64(Float64(1.0 / a) * 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 <= -7.2e+16) tmp = (b / y) * -x; elseif (b <= 1.4e-156) tmp = (1.0 / a) * (x / y); else tmp = (x / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -7.2e+16], N[(N[(b / y), $MachinePrecision] * (-x)), $MachinePrecision], If[LessEqual[b, 1.4e-156], N[(N[(1.0 / a), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.2 \cdot 10^{+16}:\\
\;\;\;\;\frac{b}{y} \cdot \left(-x\right)\\
\mathbf{elif}\;b \leq 1.4 \cdot 10^{-156}:\\
\;\;\;\;\frac{1}{a} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if b < -7.2e16Initial program 100.0%
associate-*l/93.2%
associate--l+93.2%
associate--l+93.2%
fma-def93.2%
sub-neg93.2%
metadata-eval93.2%
Simplified93.2%
Taylor expanded in b around inf 84.9%
neg-mul-184.9%
Simplified84.9%
Taylor expanded in b around 0 41.7%
+-commutative41.7%
mul-1-neg41.7%
unsub-neg41.7%
Simplified41.7%
Taylor expanded in b around inf 41.7%
mul-1-neg41.7%
associate-*l/48.0%
distribute-rgt-neg-in48.0%
Simplified48.0%
if -7.2e16 < b < 1.4000000000000001e-156Initial program 96.2%
Taylor expanded in y around 0 71.8%
*-commutative71.8%
exp-diff70.8%
*-commutative70.8%
exp-to-pow72.1%
sub-neg72.1%
metadata-eval72.1%
Simplified72.1%
Taylor expanded in t around 0 49.9%
Taylor expanded in b around 0 50.7%
*-un-lft-identity50.7%
*-commutative50.7%
times-frac52.8%
Applied egg-rr52.8%
if 1.4000000000000001e-156 < b Initial program 98.5%
Taylor expanded in y around 0 86.5%
*-commutative86.5%
exp-diff69.6%
*-commutative69.6%
exp-to-pow70.0%
sub-neg70.0%
metadata-eval70.0%
Simplified70.0%
Taylor expanded in t around 0 68.3%
Taylor expanded in b around 0 27.1%
associate-/l/31.7%
Simplified31.7%
Final simplification44.4%
(FPCore (x y z t a b) :precision binary64 (if (<= b -8.5e+16) (* (/ b y) (- x)) (if (<= b 6.6e-160) (* (/ 1.0 a) (/ x y)) (* (/ 1.0 y) (/ x a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -8.5e+16) {
tmp = (b / y) * -x;
} else if (b <= 6.6e-160) {
tmp = (1.0 / a) * (x / y);
} else {
tmp = (1.0 / 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 <= (-8.5d+16)) then
tmp = (b / y) * -x
else if (b <= 6.6d-160) then
tmp = (1.0d0 / a) * (x / y)
else
tmp = (1.0d0 / 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 <= -8.5e+16) {
tmp = (b / y) * -x;
} else if (b <= 6.6e-160) {
tmp = (1.0 / a) * (x / y);
} else {
tmp = (1.0 / y) * (x / a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -8.5e+16: tmp = (b / y) * -x elif b <= 6.6e-160: tmp = (1.0 / a) * (x / y) else: tmp = (1.0 / y) * (x / a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -8.5e+16) tmp = Float64(Float64(b / y) * Float64(-x)); elseif (b <= 6.6e-160) tmp = Float64(Float64(1.0 / a) * Float64(x / y)); else tmp = Float64(Float64(1.0 / y) * Float64(x / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -8.5e+16) tmp = (b / y) * -x; elseif (b <= 6.6e-160) tmp = (1.0 / a) * (x / y); else tmp = (1.0 / y) * (x / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -8.5e+16], N[(N[(b / y), $MachinePrecision] * (-x)), $MachinePrecision], If[LessEqual[b, 6.6e-160], N[(N[(1.0 / a), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / y), $MachinePrecision] * N[(x / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.5 \cdot 10^{+16}:\\
\;\;\;\;\frac{b}{y} \cdot \left(-x\right)\\
\mathbf{elif}\;b \leq 6.6 \cdot 10^{-160}:\\
\;\;\;\;\frac{1}{a} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{y} \cdot \frac{x}{a}\\
\end{array}
\end{array}
if b < -8.5e16Initial program 100.0%
associate-*l/93.2%
associate--l+93.2%
associate--l+93.2%
fma-def93.2%
sub-neg93.2%
metadata-eval93.2%
Simplified93.2%
Taylor expanded in b around inf 84.9%
neg-mul-184.9%
Simplified84.9%
Taylor expanded in b around 0 41.7%
+-commutative41.7%
mul-1-neg41.7%
unsub-neg41.7%
Simplified41.7%
Taylor expanded in b around inf 41.7%
mul-1-neg41.7%
associate-*l/48.0%
distribute-rgt-neg-in48.0%
Simplified48.0%
if -8.5e16 < b < 6.6e-160Initial program 96.2%
Taylor expanded in y around 0 71.8%
*-commutative71.8%
exp-diff70.8%
*-commutative70.8%
exp-to-pow72.1%
sub-neg72.1%
metadata-eval72.1%
Simplified72.1%
Taylor expanded in t around 0 49.9%
Taylor expanded in b around 0 50.7%
*-un-lft-identity50.7%
*-commutative50.7%
times-frac52.8%
Applied egg-rr52.8%
if 6.6e-160 < b Initial program 98.5%
Taylor expanded in y around 0 86.5%
*-commutative86.5%
exp-diff69.6%
*-commutative69.6%
exp-to-pow70.0%
sub-neg70.0%
metadata-eval70.0%
Simplified70.0%
Taylor expanded in t around 0 68.3%
Taylor expanded in b around 0 27.1%
*-un-lft-identity27.1%
times-frac31.7%
Applied egg-rr31.7%
Final simplification44.4%
(FPCore (x y z t a b) :precision binary64 (if (<= b 2.85e-158) (/ (* x (/ (- 1.0 b) y)) a) (if (<= b 7.5e+106) (* (/ 1.0 y) (/ x a)) (/ x (+ y (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 2.85e-158) {
tmp = (x * ((1.0 - b) / y)) / a;
} else if (b <= 7.5e+106) {
tmp = (1.0 / y) * (x / a);
} else {
tmp = x / (y + (y * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= 2.85d-158) then
tmp = (x * ((1.0d0 - b) / y)) / a
else if (b <= 7.5d+106) then
tmp = (1.0d0 / y) * (x / a)
else
tmp = x / (y + (y * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 2.85e-158) {
tmp = (x * ((1.0 - b) / y)) / a;
} else if (b <= 7.5e+106) {
tmp = (1.0 / y) * (x / a);
} else {
tmp = x / (y + (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 2.85e-158: tmp = (x * ((1.0 - b) / y)) / a elif b <= 7.5e+106: tmp = (1.0 / y) * (x / a) else: tmp = x / (y + (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 2.85e-158) tmp = Float64(Float64(x * Float64(Float64(1.0 - b) / y)) / a); elseif (b <= 7.5e+106) tmp = Float64(Float64(1.0 / y) * Float64(x / a)); else tmp = Float64(x / Float64(y + Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 2.85e-158) tmp = (x * ((1.0 - b) / y)) / a; elseif (b <= 7.5e+106) tmp = (1.0 / y) * (x / a); else tmp = x / (y + (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 2.85e-158], N[(N[(x * N[(N[(1.0 - b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[b, 7.5e+106], N[(N[(1.0 / y), $MachinePrecision] * N[(x / a), $MachinePrecision]), $MachinePrecision], N[(x / N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.85 \cdot 10^{-158}:\\
\;\;\;\;\frac{x \cdot \frac{1 - b}{y}}{a}\\
\mathbf{elif}\;b \leq 7.5 \cdot 10^{+106}:\\
\;\;\;\;\frac{1}{y} \cdot \frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y + y \cdot b}\\
\end{array}
\end{array}
if b < 2.84999999999999991e-158Initial program 97.5%
Taylor expanded in y around 0 81.1%
*-commutative81.1%
exp-diff74.5%
*-commutative74.5%
exp-to-pow75.3%
sub-neg75.3%
metadata-eval75.3%
Simplified75.3%
Taylor expanded in t around 0 64.1%
Taylor expanded in b around 0 47.8%
Taylor expanded in b around 0 44.7%
+-commutative44.7%
*-commutative44.7%
mul-1-neg44.7%
unsub-neg44.7%
*-commutative44.7%
*-commutative44.7%
div-sub47.2%
*-commutative47.2%
associate-/r*50.4%
div-sub50.4%
associate-*r/52.6%
*-commutative52.6%
cancel-sign-sub-inv52.6%
*-lft-identity52.6%
associate-*l/52.6%
mul-1-neg52.6%
distribute-rgt-in52.6%
mul-1-neg52.6%
sub-neg52.6%
div-sub52.6%
Simplified52.6%
if 2.84999999999999991e-158 < b < 7.50000000000000058e106Initial program 99.3%
Taylor expanded in y around 0 81.8%
*-commutative81.8%
exp-diff67.8%
*-commutative67.8%
exp-to-pow68.4%
sub-neg68.4%
metadata-eval68.4%
Simplified68.4%
Taylor expanded in t around 0 51.5%
Taylor expanded in b around 0 30.3%
*-un-lft-identity30.3%
times-frac39.8%
Applied egg-rr39.8%
if 7.50000000000000058e106 < b Initial program 97.4%
associate-*l/82.1%
associate--l+82.1%
associate--l+82.1%
fma-def82.1%
sub-neg82.1%
metadata-eval82.1%
Simplified82.1%
Taylor expanded in b around inf 74.5%
neg-mul-174.5%
Simplified74.5%
Taylor expanded in x around 0 89.9%
*-commutative89.9%
rem-exp-log56.5%
exp-sum56.5%
sub-neg56.5%
exp-diff56.5%
rem-exp-log89.9%
associate-/l/89.9%
Simplified89.9%
Taylor expanded in b around 0 48.0%
Final simplification49.4%
(FPCore (x y z t a b) :precision binary64 (if (<= b 4.8e-160) (/ (* x (/ (- 1.0 b) y)) a) (/ (/ x (+ a (* a b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 4.8e-160) {
tmp = (x * ((1.0 - b) / y)) / a;
} else {
tmp = (x / (a + (a * b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= 4.8d-160) then
tmp = (x * ((1.0d0 - b) / y)) / a
else
tmp = (x / (a + (a * b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 4.8e-160) {
tmp = (x * ((1.0 - b) / y)) / a;
} else {
tmp = (x / (a + (a * b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 4.8e-160: tmp = (x * ((1.0 - b) / y)) / a else: tmp = (x / (a + (a * b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 4.8e-160) tmp = Float64(Float64(x * Float64(Float64(1.0 - b) / y)) / a); else tmp = Float64(Float64(x / Float64(a + Float64(a * b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 4.8e-160) tmp = (x * ((1.0 - b) / y)) / a; else tmp = (x / (a + (a * b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 4.8e-160], N[(N[(x * N[(N[(1.0 - b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(N[(x / N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 4.8 \cdot 10^{-160}:\\
\;\;\;\;\frac{x \cdot \frac{1 - b}{y}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a + a \cdot b}}{y}\\
\end{array}
\end{array}
if b < 4.79999999999999982e-160Initial program 97.5%
Taylor expanded in y around 0 81.1%
*-commutative81.1%
exp-diff74.5%
*-commutative74.5%
exp-to-pow75.3%
sub-neg75.3%
metadata-eval75.3%
Simplified75.3%
Taylor expanded in t around 0 64.1%
Taylor expanded in b around 0 47.8%
Taylor expanded in b around 0 44.7%
+-commutative44.7%
*-commutative44.7%
mul-1-neg44.7%
unsub-neg44.7%
*-commutative44.7%
*-commutative44.7%
div-sub47.2%
*-commutative47.2%
associate-/r*50.4%
div-sub50.4%
associate-*r/52.6%
*-commutative52.6%
cancel-sign-sub-inv52.6%
*-lft-identity52.6%
associate-*l/52.6%
mul-1-neg52.6%
distribute-rgt-in52.6%
mul-1-neg52.6%
sub-neg52.6%
div-sub52.6%
Simplified52.6%
if 4.79999999999999982e-160 < b Initial program 98.5%
Taylor expanded in y around 0 86.5%
*-commutative86.5%
exp-diff69.6%
*-commutative69.6%
exp-to-pow70.0%
sub-neg70.0%
metadata-eval70.0%
Simplified70.0%
Taylor expanded in t around 0 68.3%
Taylor expanded in b around 0 48.9%
Final simplification51.3%
(FPCore (x y z t a b) :precision binary64 (if (<= b -8.2e+61) (* (/ b y) (- x)) (/ (/ x a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -8.2e+61) {
tmp = (b / y) * -x;
} 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 <= (-8.2d+61)) then
tmp = (b / y) * -x
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 <= -8.2e+61) {
tmp = (b / y) * -x;
} else {
tmp = (x / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -8.2e+61: tmp = (b / y) * -x else: tmp = (x / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -8.2e+61) tmp = Float64(Float64(b / y) * Float64(-x)); 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 <= -8.2e+61) tmp = (b / y) * -x; else tmp = (x / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -8.2e+61], N[(N[(b / y), $MachinePrecision] * (-x)), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.2 \cdot 10^{+61}:\\
\;\;\;\;\frac{b}{y} \cdot \left(-x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if b < -8.19999999999999944e61Initial program 100.0%
associate-*l/94.0%
associate--l+94.0%
associate--l+94.0%
fma-def94.0%
sub-neg94.0%
metadata-eval94.0%
Simplified94.0%
Taylor expanded in b around inf 88.1%
neg-mul-188.1%
Simplified88.1%
Taylor expanded in b around 0 44.8%
+-commutative44.8%
mul-1-neg44.8%
unsub-neg44.8%
Simplified44.8%
Taylor expanded in b around inf 44.8%
mul-1-neg44.8%
associate-*l/52.2%
distribute-rgt-neg-in52.2%
Simplified52.2%
if -8.19999999999999944e61 < b Initial program 97.4%
Taylor expanded in y around 0 79.3%
*-commutative79.3%
exp-diff70.1%
*-commutative70.1%
exp-to-pow70.9%
sub-neg70.9%
metadata-eval70.9%
Simplified70.9%
Taylor expanded in t around 0 58.6%
Taylor expanded in b around 0 39.3%
associate-/l/40.4%
Simplified40.4%
Final simplification42.7%
(FPCore (x y z t a b) :precision binary64 (if (<= t 3.8e+29) (/ x (* y a)) (/ x y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 3.8e+29) {
tmp = x / (y * a);
} else {
tmp = x / 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 <= 3.8d+29) then
tmp = x / (y * a)
else
tmp = x / 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 <= 3.8e+29) {
tmp = x / (y * a);
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= 3.8e+29: tmp = x / (y * a) else: tmp = x / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= 3.8e+29) tmp = Float64(x / Float64(y * a)); else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= 3.8e+29) tmp = x / (y * a); else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, 3.8e+29], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.8 \cdot 10^{+29}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if t < 3.79999999999999971e29Initial program 97.4%
Taylor expanded in y around 0 81.2%
*-commutative81.2%
exp-diff74.3%
*-commutative74.3%
exp-to-pow75.1%
sub-neg75.1%
metadata-eval75.1%
Simplified75.1%
Taylor expanded in t around 0 70.3%
Taylor expanded in b around 0 42.4%
if 3.79999999999999971e29 < t Initial program 100.0%
associate-*l/90.2%
associate--l+90.2%
associate--l+90.2%
fma-def90.2%
sub-neg90.2%
metadata-eval90.2%
Simplified90.2%
Taylor expanded in b around inf 46.3%
neg-mul-146.3%
Simplified46.3%
Taylor expanded in b around 0 17.2%
Final simplification37.3%
(FPCore (x y z t a b) :precision binary64 (if (<= a 5.5e-57) (/ (/ x a) y) (/ x (* y a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 5.5e-57) {
tmp = (x / a) / y;
} else {
tmp = x / (y * a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= 5.5d-57) then
tmp = (x / a) / y
else
tmp = x / (y * a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 5.5e-57) {
tmp = (x / a) / y;
} else {
tmp = x / (y * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= 5.5e-57: tmp = (x / a) / y else: tmp = x / (y * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= 5.5e-57) tmp = Float64(Float64(x / a) / y); else tmp = Float64(x / Float64(y * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= 5.5e-57) tmp = (x / a) / y; else tmp = x / (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, 5.5e-57], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 5.5 \cdot 10^{-57}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\end{array}
\end{array}
if a < 5.50000000000000011e-57Initial program 99.0%
Taylor expanded in y around 0 85.1%
*-commutative85.1%
exp-diff78.5%
*-commutative78.5%
exp-to-pow79.3%
sub-neg79.3%
metadata-eval79.3%
Simplified79.3%
Taylor expanded in t around 0 68.0%
Taylor expanded in b around 0 38.3%
associate-/l/46.5%
Simplified46.5%
if 5.50000000000000011e-57 < a Initial program 97.3%
Taylor expanded in y around 0 81.9%
*-commutative81.9%
exp-diff69.7%
*-commutative69.7%
exp-to-pow70.2%
sub-neg70.2%
metadata-eval70.2%
Simplified70.2%
Taylor expanded in t around 0 64.2%
Taylor expanded in b around 0 34.2%
Final simplification38.6%
(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 97.9%
associate-*l/90.4%
associate--l+90.4%
associate--l+90.4%
fma-def90.4%
sub-neg90.4%
metadata-eval90.4%
Simplified90.4%
Taylor expanded in b around inf 44.5%
neg-mul-144.5%
Simplified44.5%
Taylor expanded in b around 0 16.3%
Final simplification16.3%
(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 2023199
(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))