
(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 23 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.9%
Final simplification98.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -220000000000.0) (not (<= y 4.4e+70))) (/ (* x (exp (- (- (* y (log z)) (log a)) b))) y) (/ (* x (exp (- (* (+ t -1.0) (log a)) b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -220000000000.0) || !(y <= 4.4e+70)) {
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y;
} else {
tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-220000000000.0d0)) .or. (.not. (y <= 4.4d+70))) then
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y
else
tmp = (x * exp((((t + (-1.0d0)) * log(a)) - b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -220000000000.0) || !(y <= 4.4e+70)) {
tmp = (x * Math.exp((((y * Math.log(z)) - Math.log(a)) - b))) / y;
} else {
tmp = (x * Math.exp((((t + -1.0) * Math.log(a)) - b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -220000000000.0) or not (y <= 4.4e+70): tmp = (x * math.exp((((y * math.log(z)) - math.log(a)) - b))) / y else: tmp = (x * math.exp((((t + -1.0) * math.log(a)) - b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -220000000000.0) || !(y <= 4.4e+70)) tmp = Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) - log(a)) - b))) / y); else tmp = Float64(Float64(x * exp(Float64(Float64(Float64(t + -1.0) * log(a)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -220000000000.0) || ~((y <= 4.4e+70))) tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y; else tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -220000000000.0], N[Not[LessEqual[y, 4.4e+70]], $MachinePrecision]], N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] - N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -220000000000 \lor \neg \left(y \leq 4.4 \cdot 10^{+70}\right):\\
\;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z - \log a\right) - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(t + -1\right) \cdot \log a - b}}{y}\\
\end{array}
\end{array}
if y < -2.2e11 or 4.40000000000000001e70 < y Initial program 100.0%
Taylor expanded in t around 0 93.1%
+-commutative93.1%
mul-1-neg93.1%
unsub-neg93.1%
Simplified93.1%
if -2.2e11 < y < 4.40000000000000001e70Initial program 98.1%
*-commutative98.1%
associate-/l*82.9%
associate--l+82.9%
fma-define82.9%
sub-neg82.9%
metadata-eval82.9%
Simplified82.9%
Taylor expanded in y around 0 96.0%
Final simplification94.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -200000000000.0) (not (<= y 2.3e+128))) (/ (* x (pow z y)) 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 <= -200000000000.0) || !(y <= 2.3e+128)) {
tmp = (x * pow(z, y)) / 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 <= (-200000000000.0d0)) .or. (.not. (y <= 2.3d+128))) then
tmp = (x * (z ** y)) / 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 <= -200000000000.0) || !(y <= 2.3e+128)) {
tmp = (x * Math.pow(z, y)) / 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 <= -200000000000.0) or not (y <= 2.3e+128): tmp = (x * math.pow(z, y)) / 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 <= -200000000000.0) || !(y <= 2.3e+128)) tmp = Float64(Float64(x * (z ^ y)) / 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 <= -200000000000.0) || ~((y <= 2.3e+128))) tmp = (x * (z ^ y)) / 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, -200000000000.0], N[Not[LessEqual[y, 2.3e+128]], $MachinePrecision]], N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -200000000000 \lor \neg \left(y \leq 2.3 \cdot 10^{+128}\right):\\
\;\;\;\;\frac{x \cdot {z}^{y}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(t + -1\right) \cdot \log a - b}}{y}\\
\end{array}
\end{array}
if y < -2e11 or 2.29999999999999998e128 < y Initial program 100.0%
*-commutative100.0%
associate-/l*90.7%
associate--l+90.7%
fma-define90.7%
sub-neg90.7%
metadata-eval90.7%
Simplified90.7%
Taylor expanded in y around inf 75.5%
associate-*r/82.7%
*-commutative82.7%
exp-to-pow82.7%
Applied egg-rr82.7%
if -2e11 < y < 2.29999999999999998e128Initial program 98.3%
*-commutative98.3%
associate-/l*84.8%
associate--l+84.8%
fma-define84.8%
sub-neg84.8%
metadata-eval84.8%
Simplified84.8%
Taylor expanded in y around 0 95.2%
Final simplification90.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -8.0) (not (<= y 6.4e+45))) (/ (* 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 <= -8.0) || !(y <= 6.4e+45)) {
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 <= (-8.0d0)) .or. (.not. (y <= 6.4d+45))) 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 <= -8.0) || !(y <= 6.4e+45)) {
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 <= -8.0) or not (y <= 6.4e+45): 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 <= -8.0) || !(y <= 6.4e+45)) 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 <= -8.0) || ~((y <= 6.4e+45))) 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, -8.0], N[Not[LessEqual[y, 6.4e+45]], $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 -8 \lor \neg \left(y \leq 6.4 \cdot 10^{+45}\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 < -8 or 6.4000000000000006e45 < y Initial program 100.0%
*-commutative100.0%
associate-/l*92.7%
associate--l+92.7%
fma-define92.7%
sub-neg92.7%
metadata-eval92.7%
Simplified92.7%
Taylor expanded in y around inf 73.7%
associate-*r/79.4%
*-commutative79.4%
exp-to-pow79.4%
Applied egg-rr79.4%
if -8 < y < 6.4000000000000006e45Initial program 97.9%
Taylor expanded in y around 0 96.5%
div-exp87.3%
exp-to-pow88.4%
sub-neg88.4%
metadata-eval88.4%
Simplified88.4%
Final simplification84.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -740.0) (not (<= y 1.52e+46))) (/ (* x (pow z y)) y) (* x (/ (/ (pow a t) a) (* y (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -740.0) || !(y <= 1.52e+46)) {
tmp = (x * pow(z, y)) / y;
} else {
tmp = x * ((pow(a, t) / 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 ((y <= (-740.0d0)) .or. (.not. (y <= 1.52d+46))) then
tmp = (x * (z ** y)) / y
else
tmp = x * (((a ** t) / 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 ((y <= -740.0) || !(y <= 1.52e+46)) {
tmp = (x * Math.pow(z, y)) / y;
} else {
tmp = x * ((Math.pow(a, t) / a) / (y * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -740.0) or not (y <= 1.52e+46): tmp = (x * math.pow(z, y)) / y else: tmp = x * ((math.pow(a, t) / a) / (y * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -740.0) || !(y <= 1.52e+46)) tmp = Float64(Float64(x * (z ^ y)) / y); else tmp = Float64(x * Float64(Float64((a ^ t) / a) / Float64(y * exp(b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -740.0) || ~((y <= 1.52e+46))) tmp = (x * (z ^ y)) / y; else tmp = x * (((a ^ t) / a) / (y * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -740.0], N[Not[LessEqual[y, 1.52e+46]], $MachinePrecision]], N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x * N[(N[(N[Power[a, t], $MachinePrecision] / a), $MachinePrecision] / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -740 \lor \neg \left(y \leq 1.52 \cdot 10^{+46}\right):\\
\;\;\;\;\frac{x \cdot {z}^{y}}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\frac{{a}^{t}}{a}}{y \cdot e^{b}}\\
\end{array}
\end{array}
if y < -740 or 1.5200000000000001e46 < y Initial program 100.0%
*-commutative100.0%
associate-/l*92.7%
associate--l+92.7%
fma-define92.7%
sub-neg92.7%
metadata-eval92.7%
Simplified92.7%
Taylor expanded in y around inf 73.7%
associate-*r/79.4%
*-commutative79.4%
exp-to-pow79.4%
Applied egg-rr79.4%
if -740 < y < 1.5200000000000001e46Initial program 97.9%
associate-/l*96.0%
associate--l+96.0%
exp-sum92.2%
associate-/l*92.2%
*-commutative92.2%
exp-to-pow92.2%
exp-diff83.0%
*-commutative83.0%
exp-to-pow84.0%
sub-neg84.0%
metadata-eval84.0%
Simplified84.0%
Taylor expanded in y around 0 85.3%
sub-neg85.3%
metadata-eval85.3%
pow-to-exp86.3%
unpow-prod-up86.5%
unpow-186.5%
Applied egg-rr86.5%
associate-*r/86.5%
*-rgt-identity86.5%
Simplified86.5%
Final simplification83.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (exp b))))
(if (<= b -2.1e+84)
(/ x t_1)
(if (<= b 4.2e-275)
(* x (/ (/ (pow a t) a) y))
(if (<= b 1.1e+17) (/ (* x (/ (pow z y) a)) y) (/ x (* a t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * exp(b);
double tmp;
if (b <= -2.1e+84) {
tmp = x / t_1;
} else if (b <= 4.2e-275) {
tmp = x * ((pow(a, t) / a) / y);
} else if (b <= 1.1e+17) {
tmp = (x * (pow(z, y) / a)) / y;
} else {
tmp = x / (a * 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 = y * exp(b)
if (b <= (-2.1d+84)) then
tmp = x / t_1
else if (b <= 4.2d-275) then
tmp = x * (((a ** t) / a) / y)
else if (b <= 1.1d+17) then
tmp = (x * ((z ** y) / a)) / y
else
tmp = x / (a * 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 = y * Math.exp(b);
double tmp;
if (b <= -2.1e+84) {
tmp = x / t_1;
} else if (b <= 4.2e-275) {
tmp = x * ((Math.pow(a, t) / a) / y);
} else if (b <= 1.1e+17) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else {
tmp = x / (a * t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * math.exp(b) tmp = 0 if b <= -2.1e+84: tmp = x / t_1 elif b <= 4.2e-275: tmp = x * ((math.pow(a, t) / a) / y) elif b <= 1.1e+17: tmp = (x * (math.pow(z, y) / a)) / y else: tmp = x / (a * t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * exp(b)) tmp = 0.0 if (b <= -2.1e+84) tmp = Float64(x / t_1); elseif (b <= 4.2e-275) tmp = Float64(x * Float64(Float64((a ^ t) / a) / y)); elseif (b <= 1.1e+17) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = Float64(x / Float64(a * t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * exp(b); tmp = 0.0; if (b <= -2.1e+84) tmp = x / t_1; elseif (b <= 4.2e-275) tmp = x * (((a ^ t) / a) / y); elseif (b <= 1.1e+17) tmp = (x * ((z ^ y) / a)) / y; else tmp = x / (a * t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.1e+84], N[(x / t$95$1), $MachinePrecision], If[LessEqual[b, 4.2e-275], N[(x * N[(N[(N[Power[a, t], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.1e+17], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(a * t$95$1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot e^{b}\\
\mathbf{if}\;b \leq -2.1 \cdot 10^{+84}:\\
\;\;\;\;\frac{x}{t\_1}\\
\mathbf{elif}\;b \leq 4.2 \cdot 10^{-275}:\\
\;\;\;\;x \cdot \frac{\frac{{a}^{t}}{a}}{y}\\
\mathbf{elif}\;b \leq 1.1 \cdot 10^{+17}:\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot t\_1}\\
\end{array}
\end{array}
if b < -2.10000000000000019e84Initial program 100.0%
*-commutative100.0%
associate-/l*91.2%
associate--l+91.2%
fma-define91.2%
sub-neg91.2%
metadata-eval91.2%
Simplified91.2%
Taylor expanded in b around inf 91.2%
neg-mul-191.2%
Simplified91.2%
exp-neg91.2%
frac-times97.1%
*-un-lft-identity97.1%
*-commutative97.1%
Applied egg-rr97.1%
if -2.10000000000000019e84 < b < 4.19999999999999976e-275Initial program 97.7%
associate-/l*96.5%
associate--l+96.5%
exp-sum80.1%
associate-/l*78.8%
*-commutative78.8%
exp-to-pow78.8%
exp-diff71.1%
*-commutative71.1%
exp-to-pow72.0%
sub-neg72.0%
metadata-eval72.0%
Simplified72.0%
Taylor expanded in y around 0 72.7%
sub-neg72.7%
metadata-eval72.7%
pow-to-exp73.7%
unpow-prod-up73.8%
unpow-173.8%
Applied egg-rr73.8%
associate-*r/73.8%
*-rgt-identity73.8%
Simplified73.8%
Taylor expanded in b around 0 75.5%
if 4.19999999999999976e-275 < b < 1.1e17Initial program 98.6%
associate-/l*96.0%
associate--l+96.0%
exp-sum82.2%
associate-/l*79.1%
*-commutative79.1%
exp-to-pow79.1%
exp-diff77.6%
*-commutative77.6%
exp-to-pow78.4%
sub-neg78.4%
metadata-eval78.4%
Simplified78.4%
Applied egg-rr84.4%
Taylor expanded in t around 0 81.2%
Taylor expanded in b around 0 80.0%
if 1.1e17 < b Initial program 100.0%
Taylor expanded in y around 0 89.9%
div-exp61.7%
exp-to-pow61.7%
sub-neg61.7%
metadata-eval61.7%
Simplified61.7%
Taylor expanded in t around 0 76.0%
Final simplification79.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -8e+23) (not (<= t 1.7e+43))) (* x (/ (/ (pow a t) a) y)) (/ (/ x (* a (exp b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -8e+23) || !(t <= 1.7e+43)) {
tmp = x * ((pow(a, t) / a) / y);
} else {
tmp = (x / (a * exp(b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-8d+23)) .or. (.not. (t <= 1.7d+43))) then
tmp = x * (((a ** t) / a) / y)
else
tmp = (x / (a * exp(b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -8e+23) || !(t <= 1.7e+43)) {
tmp = x * ((Math.pow(a, t) / a) / y);
} else {
tmp = (x / (a * Math.exp(b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -8e+23) or not (t <= 1.7e+43): tmp = x * ((math.pow(a, t) / a) / y) else: tmp = (x / (a * math.exp(b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -8e+23) || !(t <= 1.7e+43)) tmp = Float64(x * Float64(Float64((a ^ t) / a) / y)); else tmp = Float64(Float64(x / Float64(a * exp(b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -8e+23) || ~((t <= 1.7e+43))) tmp = x * (((a ^ t) / a) / y); else tmp = (x / (a * exp(b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -8e+23], N[Not[LessEqual[t, 1.7e+43]], $MachinePrecision]], N[(x * N[(N[(N[Power[a, t], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8 \cdot 10^{+23} \lor \neg \left(t \leq 1.7 \cdot 10^{+43}\right):\\
\;\;\;\;x \cdot \frac{\frac{{a}^{t}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\
\end{array}
\end{array}
if t < -7.9999999999999993e23 or 1.70000000000000006e43 < t Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum76.7%
associate-/l*76.7%
*-commutative76.7%
exp-to-pow76.7%
exp-diff54.2%
*-commutative54.2%
exp-to-pow54.2%
sub-neg54.2%
metadata-eval54.2%
Simplified54.2%
Taylor expanded in y around 0 63.5%
sub-neg63.5%
metadata-eval63.5%
pow-to-exp63.5%
unpow-prod-up63.5%
unpow-163.5%
Applied egg-rr63.5%
associate-*r/63.5%
*-rgt-identity63.5%
Simplified63.5%
Taylor expanded in b around 0 79.5%
if -7.9999999999999993e23 < t < 1.70000000000000006e43Initial program 98.0%
Taylor expanded in y around 0 78.6%
div-exp74.1%
exp-to-pow75.2%
sub-neg75.2%
metadata-eval75.2%
Simplified75.2%
Taylor expanded in t around 0 76.7%
Final simplification78.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -26000000000.0) (not (<= y 7500000000.0))) (/ (* x (pow z y)) y) (/ (/ x (* a (exp b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -26000000000.0) || !(y <= 7500000000.0)) {
tmp = (x * pow(z, y)) / y;
} else {
tmp = (x / (a * exp(b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-26000000000.0d0)) .or. (.not. (y <= 7500000000.0d0))) then
tmp = (x * (z ** y)) / y
else
tmp = (x / (a * exp(b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -26000000000.0) || !(y <= 7500000000.0)) {
tmp = (x * Math.pow(z, y)) / y;
} else {
tmp = (x / (a * Math.exp(b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -26000000000.0) or not (y <= 7500000000.0): tmp = (x * math.pow(z, y)) / y else: tmp = (x / (a * math.exp(b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -26000000000.0) || !(y <= 7500000000.0)) tmp = Float64(Float64(x * (z ^ y)) / y); else tmp = Float64(Float64(x / Float64(a * exp(b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -26000000000.0) || ~((y <= 7500000000.0))) tmp = (x * (z ^ y)) / y; else tmp = (x / (a * exp(b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -26000000000.0], N[Not[LessEqual[y, 7500000000.0]], $MachinePrecision]], N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -26000000000 \lor \neg \left(y \leq 7500000000\right):\\
\;\;\;\;\frac{x \cdot {z}^{y}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\
\end{array}
\end{array}
if y < -2.6e10 or 7.5e9 < y Initial program 100.0%
*-commutative100.0%
associate-/l*92.9%
associate--l+92.9%
fma-define92.9%
sub-neg92.9%
metadata-eval92.9%
Simplified92.9%
Taylor expanded in y around inf 73.5%
associate-*r/79.1%
*-commutative79.1%
exp-to-pow79.1%
Applied egg-rr79.1%
if -2.6e10 < y < 7.5e9Initial program 97.9%
Taylor expanded in y around 0 97.1%
div-exp87.0%
exp-to-pow88.1%
sub-neg88.1%
metadata-eval88.1%
Simplified88.1%
Taylor expanded in t around 0 69.4%
Final simplification74.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.8) (not (<= y 1.45e+15))) (/ (* x (pow z y)) y) (/ x (* a (* y (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.8) || !(y <= 1.45e+15)) {
tmp = (x * pow(z, y)) / y;
} else {
tmp = x / (a * (y * exp(b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.8d0)) .or. (.not. (y <= 1.45d+15))) then
tmp = (x * (z ** y)) / y
else
tmp = x / (a * (y * exp(b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.8) || !(y <= 1.45e+15)) {
tmp = (x * Math.pow(z, y)) / y;
} else {
tmp = x / (a * (y * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.8) or not (y <= 1.45e+15): tmp = (x * math.pow(z, y)) / y else: tmp = x / (a * (y * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.8) || !(y <= 1.45e+15)) tmp = Float64(Float64(x * (z ^ y)) / y); else tmp = Float64(x / Float64(a * Float64(y * exp(b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.8) || ~((y <= 1.45e+15))) tmp = (x * (z ^ y)) / y; else tmp = x / (a * (y * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.8], N[Not[LessEqual[y, 1.45e+15]], $MachinePrecision]], N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \lor \neg \left(y \leq 1.45 \cdot 10^{+15}\right):\\
\;\;\;\;\frac{x \cdot {z}^{y}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
if y < -1.80000000000000004 or 1.45e15 < y Initial program 100.0%
*-commutative100.0%
associate-/l*93.0%
associate--l+93.0%
fma-define93.0%
sub-neg93.0%
metadata-eval93.0%
Simplified93.0%
Taylor expanded in y around inf 73.2%
associate-*r/78.6%
*-commutative78.6%
exp-to-pow78.6%
Applied egg-rr78.6%
if -1.80000000000000004 < y < 1.45e15Initial program 97.8%
Taylor expanded in y around 0 97.1%
div-exp87.6%
exp-to-pow88.7%
sub-neg88.7%
metadata-eval88.7%
Simplified88.7%
Taylor expanded in t around 0 66.7%
Final simplification72.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -6e-57) (not (<= b 70000000000000.0))) (/ x (* y (exp b))) (/ (* x (pow z y)) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -6e-57) || !(b <= 70000000000000.0)) {
tmp = x / (y * exp(b));
} else {
tmp = (x * pow(z, y)) / 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 <= (-6d-57)) .or. (.not. (b <= 70000000000000.0d0))) then
tmp = x / (y * exp(b))
else
tmp = (x * (z ** y)) / 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 <= -6e-57) || !(b <= 70000000000000.0)) {
tmp = x / (y * Math.exp(b));
} else {
tmp = (x * Math.pow(z, y)) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -6e-57) or not (b <= 70000000000000.0): tmp = x / (y * math.exp(b)) else: tmp = (x * math.pow(z, y)) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -6e-57) || !(b <= 70000000000000.0)) tmp = Float64(x / Float64(y * exp(b))); else tmp = Float64(Float64(x * (z ^ y)) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -6e-57) || ~((b <= 70000000000000.0))) tmp = x / (y * exp(b)); else tmp = (x * (z ^ y)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -6e-57], N[Not[LessEqual[b, 70000000000000.0]], $MachinePrecision]], N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6 \cdot 10^{-57} \lor \neg \left(b \leq 70000000000000\right):\\
\;\;\;\;\frac{x}{y \cdot e^{b}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot {z}^{y}}{y}\\
\end{array}
\end{array}
if b < -6.00000000000000001e-57 or 7e13 < b Initial program 99.9%
*-commutative99.9%
associate-/l*88.4%
associate--l+88.4%
fma-define88.4%
sub-neg88.4%
metadata-eval88.4%
Simplified88.4%
Taylor expanded in b around inf 66.9%
neg-mul-166.9%
Simplified66.9%
exp-neg66.9%
frac-times76.9%
*-un-lft-identity76.9%
*-commutative76.9%
Applied egg-rr76.9%
if -6.00000000000000001e-57 < b < 7e13Initial program 98.0%
*-commutative98.0%
associate-/l*85.6%
associate--l+85.6%
fma-define85.6%
sub-neg85.6%
metadata-eval85.6%
Simplified85.6%
Taylor expanded in y around inf 51.6%
associate-*r/56.4%
*-commutative56.4%
exp-to-pow56.4%
Applied egg-rr56.4%
Final simplification66.9%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= b -6.5) (not (<= b 0.95)))
(/ x (* y (exp b)))
(/
x
(*
a
(* y (+ 1.0 (* b (+ 1.0 (* b (+ 0.5 (* b 0.16666666666666666)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -6.5) || !(b <= 0.95)) {
tmp = x / (y * exp(b));
} else {
tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666))))))));
}
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.5d0)) .or. (.not. (b <= 0.95d0))) then
tmp = x / (y * exp(b))
else
tmp = x / (a * (y * (1.0d0 + (b * (1.0d0 + (b * (0.5d0 + (b * 0.16666666666666666d0))))))))
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.5) || !(b <= 0.95)) {
tmp = x / (y * Math.exp(b));
} else {
tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666))))))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -6.5) or not (b <= 0.95): tmp = x / (y * math.exp(b)) else: tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -6.5) || !(b <= 0.95)) tmp = Float64(x / Float64(y * exp(b))); else tmp = Float64(x / Float64(a * Float64(y * Float64(1.0 + Float64(b * Float64(1.0 + Float64(b * Float64(0.5 + Float64(b * 0.16666666666666666))))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -6.5) || ~((b <= 0.95))) tmp = x / (y * exp(b)); else tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -6.5], N[Not[LessEqual[b, 0.95]], $MachinePrecision]], N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * 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]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.5 \lor \neg \left(b \leq 0.95\right):\\
\;\;\;\;\frac{x}{y \cdot e^{b}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(1 + b \cdot \left(1 + b \cdot \left(0.5 + b \cdot 0.16666666666666666\right)\right)\right)\right)}\\
\end{array}
\end{array}
if b < -6.5 or 0.94999999999999996 < b Initial program 100.0%
*-commutative100.0%
associate-/l*88.2%
associate--l+88.2%
fma-define88.2%
sub-neg88.2%
metadata-eval88.2%
Simplified88.2%
Taylor expanded in b around inf 68.1%
neg-mul-168.1%
Simplified68.1%
exp-neg68.1%
frac-times78.3%
*-un-lft-identity78.3%
*-commutative78.3%
Applied egg-rr78.3%
if -6.5 < b < 0.94999999999999996Initial program 97.9%
Taylor expanded in y around 0 75.1%
div-exp75.1%
exp-to-pow76.2%
sub-neg76.2%
metadata-eval76.2%
Simplified76.2%
Taylor expanded in t around 0 34.9%
Taylor expanded in b around 0 34.5%
*-commutative34.5%
Simplified34.5%
Final simplification56.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -4.2e+79)
(* (+ 1.0 (* b (+ -1.0 (* b (+ 0.5 (* b -0.16666666666666666)))))) (/ x y))
(/
x
(*
a
(* y (+ 1.0 (* b (+ 1.0 (* b (+ 0.5 (* b 0.16666666666666666)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -4.2e+79) {
tmp = (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666)))))) * (x / y);
} else {
tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666))))))));
}
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.2d+79)) then
tmp = (1.0d0 + (b * ((-1.0d0) + (b * (0.5d0 + (b * (-0.16666666666666666d0))))))) * (x / y)
else
tmp = x / (a * (y * (1.0d0 + (b * (1.0d0 + (b * (0.5d0 + (b * 0.16666666666666666d0))))))))
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.2e+79) {
tmp = (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666)))))) * (x / y);
} else {
tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666))))))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -4.2e+79: tmp = (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666)))))) * (x / y) else: tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -4.2e+79) tmp = Float64(Float64(1.0 + Float64(b * Float64(-1.0 + Float64(b * Float64(0.5 + Float64(b * -0.16666666666666666)))))) * Float64(x / y)); else tmp = Float64(x / Float64(a * Float64(y * Float64(1.0 + Float64(b * Float64(1.0 + Float64(b * Float64(0.5 + Float64(b * 0.16666666666666666))))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -4.2e+79) tmp = (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666)))))) * (x / y); else tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -4.2e+79], N[(N[(1.0 + N[(b * N[(-1.0 + N[(b * N[(0.5 + N[(b * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * 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]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.2 \cdot 10^{+79}:\\
\;\;\;\;\left(1 + b \cdot \left(-1 + b \cdot \left(0.5 + b \cdot -0.16666666666666666\right)\right)\right) \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(1 + b \cdot \left(1 + b \cdot \left(0.5 + b \cdot 0.16666666666666666\right)\right)\right)\right)}\\
\end{array}
\end{array}
if b < -4.20000000000000016e79Initial program 100.0%
*-commutative100.0%
associate-/l*91.2%
associate--l+91.2%
fma-define91.2%
sub-neg91.2%
metadata-eval91.2%
Simplified91.2%
Taylor expanded in b around inf 91.2%
neg-mul-191.2%
Simplified91.2%
Taylor expanded in b around 0 85.6%
if -4.20000000000000016e79 < b Initial program 98.8%
Taylor expanded in y around 0 81.6%
div-exp68.0%
exp-to-pow68.7%
sub-neg68.7%
metadata-eval68.7%
Simplified68.7%
Taylor expanded in t around 0 50.2%
Taylor expanded in b around 0 44.3%
*-commutative44.3%
Simplified44.3%
Final simplification49.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b -4.4e+79) (* (+ 1.0 (* b (+ -1.0 (* b (+ 0.5 (* b -0.16666666666666666)))))) (/ x y)) (/ x (* a (* y (+ 1.0 (* b (+ 1.0 (* b 0.5)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -4.4e+79) {
tmp = (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666)))))) * (x / y);
} else {
tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * 0.5))))));
}
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.4d+79)) then
tmp = (1.0d0 + (b * ((-1.0d0) + (b * (0.5d0 + (b * (-0.16666666666666666d0))))))) * (x / y)
else
tmp = x / (a * (y * (1.0d0 + (b * (1.0d0 + (b * 0.5d0))))))
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.4e+79) {
tmp = (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666)))))) * (x / y);
} else {
tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * 0.5))))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -4.4e+79: tmp = (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666)))))) * (x / y) else: tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * 0.5)))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -4.4e+79) tmp = Float64(Float64(1.0 + Float64(b * Float64(-1.0 + Float64(b * Float64(0.5 + Float64(b * -0.16666666666666666)))))) * Float64(x / y)); else tmp = Float64(x / Float64(a * Float64(y * Float64(1.0 + Float64(b * Float64(1.0 + Float64(b * 0.5))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -4.4e+79) tmp = (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666)))))) * (x / y); else tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * 0.5)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -4.4e+79], N[(N[(1.0 + N[(b * N[(-1.0 + N[(b * N[(0.5 + N[(b * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * N[(1.0 + N[(b * N[(1.0 + N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.4 \cdot 10^{+79}:\\
\;\;\;\;\left(1 + b \cdot \left(-1 + b \cdot \left(0.5 + b \cdot -0.16666666666666666\right)\right)\right) \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(1 + b \cdot \left(1 + b \cdot 0.5\right)\right)\right)}\\
\end{array}
\end{array}
if b < -4.3999999999999998e79Initial program 100.0%
*-commutative100.0%
associate-/l*91.2%
associate--l+91.2%
fma-define91.2%
sub-neg91.2%
metadata-eval91.2%
Simplified91.2%
Taylor expanded in b around inf 91.2%
neg-mul-191.2%
Simplified91.2%
Taylor expanded in b around 0 85.6%
if -4.3999999999999998e79 < b Initial program 98.8%
Taylor expanded in y around 0 81.6%
div-exp68.0%
exp-to-pow68.7%
sub-neg68.7%
metadata-eval68.7%
Simplified68.7%
Taylor expanded in t around 0 50.2%
Taylor expanded in b around 0 42.0%
*-commutative42.0%
Simplified42.0%
Final simplification47.7%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (+ 1.0 (* b (+ 1.0 (* b 0.5)))))) (if (<= b -9e+81) (* x (/ t_1 y)) (/ x (* a (* y t_1))))))
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 <= -9e+81) {
tmp = x * (t_1 / y);
} else {
tmp = x / (a * (y * 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 = 1.0d0 + (b * (1.0d0 + (b * 0.5d0)))
if (b <= (-9d+81)) then
tmp = x * (t_1 / y)
else
tmp = x / (a * (y * 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 = 1.0 + (b * (1.0 + (b * 0.5)));
double tmp;
if (b <= -9e+81) {
tmp = x * (t_1 / y);
} else {
tmp = x / (a * (y * t_1));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 1.0 + (b * (1.0 + (b * 0.5))) tmp = 0 if b <= -9e+81: tmp = x * (t_1 / y) else: tmp = x / (a * (y * t_1)) 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 <= -9e+81) tmp = Float64(x * Float64(t_1 / y)); else tmp = Float64(x / Float64(a * Float64(y * t_1))); 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 <= -9e+81) tmp = x * (t_1 / y); else tmp = x / (a * (y * t_1)); 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, -9e+81], N[(x * N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 + b \cdot \left(1 + b \cdot 0.5\right)\\
\mathbf{if}\;b \leq -9 \cdot 10^{+81}:\\
\;\;\;\;x \cdot \frac{t\_1}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot t\_1\right)}\\
\end{array}
\end{array}
if b < -9.00000000000000034e81Initial program 100.0%
*-commutative100.0%
associate-/l*91.2%
associate--l+91.2%
fma-define91.2%
sub-neg91.2%
metadata-eval91.2%
Simplified91.2%
Taylor expanded in b around inf 91.2%
neg-mul-191.2%
Simplified91.2%
clear-num91.2%
un-div-inv91.2%
add-sqr-sqrt91.2%
sqrt-unprod91.2%
sqr-neg91.2%
sqrt-unprod0.0%
add-sqr-sqrt1.4%
Applied egg-rr1.4%
associate-/r/4.5%
Simplified4.5%
Taylor expanded in b around 0 80.3%
*-commutative4.6%
Simplified80.3%
if -9.00000000000000034e81 < b Initial program 98.8%
Taylor expanded in y around 0 81.6%
div-exp68.0%
exp-to-pow68.7%
sub-neg68.7%
metadata-eval68.7%
Simplified68.7%
Taylor expanded in t around 0 50.2%
Taylor expanded in b around 0 42.0%
*-commutative42.0%
Simplified42.0%
Final simplification47.0%
(FPCore (x y z t a b) :precision binary64 (if (<= b -3700000000.0) (* x (/ (+ 1.0 (* b (+ 1.0 (* b 0.5)))) y)) (/ x (* a (+ y (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -3700000000.0) {
tmp = x * ((1.0 + (b * (1.0 + (b * 0.5)))) / y);
} else {
tmp = x / (a * (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 <= (-3700000000.0d0)) then
tmp = x * ((1.0d0 + (b * (1.0d0 + (b * 0.5d0)))) / y)
else
tmp = x / (a * (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 <= -3700000000.0) {
tmp = x * ((1.0 + (b * (1.0 + (b * 0.5)))) / y);
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -3700000000.0: tmp = x * ((1.0 + (b * (1.0 + (b * 0.5)))) / y) else: tmp = x / (a * (y + (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -3700000000.0) tmp = Float64(x * Float64(Float64(1.0 + Float64(b * Float64(1.0 + Float64(b * 0.5)))) / y)); else tmp = Float64(x / Float64(a * Float64(y + Float64(y * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -3700000000.0) tmp = x * ((1.0 + (b * (1.0 + (b * 0.5)))) / y); else tmp = x / (a * (y + (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -3700000000.0], N[(x * N[(N[(1.0 + N[(b * N[(1.0 + N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3700000000:\\
\;\;\;\;x \cdot \frac{1 + b \cdot \left(1 + b \cdot 0.5\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\end{array}
\end{array}
if b < -3.7e9Initial program 100.0%
*-commutative100.0%
associate-/l*93.5%
associate--l+93.5%
fma-define93.5%
sub-neg93.5%
metadata-eval93.5%
Simplified93.5%
Taylor expanded in b around inf 80.7%
neg-mul-180.7%
Simplified80.7%
clear-num80.7%
un-div-inv80.7%
add-sqr-sqrt80.7%
sqrt-unprod80.7%
sqr-neg80.7%
sqrt-unprod0.0%
add-sqr-sqrt14.2%
Applied egg-rr14.2%
associate-/r/16.5%
Simplified16.5%
Taylor expanded in b around 0 64.3%
*-commutative12.5%
Simplified64.3%
if -3.7e9 < b Initial program 98.7%
Taylor expanded in y around 0 80.5%
div-exp69.5%
exp-to-pow70.2%
sub-neg70.2%
metadata-eval70.2%
Simplified70.2%
Taylor expanded in t around 0 50.2%
Taylor expanded in b around 0 38.0%
Final simplification42.7%
(FPCore (x y z t a b) :precision binary64 (if (<= b -3.7) (* (/ x y) (+ 1.0 (* b (+ -1.0 (* b 0.5))))) (/ x (* a (+ y (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -3.7) {
tmp = (x / y) * (1.0 + (b * (-1.0 + (b * 0.5))));
} else {
tmp = x / (a * (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 <= (-3.7d0)) then
tmp = (x / y) * (1.0d0 + (b * ((-1.0d0) + (b * 0.5d0))))
else
tmp = x / (a * (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 <= -3.7) {
tmp = (x / y) * (1.0 + (b * (-1.0 + (b * 0.5))));
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -3.7: tmp = (x / y) * (1.0 + (b * (-1.0 + (b * 0.5)))) else: tmp = x / (a * (y + (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -3.7) tmp = Float64(Float64(x / y) * Float64(1.0 + Float64(b * Float64(-1.0 + Float64(b * 0.5))))); else tmp = Float64(x / Float64(a * Float64(y + Float64(y * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -3.7) tmp = (x / y) * (1.0 + (b * (-1.0 + (b * 0.5)))); else tmp = x / (a * (y + (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -3.7], N[(N[(x / y), $MachinePrecision] * N[(1.0 + N[(b * N[(-1.0 + N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.7:\\
\;\;\;\;\frac{x}{y} \cdot \left(1 + b \cdot \left(-1 + b \cdot 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\end{array}
\end{array}
if b < -3.7000000000000002Initial program 100.0%
*-commutative100.0%
associate-/l*93.5%
associate--l+93.5%
fma-define93.5%
sub-neg93.5%
metadata-eval93.5%
Simplified93.5%
Taylor expanded in b around inf 80.7%
neg-mul-180.7%
Simplified80.7%
Taylor expanded in b around 0 60.0%
if -3.7000000000000002 < b Initial program 98.7%
Taylor expanded in y around 0 80.5%
div-exp69.5%
exp-to-pow70.2%
sub-neg70.2%
metadata-eval70.2%
Simplified70.2%
Taylor expanded in t around 0 50.2%
Taylor expanded in b around 0 38.0%
Final simplification41.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1450000.0) (- (/ x y) (/ (* x b) y)) (/ x (* a (+ y (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1450000.0) {
tmp = (x / y) - ((x * b) / y);
} else {
tmp = x / (a * (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 <= (-1450000.0d0)) then
tmp = (x / y) - ((x * b) / y)
else
tmp = x / (a * (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 <= -1450000.0) {
tmp = (x / y) - ((x * b) / y);
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1450000.0: tmp = (x / y) - ((x * b) / y) else: tmp = x / (a * (y + (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1450000.0) tmp = Float64(Float64(x / y) - Float64(Float64(x * b) / y)); else tmp = Float64(x / Float64(a * Float64(y + Float64(y * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1450000.0) tmp = (x / y) - ((x * b) / y); else tmp = x / (a * (y + (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1450000.0], N[(N[(x / y), $MachinePrecision] - N[(N[(x * b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1450000:\\
\;\;\;\;\frac{x}{y} - \frac{x \cdot b}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\end{array}
\end{array}
if b < -1.45e6Initial program 100.0%
*-commutative100.0%
associate-/l*93.5%
associate--l+93.5%
fma-define93.5%
sub-neg93.5%
metadata-eval93.5%
Simplified93.5%
Taylor expanded in b around inf 80.7%
neg-mul-180.7%
Simplified80.7%
Taylor expanded in b around 0 41.6%
if -1.45e6 < b Initial program 98.7%
Taylor expanded in y around 0 80.5%
div-exp69.5%
exp-to-pow70.2%
sub-neg70.2%
metadata-eval70.2%
Simplified70.2%
Taylor expanded in t around 0 50.2%
Taylor expanded in b around 0 38.0%
Final simplification38.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b -5.5) (- (/ x y) (* x (/ b y))) (/ x (* a (+ y (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -5.5) {
tmp = (x / y) - (x * (b / y));
} else {
tmp = x / (a * (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 <= (-5.5d0)) then
tmp = (x / y) - (x * (b / y))
else
tmp = x / (a * (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 <= -5.5) {
tmp = (x / y) - (x * (b / y));
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -5.5: tmp = (x / y) - (x * (b / y)) else: tmp = x / (a * (y + (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -5.5) tmp = Float64(Float64(x / y) - Float64(x * Float64(b / y))); else tmp = Float64(x / Float64(a * Float64(y + Float64(y * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -5.5) tmp = (x / y) - (x * (b / y)); else tmp = x / (a * (y + (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -5.5], N[(N[(x / y), $MachinePrecision] - N[(x * N[(b / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.5:\\
\;\;\;\;\frac{x}{y} - x \cdot \frac{b}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\end{array}
\end{array}
if b < -5.5Initial program 100.0%
*-commutative100.0%
associate-/l*93.5%
associate--l+93.5%
fma-define93.5%
sub-neg93.5%
metadata-eval93.5%
Simplified93.5%
Taylor expanded in b around inf 80.7%
neg-mul-180.7%
Simplified80.7%
Taylor expanded in b around 0 58.1%
Taylor expanded in b around 0 41.6%
associate-*r/41.6%
*-commutative41.6%
neg-mul-141.6%
distribute-rgt-neg-out41.6%
associate-/l*39.7%
Simplified39.7%
if -5.5 < b Initial program 98.7%
Taylor expanded in y around 0 80.5%
div-exp69.5%
exp-to-pow70.2%
sub-neg70.2%
metadata-eval70.2%
Simplified70.2%
Taylor expanded in t around 0 50.2%
Taylor expanded in b around 0 38.0%
Final simplification38.3%
(FPCore (x y z t a b) :precision binary64 (if (<= b -7.6) (* (/ x y) (- 1.0 b)) (/ x (* a (+ y (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -7.6) {
tmp = (x / y) * (1.0 - b);
} else {
tmp = x / (a * (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 <= (-7.6d0)) then
tmp = (x / y) * (1.0d0 - b)
else
tmp = x / (a * (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 <= -7.6) {
tmp = (x / y) * (1.0 - b);
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -7.6: tmp = (x / y) * (1.0 - b) else: tmp = x / (a * (y + (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -7.6) tmp = Float64(Float64(x / y) * Float64(1.0 - b)); else tmp = Float64(x / Float64(a * Float64(y + Float64(y * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -7.6) tmp = (x / y) * (1.0 - b); else tmp = x / (a * (y + (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -7.6], N[(N[(x / y), $MachinePrecision] * N[(1.0 - b), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.6:\\
\;\;\;\;\frac{x}{y} \cdot \left(1 - b\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\end{array}
\end{array}
if b < -7.5999999999999996Initial program 100.0%
*-commutative100.0%
associate-/l*93.5%
associate--l+93.5%
fma-define93.5%
sub-neg93.5%
metadata-eval93.5%
Simplified93.5%
Taylor expanded in b around inf 80.7%
neg-mul-180.7%
Simplified80.7%
Taylor expanded in b around 0 29.7%
neg-mul-129.7%
unsub-neg29.7%
Simplified29.7%
if -7.5999999999999996 < b Initial program 98.7%
Taylor expanded in y around 0 80.5%
div-exp69.5%
exp-to-pow70.2%
sub-neg70.2%
metadata-eval70.2%
Simplified70.2%
Taylor expanded in t around 0 50.2%
Taylor expanded in b around 0 38.0%
Final simplification36.5%
(FPCore (x y z t a b) :precision binary64 (if (<= b -5.5e+139) (* (/ x y) (- 1.0 b)) (/ x (* y a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -5.5e+139) {
tmp = (x / y) * (1.0 - b);
} 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 (b <= (-5.5d+139)) then
tmp = (x / y) * (1.0d0 - b)
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 (b <= -5.5e+139) {
tmp = (x / y) * (1.0 - b);
} else {
tmp = x / (y * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -5.5e+139: tmp = (x / y) * (1.0 - b) else: tmp = x / (y * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -5.5e+139) tmp = Float64(Float64(x / y) * Float64(1.0 - b)); 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 (b <= -5.5e+139) tmp = (x / y) * (1.0 - b); else tmp = x / (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -5.5e+139], N[(N[(x / y), $MachinePrecision] * N[(1.0 - b), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.5 \cdot 10^{+139}:\\
\;\;\;\;\frac{x}{y} \cdot \left(1 - b\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\end{array}
\end{array}
if b < -5.4999999999999996e139Initial program 100.0%
*-commutative100.0%
associate-/l*88.9%
associate--l+88.9%
fma-define88.9%
sub-neg88.9%
metadata-eval88.9%
Simplified88.9%
Taylor expanded in b around inf 88.9%
neg-mul-188.9%
Simplified88.9%
Taylor expanded in b around 0 37.5%
neg-mul-137.5%
unsub-neg37.5%
Simplified37.5%
if -5.4999999999999996e139 < b Initial program 98.8%
Taylor expanded in y around 0 82.1%
div-exp68.1%
exp-to-pow68.8%
sub-neg68.8%
metadata-eval68.8%
Simplified68.8%
Taylor expanded in t around 0 51.7%
Taylor expanded in b around 0 28.2%
Final simplification29.2%
(FPCore (x y z t a b) :precision binary64 (/ x (* y a)))
double code(double x, double y, double z, double t, double a, double b) {
return x / (y * a);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x / (y * a)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / (y * a);
}
def code(x, y, z, t, a, b): return x / (y * a)
function code(x, y, z, t, a, b) return Float64(x / Float64(y * a)) end
function tmp = code(x, y, z, t, a, b) tmp = x / (y * a); end
code[x_, y_, z_, t_, a_, b_] := N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y \cdot a}
\end{array}
Initial program 98.9%
Taylor expanded in y around 0 84.0%
div-exp69.1%
exp-to-pow69.7%
sub-neg69.7%
metadata-eval69.7%
Simplified69.7%
Taylor expanded in t around 0 56.4%
Taylor expanded in b around 0 26.4%
Final simplification26.4%
(FPCore (x y z t a b) :precision binary64 (/ 1.0 (/ y x)))
double code(double x, double y, double z, double t, double a, double b) {
return 1.0 / (y / x);
}
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 = 1.0d0 / (y / x)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return 1.0 / (y / x);
}
def code(x, y, z, t, a, b): return 1.0 / (y / x)
function code(x, y, z, t, a, b) return Float64(1.0 / Float64(y / x)) end
function tmp = code(x, y, z, t, a, b) tmp = 1.0 / (y / x); end
code[x_, y_, z_, t_, a_, b_] := N[(1.0 / N[(y / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{\frac{y}{x}}
\end{array}
Initial program 98.9%
*-commutative98.9%
associate-/l*87.0%
associate--l+87.0%
fma-define87.0%
sub-neg87.0%
metadata-eval87.0%
Simplified87.0%
Taylor expanded in b around inf 41.4%
neg-mul-141.4%
Simplified41.4%
Taylor expanded in b around 0 14.8%
clear-num15.0%
inv-pow15.0%
Applied egg-rr15.0%
unpow-115.0%
Simplified15.0%
(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.9%
*-commutative98.9%
associate-/l*87.0%
associate--l+87.0%
fma-define87.0%
sub-neg87.0%
metadata-eval87.0%
Simplified87.0%
Taylor expanded in b around inf 41.4%
neg-mul-141.4%
Simplified41.4%
Taylor expanded in b around 0 14.8%
(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 2024116
(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))