
(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.7%
Final simplification98.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -4.1e+55) (not (<= y 3.65))) (/ (* x (pow z y)) y) (/ (* x (/ (pow a (+ t -1.0)) (exp b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4.1e+55) || !(y <= 3.65)) {
tmp = (x * pow(z, y)) / y;
} else {
tmp = (x * (pow(a, (t + -1.0)) / exp(b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-4.1d+55)) .or. (.not. (y <= 3.65d0))) then
tmp = (x * (z ** y)) / y
else
tmp = (x * ((a ** (t + (-1.0d0))) / exp(b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4.1e+55) || !(y <= 3.65)) {
tmp = (x * Math.pow(z, y)) / y;
} else {
tmp = (x * (Math.pow(a, (t + -1.0)) / Math.exp(b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -4.1e+55) or not (y <= 3.65): tmp = (x * math.pow(z, y)) / y else: tmp = (x * (math.pow(a, (t + -1.0)) / math.exp(b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -4.1e+55) || !(y <= 3.65)) tmp = Float64(Float64(x * (z ^ y)) / y); else tmp = Float64(Float64(x * Float64((a ^ Float64(t + -1.0)) / exp(b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -4.1e+55) || ~((y <= 3.65))) tmp = (x * (z ^ y)) / y; else tmp = (x * ((a ^ (t + -1.0)) / exp(b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -4.1e+55], N[Not[LessEqual[y, 3.65]], $MachinePrecision]], N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.1 \cdot 10^{+55} \lor \neg \left(y \leq 3.65\right):\\
\;\;\;\;\frac{x \cdot {z}^{y}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \frac{{a}^{\left(t + -1\right)}}{e^{b}}}{y}\\
\end{array}
\end{array}
if y < -4.09999999999999981e55 or 3.64999999999999991 < y Initial program 100.0%
*-commutative100.0%
associate-/l*89.8%
associate--l+89.8%
fma-define89.8%
sub-neg89.8%
metadata-eval89.8%
Simplified89.8%
Taylor expanded in y around inf 73.4%
associate-*r/82.7%
*-commutative82.7%
pow-to-exp82.7%
Applied egg-rr82.7%
if -4.09999999999999981e55 < y < 3.64999999999999991Initial program 97.7%
Taylor expanded in y around 0 96.4%
div-exp84.2%
exp-to-pow85.2%
sub-neg85.2%
metadata-eval85.2%
Simplified85.2%
Final simplification84.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -5.4e+18) (not (<= t 3.35))) (/ (* x (pow a t)) y) (* x (/ (pow z y) (* a (* y (exp b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -5.4e+18) || !(t <= 3.35)) {
tmp = (x * pow(a, t)) / y;
} else {
tmp = x * (pow(z, y) / (a * (y * exp(b))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-5.4d+18)) .or. (.not. (t <= 3.35d0))) then
tmp = (x * (a ** t)) / y
else
tmp = x * ((z ** y) / (a * (y * exp(b))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -5.4e+18) || !(t <= 3.35)) {
tmp = (x * Math.pow(a, t)) / y;
} else {
tmp = x * (Math.pow(z, y) / (a * (y * Math.exp(b))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -5.4e+18) or not (t <= 3.35): tmp = (x * math.pow(a, t)) / y else: tmp = x * (math.pow(z, y) / (a * (y * math.exp(b)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -5.4e+18) || !(t <= 3.35)) tmp = Float64(Float64(x * (a ^ t)) / y); else tmp = Float64(x * Float64((z ^ y) / Float64(a * Float64(y * exp(b))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -5.4e+18) || ~((t <= 3.35))) tmp = (x * (a ^ t)) / y; else tmp = x * ((z ^ y) / (a * (y * exp(b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -5.4e+18], N[Not[LessEqual[t, 3.35]], $MachinePrecision]], N[(N[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x * N[(N[Power[z, y], $MachinePrecision] / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.4 \cdot 10^{+18} \lor \neg \left(t \leq 3.35\right):\\
\;\;\;\;\frac{x \cdot {a}^{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{{z}^{y}}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
if t < -5.4e18 or 3.35000000000000009 < t Initial program 100.0%
*-commutative100.0%
associate-/l*89.5%
associate--l+89.5%
fma-define89.5%
sub-neg89.5%
metadata-eval89.5%
Simplified89.5%
Taylor expanded in t around inf 73.0%
*-commutative73.0%
Simplified73.0%
associate-*r/83.6%
exp-to-pow83.6%
Applied egg-rr83.6%
if -5.4e18 < t < 3.35000000000000009Initial program 97.6%
associate-/l*94.7%
associate--l+94.7%
exp-sum84.1%
associate-/l*82.0%
*-commutative82.0%
exp-to-pow82.0%
exp-diff80.6%
*-commutative80.6%
exp-to-pow81.3%
sub-neg81.3%
metadata-eval81.3%
Simplified81.3%
Taylor expanded in t around 0 82.7%
Final simplification83.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (pow a t)) y)) (t_2 (/ (* x (pow z y)) y)))
(if (<= y -2.3e+105)
t_2
(if (<= y -1.2e-41)
t_1
(if (<= y 1.02e-235)
(/ x (* y (exp b)))
(if (<= y 5.4e-136)
(/
(/
x
(*
a
(+ 1.0 (* b (+ 1.0 (* b (+ 0.5 (* b 0.16666666666666666))))))))
y)
(if (<= y 1.5) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * pow(a, t)) / y;
double t_2 = (x * pow(z, y)) / y;
double tmp;
if (y <= -2.3e+105) {
tmp = t_2;
} else if (y <= -1.2e-41) {
tmp = t_1;
} else if (y <= 1.02e-235) {
tmp = x / (y * exp(b));
} else if (y <= 5.4e-136) {
tmp = (x / (a * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))) / y;
} else if (y <= 1.5) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x * (a ** t)) / y
t_2 = (x * (z ** y)) / y
if (y <= (-2.3d+105)) then
tmp = t_2
else if (y <= (-1.2d-41)) then
tmp = t_1
else if (y <= 1.02d-235) then
tmp = x / (y * exp(b))
else if (y <= 5.4d-136) then
tmp = (x / (a * (1.0d0 + (b * (1.0d0 + (b * (0.5d0 + (b * 0.16666666666666666d0)))))))) / y
else if (y <= 1.5d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * Math.pow(a, t)) / y;
double t_2 = (x * Math.pow(z, y)) / y;
double tmp;
if (y <= -2.3e+105) {
tmp = t_2;
} else if (y <= -1.2e-41) {
tmp = t_1;
} else if (y <= 1.02e-235) {
tmp = x / (y * Math.exp(b));
} else if (y <= 5.4e-136) {
tmp = (x / (a * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))) / y;
} else if (y <= 1.5) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * math.pow(a, t)) / y t_2 = (x * math.pow(z, y)) / y tmp = 0 if y <= -2.3e+105: tmp = t_2 elif y <= -1.2e-41: tmp = t_1 elif y <= 1.02e-235: tmp = x / (y * math.exp(b)) elif y <= 5.4e-136: tmp = (x / (a * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))) / y elif y <= 1.5: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * (a ^ t)) / y) t_2 = Float64(Float64(x * (z ^ y)) / y) tmp = 0.0 if (y <= -2.3e+105) tmp = t_2; elseif (y <= -1.2e-41) tmp = t_1; elseif (y <= 1.02e-235) tmp = Float64(x / Float64(y * exp(b))); elseif (y <= 5.4e-136) tmp = Float64(Float64(x / Float64(a * Float64(1.0 + Float64(b * Float64(1.0 + Float64(b * Float64(0.5 + Float64(b * 0.16666666666666666)))))))) / y); elseif (y <= 1.5) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x * (a ^ t)) / y; t_2 = (x * (z ^ y)) / y; tmp = 0.0; if (y <= -2.3e+105) tmp = t_2; elseif (y <= -1.2e-41) tmp = t_1; elseif (y <= 1.02e-235) tmp = x / (y * exp(b)); elseif (y <= 5.4e-136) tmp = (x / (a * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))) / y; elseif (y <= 1.5) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -2.3e+105], t$95$2, If[LessEqual[y, -1.2e-41], t$95$1, If[LessEqual[y, 1.02e-235], N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.4e-136], N[(N[(x / N[(a * N[(1.0 + N[(b * N[(1.0 + N[(b * N[(0.5 + N[(b * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 1.5], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot {a}^{t}}{y}\\
t_2 := \frac{x \cdot {z}^{y}}{y}\\
\mathbf{if}\;y \leq -2.3 \cdot 10^{+105}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -1.2 \cdot 10^{-41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.02 \cdot 10^{-235}:\\
\;\;\;\;\frac{x}{y \cdot e^{b}}\\
\mathbf{elif}\;y \leq 5.4 \cdot 10^{-136}:\\
\;\;\;\;\frac{\frac{x}{a \cdot \left(1 + b \cdot \left(1 + b \cdot \left(0.5 + b \cdot 0.16666666666666666\right)\right)\right)}}{y}\\
\mathbf{elif}\;y \leq 1.5:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -2.2999999999999998e105 or 1.5 < y Initial program 100.0%
*-commutative100.0%
associate-/l*89.0%
associate--l+89.0%
fma-define89.0%
sub-neg89.0%
metadata-eval89.0%
Simplified89.0%
Taylor expanded in y around inf 75.2%
associate-*r/85.2%
*-commutative85.2%
pow-to-exp85.2%
Applied egg-rr85.2%
if -2.2999999999999998e105 < y < -1.20000000000000011e-41 or 5.3999999999999997e-136 < y < 1.5Initial program 99.6%
*-commutative99.6%
associate-/l*96.2%
associate--l+96.2%
fma-define96.2%
sub-neg96.2%
metadata-eval96.2%
Simplified96.2%
Taylor expanded in t around inf 64.8%
*-commutative64.8%
Simplified64.8%
associate-*r/66.6%
exp-to-pow66.6%
Applied egg-rr66.6%
if -1.20000000000000011e-41 < y < 1.02e-235Initial program 96.5%
*-commutative96.5%
associate-/l*80.5%
associate--l+80.5%
fma-define80.5%
sub-neg80.5%
metadata-eval80.5%
Simplified80.5%
Taylor expanded in b around inf 58.7%
neg-mul-158.7%
Simplified58.7%
exp-neg58.7%
frac-times70.7%
*-un-lft-identity70.7%
Applied egg-rr70.7%
if 1.02e-235 < y < 5.3999999999999997e-136Initial program 98.0%
Taylor expanded in y around 0 98.0%
div-exp78.7%
exp-to-pow80.7%
sub-neg80.7%
metadata-eval80.7%
Simplified80.7%
Taylor expanded in t around 0 81.1%
Taylor expanded in b around 0 84.9%
*-commutative84.9%
Simplified84.9%
Final simplification76.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (pow z y)) y)))
(if (<= y -2.3e+105)
t_1
(if (<= y -4.2e-32)
(/ (* x (pow a t)) y)
(if (<= y 2.9e-6) (/ (/ 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)) / y;
double tmp;
if (y <= -2.3e+105) {
tmp = t_1;
} else if (y <= -4.2e-32) {
tmp = (x * pow(a, t)) / y;
} else if (y <= 2.9e-6) {
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)) / y
if (y <= (-2.3d+105)) then
tmp = t_1
else if (y <= (-4.2d-32)) then
tmp = (x * (a ** t)) / y
else if (y <= 2.9d-6) 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)) / y;
double tmp;
if (y <= -2.3e+105) {
tmp = t_1;
} else if (y <= -4.2e-32) {
tmp = (x * Math.pow(a, t)) / y;
} else if (y <= 2.9e-6) {
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)) / y tmp = 0 if y <= -2.3e+105: tmp = t_1 elif y <= -4.2e-32: tmp = (x * math.pow(a, t)) / y elif y <= 2.9e-6: 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(x * (z ^ y)) / y) tmp = 0.0 if (y <= -2.3e+105) tmp = t_1; elseif (y <= -4.2e-32) tmp = Float64(Float64(x * (a ^ t)) / y); elseif (y <= 2.9e-6) 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)) / y; tmp = 0.0; if (y <= -2.3e+105) tmp = t_1; elseif (y <= -4.2e-32) tmp = (x * (a ^ t)) / y; elseif (y <= 2.9e-6) 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[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -2.3e+105], t$95$1, If[LessEqual[y, -4.2e-32], N[(N[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 2.9e-6], N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot {z}^{y}}{y}\\
\mathbf{if}\;y \leq -2.3 \cdot 10^{+105}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -4.2 \cdot 10^{-32}:\\
\;\;\;\;\frac{x \cdot {a}^{t}}{y}\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{-6}:\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.2999999999999998e105 or 2.9000000000000002e-6 < y Initial program 100.0%
*-commutative100.0%
associate-/l*89.2%
associate--l+89.2%
fma-define89.2%
sub-neg89.2%
metadata-eval89.2%
Simplified89.2%
Taylor expanded in y around inf 73.8%
associate-*r/83.6%
*-commutative83.6%
pow-to-exp83.6%
Applied egg-rr83.6%
if -2.2999999999999998e105 < y < -4.1999999999999998e-32Initial program 100.0%
*-commutative100.0%
associate-/l*100.0%
associate--l+100.0%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in t around inf 72.4%
*-commutative72.4%
Simplified72.4%
associate-*r/72.4%
exp-to-pow72.4%
Applied egg-rr72.4%
if -4.1999999999999998e-32 < y < 2.9000000000000002e-6Initial program 97.3%
Taylor expanded in y around 0 97.3%
div-exp85.4%
exp-to-pow86.6%
sub-neg86.6%
metadata-eval86.6%
Simplified86.6%
Taylor expanded in t around 0 81.5%
Final simplification81.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -0.25)
(* x (/ (+ 1.0 (* b (+ 1.0 (* b 0.5)))) y))
(if (or (<= b 850.0) (not (<= b 3.6e+75)))
(/
(/ x (* a (+ 1.0 (* b (+ 1.0 (* b (+ 0.5 (* b 0.16666666666666666))))))))
y)
(* x (/ (exp b) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -0.25) {
tmp = x * ((1.0 + (b * (1.0 + (b * 0.5)))) / y);
} else if ((b <= 850.0) || !(b <= 3.6e+75)) {
tmp = (x / (a * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))) / 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 (b <= (-0.25d0)) then
tmp = x * ((1.0d0 + (b * (1.0d0 + (b * 0.5d0)))) / y)
else if ((b <= 850.0d0) .or. (.not. (b <= 3.6d+75))) then
tmp = (x / (a * (1.0d0 + (b * (1.0d0 + (b * (0.5d0 + (b * 0.16666666666666666d0)))))))) / 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 (b <= -0.25) {
tmp = x * ((1.0 + (b * (1.0 + (b * 0.5)))) / y);
} else if ((b <= 850.0) || !(b <= 3.6e+75)) {
tmp = (x / (a * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))) / y;
} else {
tmp = x * (Math.exp(b) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -0.25: tmp = x * ((1.0 + (b * (1.0 + (b * 0.5)))) / y) elif (b <= 850.0) or not (b <= 3.6e+75): tmp = (x / (a * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))) / y else: tmp = x * (math.exp(b) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -0.25) tmp = Float64(x * Float64(Float64(1.0 + Float64(b * Float64(1.0 + Float64(b * 0.5)))) / y)); elseif ((b <= 850.0) || !(b <= 3.6e+75)) tmp = Float64(Float64(x / Float64(a * Float64(1.0 + Float64(b * Float64(1.0 + Float64(b * Float64(0.5 + Float64(b * 0.16666666666666666)))))))) / y); else tmp = Float64(x * Float64(exp(b) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -0.25) tmp = x * ((1.0 + (b * (1.0 + (b * 0.5)))) / y); elseif ((b <= 850.0) || ~((b <= 3.6e+75))) tmp = (x / (a * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))) / y; else tmp = x * (exp(b) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -0.25], N[(x * N[(N[(1.0 + N[(b * N[(1.0 + N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[b, 850.0], N[Not[LessEqual[b, 3.6e+75]], $MachinePrecision]], N[(N[(x / N[(a * N[(1.0 + N[(b * N[(1.0 + N[(b * N[(0.5 + N[(b * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x * N[(N[Exp[b], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -0.25:\\
\;\;\;\;x \cdot \frac{1 + b \cdot \left(1 + b \cdot 0.5\right)}{y}\\
\mathbf{elif}\;b \leq 850 \lor \neg \left(b \leq 3.6 \cdot 10^{+75}\right):\\
\;\;\;\;\frac{\frac{x}{a \cdot \left(1 + b \cdot \left(1 + b \cdot \left(0.5 + b \cdot 0.16666666666666666\right)\right)\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{e^{b}}{y}\\
\end{array}
\end{array}
if b < -0.25Initial program 100.0%
*-commutative100.0%
associate-/l*94.5%
associate--l+94.5%
fma-define94.5%
sub-neg94.5%
metadata-eval94.5%
Simplified94.5%
Taylor expanded in b around inf 77.0%
neg-mul-177.0%
Simplified77.0%
clear-num77.0%
un-div-inv77.0%
add-sqr-sqrt77.0%
sqrt-unprod77.0%
sqr-neg77.0%
sqrt-unprod0.0%
add-sqr-sqrt17.6%
Applied egg-rr17.6%
associate-/r/20.5%
Simplified20.5%
Taylor expanded in b around 0 62.8%
if -0.25 < b < 850 or 3.6e75 < b Initial program 98.0%
Taylor expanded in y around 0 79.5%
div-exp73.5%
exp-to-pow74.4%
sub-neg74.4%
metadata-eval74.4%
Simplified74.4%
Taylor expanded in t around 0 58.0%
Taylor expanded in b around 0 57.4%
*-commutative57.4%
Simplified57.4%
if 850 < b < 3.6e75Initial program 100.0%
*-commutative100.0%
associate-/l*66.7%
associate--l+66.7%
fma-define66.7%
sub-neg66.7%
metadata-eval66.7%
Simplified66.7%
Taylor expanded in b around inf 27.6%
neg-mul-127.6%
Simplified27.6%
clear-num27.6%
un-div-inv27.6%
add-sqr-sqrt0.0%
sqrt-unprod40.6%
sqr-neg40.6%
sqrt-unprod40.6%
add-sqr-sqrt40.6%
Applied egg-rr40.6%
associate-/r/60.6%
Simplified60.6%
Final simplification59.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -8.6e+17) (not (<= t 3.65))) (/ (* x (pow a t)) y) (/ x (* (exp b) (* y a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -8.6e+17) || !(t <= 3.65)) {
tmp = (x * pow(a, t)) / y;
} else {
tmp = x / (exp(b) * (y * a));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-8.6d+17)) .or. (.not. (t <= 3.65d0))) then
tmp = (x * (a ** t)) / y
else
tmp = x / (exp(b) * (y * a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -8.6e+17) || !(t <= 3.65)) {
tmp = (x * Math.pow(a, t)) / y;
} else {
tmp = x / (Math.exp(b) * (y * a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -8.6e+17) or not (t <= 3.65): tmp = (x * math.pow(a, t)) / y else: tmp = x / (math.exp(b) * (y * a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -8.6e+17) || !(t <= 3.65)) tmp = Float64(Float64(x * (a ^ t)) / y); else tmp = Float64(x / Float64(exp(b) * Float64(y * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -8.6e+17) || ~((t <= 3.65))) tmp = (x * (a ^ t)) / y; else tmp = x / (exp(b) * (y * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -8.6e+17], N[Not[LessEqual[t, 3.65]], $MachinePrecision]], N[(N[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(N[Exp[b], $MachinePrecision] * N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.6 \cdot 10^{+17} \lor \neg \left(t \leq 3.65\right):\\
\;\;\;\;\frac{x \cdot {a}^{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{e^{b} \cdot \left(y \cdot a\right)}\\
\end{array}
\end{array}
if t < -8.6e17 or 3.64999999999999991 < t Initial program 100.0%
*-commutative100.0%
associate-/l*89.5%
associate--l+89.5%
fma-define89.5%
sub-neg89.5%
metadata-eval89.5%
Simplified89.5%
Taylor expanded in t around inf 73.0%
*-commutative73.0%
Simplified73.0%
associate-*r/83.6%
exp-to-pow83.6%
Applied egg-rr83.6%
if -8.6e17 < t < 3.64999999999999991Initial program 97.6%
Taylor expanded in y around 0 75.1%
div-exp73.7%
exp-to-pow74.7%
sub-neg74.7%
metadata-eval74.7%
Simplified74.7%
Taylor expanded in t around 0 72.7%
associate-*r*65.6%
*-commutative65.6%
Simplified65.6%
Final simplification73.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -3.35e+15) (not (<= t 5.0))) (/ (* x (pow a t)) y) (/ x (* y (exp b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -3.35e+15) || !(t <= 5.0)) {
tmp = (x * pow(a, t)) / y;
} else {
tmp = x / (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 <= (-3.35d+15)) .or. (.not. (t <= 5.0d0))) then
tmp = (x * (a ** t)) / y
else
tmp = x / (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 <= -3.35e+15) || !(t <= 5.0)) {
tmp = (x * Math.pow(a, t)) / y;
} else {
tmp = x / (y * Math.exp(b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -3.35e+15) or not (t <= 5.0): tmp = (x * math.pow(a, t)) / y else: tmp = x / (y * math.exp(b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -3.35e+15) || !(t <= 5.0)) tmp = Float64(Float64(x * (a ^ t)) / y); else tmp = Float64(x / Float64(y * exp(b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -3.35e+15) || ~((t <= 5.0))) tmp = (x * (a ^ t)) / y; else tmp = x / (y * exp(b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -3.35e+15], N[Not[LessEqual[t, 5.0]], $MachinePrecision]], N[(N[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.35 \cdot 10^{+15} \lor \neg \left(t \leq 5\right):\\
\;\;\;\;\frac{x \cdot {a}^{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot e^{b}}\\
\end{array}
\end{array}
if t < -3.35e15 or 5 < t Initial program 100.0%
*-commutative100.0%
associate-/l*89.6%
associate--l+89.6%
fma-define89.6%
sub-neg89.6%
metadata-eval89.6%
Simplified89.6%
Taylor expanded in t around inf 73.3%
*-commutative73.3%
Simplified73.3%
associate-*r/83.7%
exp-to-pow83.7%
Applied egg-rr83.7%
if -3.35e15 < t < 5Initial program 97.6%
*-commutative97.6%
associate-/l*85.6%
associate--l+85.6%
fma-define85.6%
sub-neg85.6%
metadata-eval85.6%
Simplified85.6%
Taylor expanded in b around inf 48.6%
neg-mul-148.6%
Simplified48.6%
exp-neg48.6%
frac-times55.7%
*-un-lft-identity55.7%
Applied egg-rr55.7%
Final simplification68.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -0.092) (not (<= b 2150000000000.0))) (/ x (* y (exp b))) (/ (/ x (* a (+ 1.0 (* b (+ 1.0 (* b 0.5)))))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -0.092) || !(b <= 2150000000000.0)) {
tmp = x / (y * exp(b));
} else {
tmp = (x / (a * (1.0 + (b * (1.0 + (b * 0.5)))))) / 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 <= (-0.092d0)) .or. (.not. (b <= 2150000000000.0d0))) then
tmp = x / (y * exp(b))
else
tmp = (x / (a * (1.0d0 + (b * (1.0d0 + (b * 0.5d0)))))) / 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 <= -0.092) || !(b <= 2150000000000.0)) {
tmp = x / (y * Math.exp(b));
} else {
tmp = (x / (a * (1.0 + (b * (1.0 + (b * 0.5)))))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -0.092) or not (b <= 2150000000000.0): tmp = x / (y * math.exp(b)) else: tmp = (x / (a * (1.0 + (b * (1.0 + (b * 0.5)))))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -0.092) || !(b <= 2150000000000.0)) tmp = Float64(x / Float64(y * exp(b))); else tmp = Float64(Float64(x / Float64(a * Float64(1.0 + Float64(b * Float64(1.0 + Float64(b * 0.5)))))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -0.092) || ~((b <= 2150000000000.0))) tmp = x / (y * exp(b)); else tmp = (x / (a * (1.0 + (b * (1.0 + (b * 0.5)))))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -0.092], N[Not[LessEqual[b, 2150000000000.0]], $MachinePrecision]], N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(a * N[(1.0 + N[(b * N[(1.0 + N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -0.092 \lor \neg \left(b \leq 2150000000000\right):\\
\;\;\;\;\frac{x}{y \cdot e^{b}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a \cdot \left(1 + b \cdot \left(1 + b \cdot 0.5\right)\right)}}{y}\\
\end{array}
\end{array}
if b < -0.091999999999999998 or 2.15e12 < b Initial program 100.0%
*-commutative100.0%
associate-/l*84.8%
associate--l+84.8%
fma-define84.8%
sub-neg84.8%
metadata-eval84.8%
Simplified84.8%
Taylor expanded in b around inf 67.8%
neg-mul-167.8%
Simplified67.8%
exp-neg67.8%
frac-times78.4%
*-un-lft-identity78.4%
Applied egg-rr78.4%
if -0.091999999999999998 < b < 2.15e12Initial program 97.2%
Taylor expanded in y around 0 73.8%
div-exp73.0%
exp-to-pow74.2%
sub-neg74.2%
metadata-eval74.2%
Simplified74.2%
Taylor expanded in t around 0 47.0%
Taylor expanded in b around 0 47.0%
Final simplification63.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -0.225)
(* x (/ (+ 1.0 (* b (+ 1.0 (* b 0.5)))) y))
(/
(/ x (* a (+ 1.0 (* b (+ 1.0 (* b (+ 0.5 (* b 0.16666666666666666))))))))
y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -0.225) {
tmp = x * ((1.0 + (b * (1.0 + (b * 0.5)))) / y);
} else {
tmp = (x / (a * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))) / 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 <= (-0.225d0)) then
tmp = x * ((1.0d0 + (b * (1.0d0 + (b * 0.5d0)))) / y)
else
tmp = (x / (a * (1.0d0 + (b * (1.0d0 + (b * (0.5d0 + (b * 0.16666666666666666d0)))))))) / 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 <= -0.225) {
tmp = x * ((1.0 + (b * (1.0 + (b * 0.5)))) / y);
} else {
tmp = (x / (a * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -0.225: tmp = x * ((1.0 + (b * (1.0 + (b * 0.5)))) / y) else: tmp = (x / (a * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -0.225) tmp = Float64(x * Float64(Float64(1.0 + Float64(b * Float64(1.0 + Float64(b * 0.5)))) / y)); else tmp = Float64(Float64(x / Float64(a * Float64(1.0 + Float64(b * Float64(1.0 + Float64(b * Float64(0.5 + Float64(b * 0.16666666666666666)))))))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -0.225) tmp = x * ((1.0 + (b * (1.0 + (b * 0.5)))) / y); else tmp = (x / (a * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -0.225], N[(x * N[(N[(1.0 + N[(b * N[(1.0 + N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(a * N[(1.0 + N[(b * N[(1.0 + N[(b * N[(0.5 + N[(b * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -0.225:\\
\;\;\;\;x \cdot \frac{1 + b \cdot \left(1 + b \cdot 0.5\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a \cdot \left(1 + b \cdot \left(1 + b \cdot \left(0.5 + b \cdot 0.16666666666666666\right)\right)\right)}}{y}\\
\end{array}
\end{array}
if b < -0.225000000000000006Initial program 100.0%
*-commutative100.0%
associate-/l*94.5%
associate--l+94.5%
fma-define94.5%
sub-neg94.5%
metadata-eval94.5%
Simplified94.5%
Taylor expanded in b around inf 77.0%
neg-mul-177.0%
Simplified77.0%
clear-num77.0%
un-div-inv77.0%
add-sqr-sqrt77.0%
sqrt-unprod77.0%
sqr-neg77.0%
sqrt-unprod0.0%
add-sqr-sqrt17.6%
Applied egg-rr17.6%
associate-/r/20.5%
Simplified20.5%
Taylor expanded in b around 0 62.8%
if -0.225000000000000006 < b Initial program 98.1%
Taylor expanded in y around 0 78.0%
div-exp70.8%
exp-to-pow71.7%
sub-neg71.7%
metadata-eval71.7%
Simplified71.7%
Taylor expanded in t around 0 56.6%
Taylor expanded in b around 0 52.8%
*-commutative52.8%
Simplified52.8%
Final simplification55.7%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (+ 1.0 (* b (+ 1.0 (* b 0.5)))))) (if (<= b -0.24) (* x (/ t_1 y)) (/ (/ x (* a t_1)) y))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 + (b * (1.0 + (b * 0.5)));
double tmp;
if (b <= -0.24) {
tmp = x * (t_1 / y);
} else {
tmp = (x / (a * t_1)) / 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 = 1.0d0 + (b * (1.0d0 + (b * 0.5d0)))
if (b <= (-0.24d0)) then
tmp = x * (t_1 / y)
else
tmp = (x / (a * t_1)) / 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 = 1.0 + (b * (1.0 + (b * 0.5)));
double tmp;
if (b <= -0.24) {
tmp = x * (t_1 / y);
} else {
tmp = (x / (a * t_1)) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 1.0 + (b * (1.0 + (b * 0.5))) tmp = 0 if b <= -0.24: tmp = x * (t_1 / y) else: tmp = (x / (a * t_1)) / y return tmp
function code(x, y, z, t, a, b) t_1 = Float64(1.0 + Float64(b * Float64(1.0 + Float64(b * 0.5)))) tmp = 0.0 if (b <= -0.24) tmp = Float64(x * Float64(t_1 / y)); else tmp = Float64(Float64(x / Float64(a * t_1)) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 1.0 + (b * (1.0 + (b * 0.5))); tmp = 0.0; if (b <= -0.24) tmp = x * (t_1 / y); else tmp = (x / (a * t_1)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 + N[(b * N[(1.0 + N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -0.24], N[(x * N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(a * t$95$1), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 + b \cdot \left(1 + b \cdot 0.5\right)\\
\mathbf{if}\;b \leq -0.24:\\
\;\;\;\;x \cdot \frac{t\_1}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a \cdot t\_1}}{y}\\
\end{array}
\end{array}
if b < -0.23999999999999999Initial program 100.0%
*-commutative100.0%
associate-/l*94.5%
associate--l+94.5%
fma-define94.5%
sub-neg94.5%
metadata-eval94.5%
Simplified94.5%
Taylor expanded in b around inf 77.0%
neg-mul-177.0%
Simplified77.0%
clear-num77.0%
un-div-inv77.0%
add-sqr-sqrt77.0%
sqrt-unprod77.0%
sqr-neg77.0%
sqrt-unprod0.0%
add-sqr-sqrt17.6%
Applied egg-rr17.6%
associate-/r/20.5%
Simplified20.5%
Taylor expanded in b around 0 62.8%
if -0.23999999999999999 < b Initial program 98.1%
Taylor expanded in y around 0 78.0%
div-exp70.8%
exp-to-pow71.7%
sub-neg71.7%
metadata-eval71.7%
Simplified71.7%
Taylor expanded in t around 0 56.6%
Taylor expanded in b around 0 51.2%
Final simplification54.5%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.15e+206) (* (/ x y) (- 1.0 b)) (if (<= b -0.19) (/ x (* 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.15e+206) {
tmp = (x / y) * (1.0 - b);
} else if (b <= -0.19) {
tmp = x / (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.15d+206)) then
tmp = (x / y) * (1.0d0 - b)
else if (b <= (-0.19d0)) then
tmp = x / (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.15e+206) {
tmp = (x / y) * (1.0 - b);
} else if (b <= -0.19) {
tmp = x / (y * a);
} else {
tmp = (x / (a + (a * b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.15e+206: tmp = (x / y) * (1.0 - b) elif b <= -0.19: tmp = x / (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.15e+206) tmp = Float64(Float64(x / y) * Float64(1.0 - b)); elseif (b <= -0.19) tmp = Float64(x / Float64(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.15e+206) tmp = (x / y) * (1.0 - b); elseif (b <= -0.19) tmp = x / (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.15e+206], N[(N[(x / y), $MachinePrecision] * N[(1.0 - b), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -0.19], N[(x / N[(y * a), $MachinePrecision]), $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.15 \cdot 10^{+206}:\\
\;\;\;\;\frac{x}{y} \cdot \left(1 - b\right)\\
\mathbf{elif}\;b \leq -0.19:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a + a \cdot b}}{y}\\
\end{array}
\end{array}
if b < -1.15000000000000008e206Initial program 100.0%
*-commutative100.0%
associate-/l*96.0%
associate--l+96.0%
fma-define96.0%
sub-neg96.0%
metadata-eval96.0%
Simplified96.0%
Taylor expanded in b around inf 80.2%
neg-mul-180.2%
Simplified80.2%
Taylor expanded in b around 0 45.8%
neg-mul-145.8%
unsub-neg45.8%
Simplified45.8%
if -1.15000000000000008e206 < b < -0.19Initial program 100.0%
Taylor expanded in y around 0 93.9%
div-exp71.0%
exp-to-pow71.0%
sub-neg71.0%
metadata-eval71.0%
Simplified71.0%
Taylor expanded in t around 0 77.5%
Taylor expanded in b around 0 33.4%
if -0.19 < b Initial program 98.1%
Taylor expanded in y around 0 78.0%
div-exp70.8%
exp-to-pow71.7%
sub-neg71.7%
metadata-eval71.7%
Simplified71.7%
Taylor expanded in t around 0 56.6%
Taylor expanded in b around 0 41.7%
Final simplification40.5%
(FPCore (x y z t a b) :precision binary64 (if (<= b -0.25) (* x (/ (+ 1.0 (* b (+ 1.0 (* b 0.5)))) y)) (/ (/ x (+ a (* a b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -0.25) {
tmp = x * ((1.0 + (b * (1.0 + (b * 0.5)))) / y);
} 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 <= (-0.25d0)) then
tmp = x * ((1.0d0 + (b * (1.0d0 + (b * 0.5d0)))) / y)
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 <= -0.25) {
tmp = x * ((1.0 + (b * (1.0 + (b * 0.5)))) / y);
} else {
tmp = (x / (a + (a * b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -0.25: tmp = x * ((1.0 + (b * (1.0 + (b * 0.5)))) / y) else: tmp = (x / (a + (a * b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -0.25) tmp = Float64(x * Float64(Float64(1.0 + Float64(b * Float64(1.0 + Float64(b * 0.5)))) / y)); 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 <= -0.25) tmp = x * ((1.0 + (b * (1.0 + (b * 0.5)))) / y); else tmp = (x / (a + (a * b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -0.25], N[(x * N[(N[(1.0 + N[(b * N[(1.0 + N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -0.25:\\
\;\;\;\;x \cdot \frac{1 + b \cdot \left(1 + b \cdot 0.5\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a + a \cdot b}}{y}\\
\end{array}
\end{array}
if b < -0.25Initial program 100.0%
*-commutative100.0%
associate-/l*94.5%
associate--l+94.5%
fma-define94.5%
sub-neg94.5%
metadata-eval94.5%
Simplified94.5%
Taylor expanded in b around inf 77.0%
neg-mul-177.0%
Simplified77.0%
clear-num77.0%
un-div-inv77.0%
add-sqr-sqrt77.0%
sqrt-unprod77.0%
sqr-neg77.0%
sqrt-unprod0.0%
add-sqr-sqrt17.6%
Applied egg-rr17.6%
associate-/r/20.5%
Simplified20.5%
Taylor expanded in b around 0 62.8%
if -0.25 < b Initial program 98.1%
Taylor expanded in y around 0 78.0%
div-exp70.8%
exp-to-pow71.7%
sub-neg71.7%
metadata-eval71.7%
Simplified71.7%
Taylor expanded in t around 0 56.6%
Taylor expanded in b around 0 41.7%
Final simplification47.7%
(FPCore (x y z t a b) :precision binary64 (if (<= b -0.155) (* x (/ (+ 1.0 (* b (* b 0.5))) y)) (/ (/ x (+ a (* a b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -0.155) {
tmp = x * ((1.0 + (b * (b * 0.5))) / y);
} 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 <= (-0.155d0)) then
tmp = x * ((1.0d0 + (b * (b * 0.5d0))) / y)
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 <= -0.155) {
tmp = x * ((1.0 + (b * (b * 0.5))) / y);
} else {
tmp = (x / (a + (a * b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -0.155: tmp = x * ((1.0 + (b * (b * 0.5))) / y) else: tmp = (x / (a + (a * b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -0.155) tmp = Float64(x * Float64(Float64(1.0 + Float64(b * Float64(b * 0.5))) / y)); 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 <= -0.155) tmp = x * ((1.0 + (b * (b * 0.5))) / y); else tmp = (x / (a + (a * b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -0.155], N[(x * N[(N[(1.0 + N[(b * N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -0.155:\\
\;\;\;\;x \cdot \frac{1 + b \cdot \left(b \cdot 0.5\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a + a \cdot b}}{y}\\
\end{array}
\end{array}
if b < -0.154999999999999999Initial program 100.0%
*-commutative100.0%
associate-/l*94.5%
associate--l+94.5%
fma-define94.5%
sub-neg94.5%
metadata-eval94.5%
Simplified94.5%
Taylor expanded in b around inf 77.0%
neg-mul-177.0%
Simplified77.0%
clear-num77.0%
un-div-inv77.0%
add-sqr-sqrt77.0%
sqrt-unprod77.0%
sqr-neg77.0%
sqrt-unprod0.0%
add-sqr-sqrt17.6%
Applied egg-rr17.6%
associate-/r/20.5%
Simplified20.5%
Taylor expanded in b around 0 62.8%
Taylor expanded in b around inf 62.8%
if -0.154999999999999999 < b Initial program 98.1%
Taylor expanded in y around 0 78.0%
div-exp70.8%
exp-to-pow71.7%
sub-neg71.7%
metadata-eval71.7%
Simplified71.7%
Taylor expanded in t around 0 56.6%
Taylor expanded in b around 0 41.7%
Final simplification47.7%
(FPCore (x y z t a b) :precision binary64 (if (<= b -0.25) (* (+ 1.0 (* b (* b 0.5))) (/ x y)) (/ (/ x (+ a (* a b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -0.25) {
tmp = (1.0 + (b * (b * 0.5))) * (x / y);
} 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 <= (-0.25d0)) then
tmp = (1.0d0 + (b * (b * 0.5d0))) * (x / y)
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 <= -0.25) {
tmp = (1.0 + (b * (b * 0.5))) * (x / y);
} else {
tmp = (x / (a + (a * b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -0.25: tmp = (1.0 + (b * (b * 0.5))) * (x / y) else: tmp = (x / (a + (a * b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -0.25) tmp = Float64(Float64(1.0 + Float64(b * Float64(b * 0.5))) * Float64(x / y)); 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 <= -0.25) tmp = (1.0 + (b * (b * 0.5))) * (x / y); else tmp = (x / (a + (a * b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -0.25], N[(N[(1.0 + N[(b * N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -0.25:\\
\;\;\;\;\left(1 + b \cdot \left(b \cdot 0.5\right)\right) \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a + a \cdot b}}{y}\\
\end{array}
\end{array}
if b < -0.25Initial program 100.0%
*-commutative100.0%
associate-/l*94.5%
associate--l+94.5%
fma-define94.5%
sub-neg94.5%
metadata-eval94.5%
Simplified94.5%
Taylor expanded in b around inf 77.0%
neg-mul-177.0%
Simplified77.0%
Taylor expanded in b around 0 56.2%
Taylor expanded in b around inf 56.2%
*-commutative56.2%
Simplified56.2%
if -0.25 < b Initial program 98.1%
Taylor expanded in y around 0 78.0%
div-exp70.8%
exp-to-pow71.7%
sub-neg71.7%
metadata-eval71.7%
Simplified71.7%
Taylor expanded in t around 0 56.6%
Taylor expanded in b around 0 41.7%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1e+17) (* b (/ x y)) (if (<= y 2.3e-66) (/ x y) (* x (/ b y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1e+17) {
tmp = b * (x / y);
} else if (y <= 2.3e-66) {
tmp = x / y;
} else {
tmp = x * (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 <= (-1d+17)) then
tmp = b * (x / y)
else if (y <= 2.3d-66) then
tmp = x / y
else
tmp = x * (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 <= -1e+17) {
tmp = b * (x / y);
} else if (y <= 2.3e-66) {
tmp = x / y;
} else {
tmp = x * (b / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1e+17: tmp = b * (x / y) elif y <= 2.3e-66: tmp = x / y else: tmp = x * (b / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1e+17) tmp = Float64(b * Float64(x / y)); elseif (y <= 2.3e-66) tmp = Float64(x / y); else tmp = Float64(x * Float64(b / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1e+17) tmp = b * (x / y); elseif (y <= 2.3e-66) tmp = x / y; else tmp = x * (b / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1e+17], N[(b * N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.3e-66], N[(x / y), $MachinePrecision], N[(x * N[(b / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+17}:\\
\;\;\;\;b \cdot \frac{x}{y}\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{-66}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{b}{y}\\
\end{array}
\end{array}
if y < -1e17Initial program 100.0%
*-commutative100.0%
associate-/l*89.7%
associate--l+89.7%
fma-define89.7%
sub-neg89.7%
metadata-eval89.7%
Simplified89.7%
Taylor expanded in b around inf 33.0%
neg-mul-133.0%
Simplified33.0%
clear-num33.0%
un-div-inv33.0%
add-sqr-sqrt17.9%
sqrt-unprod32.8%
sqr-neg32.8%
sqrt-unprod14.9%
add-sqr-sqrt24.4%
Applied egg-rr24.4%
associate-/r/29.7%
Simplified29.7%
Taylor expanded in b around 0 8.0%
+-commutative8.0%
Simplified8.0%
Taylor expanded in b around inf 15.9%
associate-/l*22.4%
Simplified22.4%
if -1e17 < y < 2.29999999999999992e-66Initial program 97.4%
*-commutative97.4%
associate-/l*83.8%
associate--l+83.8%
fma-define83.8%
sub-neg83.8%
metadata-eval83.8%
Simplified83.8%
Taylor expanded in b around inf 51.1%
neg-mul-151.1%
Simplified51.1%
Taylor expanded in b around 0 19.9%
if 2.29999999999999992e-66 < y Initial program 99.8%
*-commutative99.8%
associate-/l*91.8%
associate--l+91.8%
fma-define91.8%
sub-neg91.8%
metadata-eval91.8%
Simplified91.8%
Taylor expanded in b around inf 37.9%
neg-mul-137.9%
Simplified37.9%
clear-num37.9%
un-div-inv37.9%
add-sqr-sqrt21.5%
sqrt-unprod29.7%
sqr-neg29.7%
sqrt-unprod8.2%
add-sqr-sqrt16.3%
Applied egg-rr16.3%
associate-/r/20.4%
Simplified20.4%
Taylor expanded in b around 0 9.7%
+-commutative9.7%
Simplified9.7%
Taylor expanded in b around inf 30.2%
Final simplification23.4%
(FPCore (x y z t a b) :precision binary64 (if (<= y 2.9e+190) (/ (/ x a) y) (* x (/ b y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 2.9e+190) {
tmp = (x / a) / y;
} else {
tmp = x * (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.9d+190) then
tmp = (x / a) / y
else
tmp = x * (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.9e+190) {
tmp = (x / a) / y;
} else {
tmp = x * (b / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 2.9e+190: tmp = (x / a) / y else: tmp = x * (b / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 2.9e+190) tmp = Float64(Float64(x / a) / y); else tmp = Float64(x * Float64(b / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 2.9e+190) tmp = (x / a) / y; else tmp = x * (b / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 2.9e+190], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(x * N[(b / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.9 \cdot 10^{+190}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{b}{y}\\
\end{array}
\end{array}
if y < 2.89999999999999989e190Initial program 98.5%
Taylor expanded in y around 0 86.5%
div-exp72.0%
exp-to-pow72.7%
sub-neg72.7%
metadata-eval72.7%
Simplified72.7%
Taylor expanded in t around 0 65.7%
Taylor expanded in b around 0 35.3%
if 2.89999999999999989e190 < y Initial program 100.0%
*-commutative100.0%
associate-/l*85.7%
associate--l+85.7%
fma-define85.7%
sub-neg85.7%
metadata-eval85.7%
Simplified85.7%
Taylor expanded in b around inf 34.8%
neg-mul-134.8%
Simplified34.8%
clear-num34.8%
un-div-inv34.8%
add-sqr-sqrt26.2%
sqrt-unprod34.6%
sqr-neg34.6%
sqrt-unprod8.4%
add-sqr-sqrt20.6%
Applied egg-rr20.6%
associate-/r/27.8%
Simplified27.8%
Taylor expanded in b around 0 20.7%
+-commutative20.7%
Simplified20.7%
Taylor expanded in b around inf 57.8%
Final simplification37.8%
(FPCore (x y z t a b) :precision binary64 (if (<= y 8.4e+186) (/ x (* y a)) (* x (/ b y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 8.4e+186) {
tmp = x / (y * a);
} else {
tmp = x * (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 <= 8.4d+186) then
tmp = x / (y * a)
else
tmp = x * (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 <= 8.4e+186) {
tmp = x / (y * a);
} else {
tmp = x * (b / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 8.4e+186: tmp = x / (y * a) else: tmp = x * (b / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 8.4e+186) tmp = Float64(x / Float64(y * a)); else tmp = Float64(x * Float64(b / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 8.4e+186) tmp = x / (y * a); else tmp = x * (b / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 8.4e+186], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x * N[(b / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 8.4 \cdot 10^{+186}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{b}{y}\\
\end{array}
\end{array}
if y < 8.4000000000000001e186Initial program 98.5%
Taylor expanded in y around 0 86.5%
div-exp72.0%
exp-to-pow72.7%
sub-neg72.7%
metadata-eval72.7%
Simplified72.7%
Taylor expanded in t around 0 65.7%
Taylor expanded in b around 0 31.6%
if 8.4000000000000001e186 < y Initial program 100.0%
*-commutative100.0%
associate-/l*85.7%
associate--l+85.7%
fma-define85.7%
sub-neg85.7%
metadata-eval85.7%
Simplified85.7%
Taylor expanded in b around inf 34.8%
neg-mul-134.8%
Simplified34.8%
clear-num34.8%
un-div-inv34.8%
add-sqr-sqrt26.2%
sqrt-unprod34.6%
sqr-neg34.6%
sqrt-unprod8.4%
add-sqr-sqrt20.6%
Applied egg-rr20.6%
associate-/r/27.8%
Simplified27.8%
Taylor expanded in b around 0 20.7%
+-commutative20.7%
Simplified20.7%
Taylor expanded in b around inf 57.8%
Final simplification34.4%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.8e-184) (/ x y) (* b (/ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.8e-184) {
tmp = x / y;
} else {
tmp = b * (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 (b <= (-1.8d-184)) then
tmp = x / y
else
tmp = b * (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 (b <= -1.8e-184) {
tmp = x / y;
} else {
tmp = b * (x / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.8e-184: tmp = x / y else: tmp = b * (x / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.8e-184) tmp = Float64(x / y); else tmp = Float64(b * Float64(x / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.8e-184) tmp = x / y; else tmp = b * (x / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.8e-184], N[(x / y), $MachinePrecision], N[(b * N[(x / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.8 \cdot 10^{-184}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;b \cdot \frac{x}{y}\\
\end{array}
\end{array}
if b < -1.8000000000000001e-184Initial program 98.6%
*-commutative98.6%
associate-/l*90.6%
associate--l+90.6%
fma-define90.6%
sub-neg90.6%
metadata-eval90.6%
Simplified90.6%
Taylor expanded in b around inf 62.7%
neg-mul-162.7%
Simplified62.7%
Taylor expanded in b around 0 19.3%
if -1.8000000000000001e-184 < b Initial program 98.7%
*-commutative98.7%
associate-/l*85.4%
associate--l+85.4%
fma-define85.4%
sub-neg85.4%
metadata-eval85.4%
Simplified85.4%
Taylor expanded in b around inf 31.0%
neg-mul-131.0%
Simplified31.0%
clear-num31.0%
un-div-inv31.0%
add-sqr-sqrt2.4%
sqrt-unprod17.8%
sqr-neg17.8%
sqrt-unprod15.4%
add-sqr-sqrt17.8%
Applied egg-rr17.8%
associate-/r/21.7%
Simplified21.7%
Taylor expanded in b around 0 12.0%
+-commutative12.0%
Simplified12.0%
Taylor expanded in b around inf 18.5%
associate-/l*23.2%
Simplified23.2%
(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.7%
*-commutative98.7%
associate-/l*87.4%
associate--l+87.4%
fma-define87.4%
sub-neg87.4%
metadata-eval87.4%
Simplified87.4%
Taylor expanded in b around inf 43.2%
neg-mul-143.2%
Simplified43.2%
Taylor expanded in b around 0 16.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (pow a (- t 1.0)))
(t_2 (/ (* x (/ t_1 y)) (- (+ b 1.0) (* y (log z))))))
(if (< t -0.8845848504127471)
t_2
(if (< t 852031.2288374073)
(/ (* (/ x y) t_1) (exp (- b (* (log z) y))))
t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = pow(a, (t - 1.0));
double t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * log(z)));
double tmp;
if (t < -0.8845848504127471) {
tmp = t_2;
} else if (t < 852031.2288374073) {
tmp = ((x / y) * t_1) / exp((b - (log(z) * y)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a ** (t - 1.0d0)
t_2 = (x * (t_1 / y)) / ((b + 1.0d0) - (y * log(z)))
if (t < (-0.8845848504127471d0)) then
tmp = t_2
else if (t < 852031.2288374073d0) then
tmp = ((x / y) * t_1) / exp((b - (log(z) * y)))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = Math.pow(a, (t - 1.0));
double t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * Math.log(z)));
double tmp;
if (t < -0.8845848504127471) {
tmp = t_2;
} else if (t < 852031.2288374073) {
tmp = ((x / y) * t_1) / Math.exp((b - (Math.log(z) * y)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = math.pow(a, (t - 1.0)) t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * math.log(z))) tmp = 0 if t < -0.8845848504127471: tmp = t_2 elif t < 852031.2288374073: tmp = ((x / y) * t_1) / math.exp((b - (math.log(z) * y))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = a ^ Float64(t - 1.0) t_2 = Float64(Float64(x * Float64(t_1 / y)) / Float64(Float64(b + 1.0) - Float64(y * log(z)))) tmp = 0.0 if (t < -0.8845848504127471) tmp = t_2; elseif (t < 852031.2288374073) tmp = Float64(Float64(Float64(x / y) * t_1) / exp(Float64(b - Float64(log(z) * y)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a ^ (t - 1.0); t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * log(z))); tmp = 0.0; if (t < -0.8845848504127471) tmp = t_2; elseif (t < 852031.2288374073) tmp = ((x / y) * t_1) / exp((b - (log(z) * y))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision] / N[(N[(b + 1.0), $MachinePrecision] - N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -0.8845848504127471], t$95$2, If[Less[t, 852031.2288374073], N[(N[(N[(x / y), $MachinePrecision] * t$95$1), $MachinePrecision] / N[Exp[N[(b - N[(N[Log[z], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {a}^{\left(t - 1\right)}\\
t_2 := \frac{x \cdot \frac{t\_1}{y}}{\left(b + 1\right) - y \cdot \log z}\\
\mathbf{if}\;t < -0.8845848504127471:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < 852031.2288374073:\\
\;\;\;\;\frac{\frac{x}{y} \cdot t\_1}{e^{b - \log z \cdot y}}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024157
(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))