
(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 18 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)) (* (log a) (+ t -1.0))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + (log(a) * (t + -1.0))) - 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)) + (log(a) * (t + (-1.0d0)))) - 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)) + (Math.log(a) * (t + -1.0))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + (math.log(a) * (t + -1.0))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(log(a) * Float64(t + -1.0))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + (log(a) * (t + -1.0))) - 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[Log[a], $MachinePrecision] * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \log a \cdot \left(t + -1\right)\right) - b}}{y}
\end{array}
Initial program 98.0%
Final simplification98.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (exp (- (* y (log z)) b))) y)))
(if (<= b -8.4e+18)
t_1
(if (<= b -3.9e-85)
(* x (/ (pow a (+ t -1.0)) y))
(if (<= b 5.4e-36)
(/ x (* a (* y (pow z (- y)))))
(if (<= b 42.0) (/ (* x (pow a t)) y) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * exp(((y * log(z)) - b))) / y;
double tmp;
if (b <= -8.4e+18) {
tmp = t_1;
} else if (b <= -3.9e-85) {
tmp = x * (pow(a, (t + -1.0)) / y);
} else if (b <= 5.4e-36) {
tmp = x / (a * (y * pow(z, -y)));
} else if (b <= 42.0) {
tmp = (x * pow(a, t)) / 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 * exp(((y * log(z)) - b))) / y
if (b <= (-8.4d+18)) then
tmp = t_1
else if (b <= (-3.9d-85)) then
tmp = x * ((a ** (t + (-1.0d0))) / y)
else if (b <= 5.4d-36) then
tmp = x / (a * (y * (z ** -y)))
else if (b <= 42.0d0) then
tmp = (x * (a ** t)) / 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.exp(((y * Math.log(z)) - b))) / y;
double tmp;
if (b <= -8.4e+18) {
tmp = t_1;
} else if (b <= -3.9e-85) {
tmp = x * (Math.pow(a, (t + -1.0)) / y);
} else if (b <= 5.4e-36) {
tmp = x / (a * (y * Math.pow(z, -y)));
} else if (b <= 42.0) {
tmp = (x * Math.pow(a, t)) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * math.exp(((y * math.log(z)) - b))) / y tmp = 0 if b <= -8.4e+18: tmp = t_1 elif b <= -3.9e-85: tmp = x * (math.pow(a, (t + -1.0)) / y) elif b <= 5.4e-36: tmp = x / (a * (y * math.pow(z, -y))) elif b <= 42.0: tmp = (x * math.pow(a, t)) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * exp(Float64(Float64(y * log(z)) - b))) / y) tmp = 0.0 if (b <= -8.4e+18) tmp = t_1; elseif (b <= -3.9e-85) tmp = Float64(x * Float64((a ^ Float64(t + -1.0)) / y)); elseif (b <= 5.4e-36) tmp = Float64(x / Float64(a * Float64(y * (z ^ Float64(-y))))); elseif (b <= 42.0) tmp = Float64(Float64(x * (a ^ t)) / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x * exp(((y * log(z)) - b))) / y; tmp = 0.0; if (b <= -8.4e+18) tmp = t_1; elseif (b <= -3.9e-85) tmp = x * ((a ^ (t + -1.0)) / y); elseif (b <= 5.4e-36) tmp = x / (a * (y * (z ^ -y))); elseif (b <= 42.0) tmp = (x * (a ^ t)) / 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[Exp[N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[b, -8.4e+18], t$95$1, If[LessEqual[b, -3.9e-85], N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.4e-36], N[(x / N[(a * N[(y * N[Power[z, (-y)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 42.0], N[(N[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot e^{y \cdot \log z - b}}{y}\\
\mathbf{if}\;b \leq -8.4 \cdot 10^{+18}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -3.9 \cdot 10^{-85}:\\
\;\;\;\;x \cdot \frac{{a}^{\left(t + -1\right)}}{y}\\
\mathbf{elif}\;b \leq 5.4 \cdot 10^{-36}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot {z}^{\left(-y\right)}\right)}\\
\mathbf{elif}\;b \leq 42:\\
\;\;\;\;\frac{x \cdot {a}^{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -8.4e18 or 42 < b Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6493.2
Simplified93.2%
if -8.4e18 < b < -3.89999999999999988e-85Initial program 95.1%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
exp-prodN/A
pow-lowering-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6473.5
Simplified73.5%
Taylor expanded in b around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6485.4
Simplified85.4%
if -3.89999999999999988e-85 < b < 5.40000000000000015e-36Initial program 95.9%
Taylor expanded in t around 0
associate-/l*N/A
*-lowering-*.f64N/A
exp-diffN/A
associate-/l/N/A
/-lowering-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
/-lowering-/.f64N/A
*-commutativeN/A
exp-to-powN/A
pow-lowering-pow.f64N/A
rem-exp-logN/A
*-lowering-*.f64N/A
exp-lowering-exp.f6486.4
Simplified86.4%
Taylor expanded in b around 0
/-lowering-/.f64N/A
pow-lowering-pow.f64N/A
*-commutativeN/A
*-lowering-*.f6482.2
Simplified82.2%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
div-invN/A
*-lowering-*.f64N/A
pow-flipN/A
pow-lowering-pow.f64N/A
neg-lowering-neg.f6486.5
Applied egg-rr86.5%
if 5.40000000000000015e-36 < b < 42Initial program 100.0%
Taylor expanded in t around inf
*-commutativeN/A
*-lowering-*.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-log100.0
Simplified100.0%
Taylor expanded in b around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64100.0
Simplified100.0%
Final simplification90.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -7.5e+18)
(/ (* x (exp (- (* y (log z)) b))) y)
(if (<= b -9.6e-85)
(* x (/ (pow a (+ t -1.0)) y))
(if (<= b 3.5e-36)
(/ x (* a (* y (pow z (- y)))))
(/ (* x (exp (- (* t (log a)) b))) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -7.5e+18) {
tmp = (x * exp(((y * log(z)) - b))) / y;
} else if (b <= -9.6e-85) {
tmp = x * (pow(a, (t + -1.0)) / y);
} else if (b <= 3.5e-36) {
tmp = x / (a * (y * pow(z, -y)));
} else {
tmp = (x * exp(((t * 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 (b <= (-7.5d+18)) then
tmp = (x * exp(((y * log(z)) - b))) / y
else if (b <= (-9.6d-85)) then
tmp = x * ((a ** (t + (-1.0d0))) / y)
else if (b <= 3.5d-36) then
tmp = x / (a * (y * (z ** -y)))
else
tmp = (x * exp(((t * 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 (b <= -7.5e+18) {
tmp = (x * Math.exp(((y * Math.log(z)) - b))) / y;
} else if (b <= -9.6e-85) {
tmp = x * (Math.pow(a, (t + -1.0)) / y);
} else if (b <= 3.5e-36) {
tmp = x / (a * (y * Math.pow(z, -y)));
} else {
tmp = (x * Math.exp(((t * Math.log(a)) - b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -7.5e+18: tmp = (x * math.exp(((y * math.log(z)) - b))) / y elif b <= -9.6e-85: tmp = x * (math.pow(a, (t + -1.0)) / y) elif b <= 3.5e-36: tmp = x / (a * (y * math.pow(z, -y))) else: tmp = (x * math.exp(((t * math.log(a)) - b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -7.5e+18) tmp = Float64(Float64(x * exp(Float64(Float64(y * log(z)) - b))) / y); elseif (b <= -9.6e-85) tmp = Float64(x * Float64((a ^ Float64(t + -1.0)) / y)); elseif (b <= 3.5e-36) tmp = Float64(x / Float64(a * Float64(y * (z ^ Float64(-y))))); else tmp = Float64(Float64(x * exp(Float64(Float64(t * log(a)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -7.5e+18) tmp = (x * exp(((y * log(z)) - b))) / y; elseif (b <= -9.6e-85) tmp = x * ((a ^ (t + -1.0)) / y); elseif (b <= 3.5e-36) tmp = x / (a * (y * (z ^ -y))); else tmp = (x * exp(((t * log(a)) - b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -7.5e+18], N[(N[(x * N[Exp[N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, -9.6e-85], N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.5e-36], N[(x / N[(a * N[(y * N[Power[z, (-y)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(t * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.5 \cdot 10^{+18}:\\
\;\;\;\;\frac{x \cdot e^{y \cdot \log z - b}}{y}\\
\mathbf{elif}\;b \leq -9.6 \cdot 10^{-85}:\\
\;\;\;\;x \cdot \frac{{a}^{\left(t + -1\right)}}{y}\\
\mathbf{elif}\;b \leq 3.5 \cdot 10^{-36}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot {z}^{\left(-y\right)}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{t \cdot \log a - b}}{y}\\
\end{array}
\end{array}
if b < -7.5e18Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6495.7
Simplified95.7%
if -7.5e18 < b < -9.6000000000000002e-85Initial program 95.1%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
exp-prodN/A
pow-lowering-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6473.5
Simplified73.5%
Taylor expanded in b around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6485.4
Simplified85.4%
if -9.6000000000000002e-85 < b < 3.5e-36Initial program 95.9%
Taylor expanded in t around 0
associate-/l*N/A
*-lowering-*.f64N/A
exp-diffN/A
associate-/l/N/A
/-lowering-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
/-lowering-/.f64N/A
*-commutativeN/A
exp-to-powN/A
pow-lowering-pow.f64N/A
rem-exp-logN/A
*-lowering-*.f64N/A
exp-lowering-exp.f6486.4
Simplified86.4%
Taylor expanded in b around 0
/-lowering-/.f64N/A
pow-lowering-pow.f64N/A
*-commutativeN/A
*-lowering-*.f6482.2
Simplified82.2%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
div-invN/A
*-lowering-*.f64N/A
pow-flipN/A
pow-lowering-pow.f64N/A
neg-lowering-neg.f6486.5
Applied egg-rr86.5%
if 3.5e-36 < b Initial program 100.0%
Taylor expanded in t around inf
*-commutativeN/A
*-lowering-*.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-log97.1
Simplified97.1%
Final simplification91.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (pow z y)) y)) (t_2 (pow a (+ t -1.0))))
(if (<= b -7.2e+108)
(* -0.16666666666666666 (/ (* x (* b (* b b))) y))
(if (<= b -1.12e+28)
t_1
(if (<= b 5.2e-207)
(* x (/ t_2 y))
(if (<= b 1.82e-75)
t_1
(if (<= b 330.0) (* t_2 (/ x y)) (/ x (* y (exp b))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * pow(z, y)) / y;
double t_2 = pow(a, (t + -1.0));
double tmp;
if (b <= -7.2e+108) {
tmp = -0.16666666666666666 * ((x * (b * (b * b))) / y);
} else if (b <= -1.12e+28) {
tmp = t_1;
} else if (b <= 5.2e-207) {
tmp = x * (t_2 / y);
} else if (b <= 1.82e-75) {
tmp = t_1;
} else if (b <= 330.0) {
tmp = t_2 * (x / 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x * (z ** y)) / y
t_2 = a ** (t + (-1.0d0))
if (b <= (-7.2d+108)) then
tmp = (-0.16666666666666666d0) * ((x * (b * (b * b))) / y)
else if (b <= (-1.12d+28)) then
tmp = t_1
else if (b <= 5.2d-207) then
tmp = x * (t_2 / y)
else if (b <= 1.82d-75) then
tmp = t_1
else if (b <= 330.0d0) then
tmp = t_2 * (x / 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 t_1 = (x * Math.pow(z, y)) / y;
double t_2 = Math.pow(a, (t + -1.0));
double tmp;
if (b <= -7.2e+108) {
tmp = -0.16666666666666666 * ((x * (b * (b * b))) / y);
} else if (b <= -1.12e+28) {
tmp = t_1;
} else if (b <= 5.2e-207) {
tmp = x * (t_2 / y);
} else if (b <= 1.82e-75) {
tmp = t_1;
} else if (b <= 330.0) {
tmp = t_2 * (x / y);
} else {
tmp = x / (y * Math.exp(b));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * math.pow(z, y)) / y t_2 = math.pow(a, (t + -1.0)) tmp = 0 if b <= -7.2e+108: tmp = -0.16666666666666666 * ((x * (b * (b * b))) / y) elif b <= -1.12e+28: tmp = t_1 elif b <= 5.2e-207: tmp = x * (t_2 / y) elif b <= 1.82e-75: tmp = t_1 elif b <= 330.0: tmp = t_2 * (x / y) else: tmp = x / (y * math.exp(b)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * (z ^ y)) / y) t_2 = a ^ Float64(t + -1.0) tmp = 0.0 if (b <= -7.2e+108) tmp = Float64(-0.16666666666666666 * Float64(Float64(x * Float64(b * Float64(b * b))) / y)); elseif (b <= -1.12e+28) tmp = t_1; elseif (b <= 5.2e-207) tmp = Float64(x * Float64(t_2 / y)); elseif (b <= 1.82e-75) tmp = t_1; elseif (b <= 330.0) tmp = Float64(t_2 * Float64(x / y)); else tmp = Float64(x / Float64(y * exp(b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x * (z ^ y)) / y; t_2 = a ^ (t + -1.0); tmp = 0.0; if (b <= -7.2e+108) tmp = -0.16666666666666666 * ((x * (b * (b * b))) / y); elseif (b <= -1.12e+28) tmp = t_1; elseif (b <= 5.2e-207) tmp = x * (t_2 / y); elseif (b <= 1.82e-75) tmp = t_1; elseif (b <= 330.0) tmp = t_2 * (x / y); else tmp = x / (y * exp(b)); 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]}, Block[{t$95$2 = N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[b, -7.2e+108], N[(-0.16666666666666666 * N[(N[(x * N[(b * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1.12e+28], t$95$1, If[LessEqual[b, 5.2e-207], N[(x * N[(t$95$2 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.82e-75], t$95$1, If[LessEqual[b, 330.0], N[(t$95$2 * N[(x / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot {z}^{y}}{y}\\
t_2 := {a}^{\left(t + -1\right)}\\
\mathbf{if}\;b \leq -7.2 \cdot 10^{+108}:\\
\;\;\;\;-0.16666666666666666 \cdot \frac{x \cdot \left(b \cdot \left(b \cdot b\right)\right)}{y}\\
\mathbf{elif}\;b \leq -1.12 \cdot 10^{+28}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 5.2 \cdot 10^{-207}:\\
\;\;\;\;x \cdot \frac{t\_2}{y}\\
\mathbf{elif}\;b \leq 1.82 \cdot 10^{-75}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 330:\\
\;\;\;\;t\_2 \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot e^{b}}\\
\end{array}
\end{array}
if b < -7.2e108Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6497.9
Simplified97.9%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f6495.7
Simplified95.7%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6495.7
Simplified95.7%
Taylor expanded in b around inf
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6495.7
Simplified95.7%
if -7.2e108 < b < -1.12e28 or 5.1999999999999998e-207 < b < 1.81999999999999991e-75Initial program 99.5%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6478.7
Simplified78.7%
Taylor expanded in b around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f6475.6
Simplified75.6%
if -1.12e28 < b < 5.1999999999999998e-207Initial program 93.6%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
exp-prodN/A
pow-lowering-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6465.5
Simplified65.5%
Taylor expanded in b around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6471.0
Simplified71.0%
if 1.81999999999999991e-75 < b < 330Initial program 98.7%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
exp-prodN/A
pow-lowering-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6482.7
Simplified82.7%
Taylor expanded in b around 0
Simplified82.7%
associate-/l*N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f6482.9
Applied egg-rr82.9%
if 330 < b Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6490.3
Simplified90.3%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f6487.1
Simplified87.1%
exp-negN/A
un-div-invN/A
associate-/l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6487.1
Applied egg-rr87.1%
Final simplification81.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (pow z y)) y)) (t_2 (* x (/ (pow a (+ t -1.0)) y))))
(if (<= b -7.8e+100)
(* -0.16666666666666666 (/ (* x (* b (* b b))) y))
(if (<= b -6.5e+27)
t_1
(if (<= b 1e-211)
t_2
(if (<= b 1.82e-75)
t_1
(if (<= b 720.0) t_2 (/ x (* y (exp b))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * pow(z, y)) / y;
double t_2 = x * (pow(a, (t + -1.0)) / y);
double tmp;
if (b <= -7.8e+100) {
tmp = -0.16666666666666666 * ((x * (b * (b * b))) / y);
} else if (b <= -6.5e+27) {
tmp = t_1;
} else if (b <= 1e-211) {
tmp = t_2;
} else if (b <= 1.82e-75) {
tmp = t_1;
} else if (b <= 720.0) {
tmp = t_2;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x * (z ** y)) / y
t_2 = x * ((a ** (t + (-1.0d0))) / y)
if (b <= (-7.8d+100)) then
tmp = (-0.16666666666666666d0) * ((x * (b * (b * b))) / y)
else if (b <= (-6.5d+27)) then
tmp = t_1
else if (b <= 1d-211) then
tmp = t_2
else if (b <= 1.82d-75) then
tmp = t_1
else if (b <= 720.0d0) then
tmp = t_2
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 t_1 = (x * Math.pow(z, y)) / y;
double t_2 = x * (Math.pow(a, (t + -1.0)) / y);
double tmp;
if (b <= -7.8e+100) {
tmp = -0.16666666666666666 * ((x * (b * (b * b))) / y);
} else if (b <= -6.5e+27) {
tmp = t_1;
} else if (b <= 1e-211) {
tmp = t_2;
} else if (b <= 1.82e-75) {
tmp = t_1;
} else if (b <= 720.0) {
tmp = t_2;
} else {
tmp = x / (y * Math.exp(b));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * math.pow(z, y)) / y t_2 = x * (math.pow(a, (t + -1.0)) / y) tmp = 0 if b <= -7.8e+100: tmp = -0.16666666666666666 * ((x * (b * (b * b))) / y) elif b <= -6.5e+27: tmp = t_1 elif b <= 1e-211: tmp = t_2 elif b <= 1.82e-75: tmp = t_1 elif b <= 720.0: tmp = t_2 else: tmp = x / (y * math.exp(b)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * (z ^ y)) / y) t_2 = Float64(x * Float64((a ^ Float64(t + -1.0)) / y)) tmp = 0.0 if (b <= -7.8e+100) tmp = Float64(-0.16666666666666666 * Float64(Float64(x * Float64(b * Float64(b * b))) / y)); elseif (b <= -6.5e+27) tmp = t_1; elseif (b <= 1e-211) tmp = t_2; elseif (b <= 1.82e-75) tmp = t_1; elseif (b <= 720.0) tmp = t_2; else tmp = Float64(x / Float64(y * exp(b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x * (z ^ y)) / y; t_2 = x * ((a ^ (t + -1.0)) / y); tmp = 0.0; if (b <= -7.8e+100) tmp = -0.16666666666666666 * ((x * (b * (b * b))) / y); elseif (b <= -6.5e+27) tmp = t_1; elseif (b <= 1e-211) tmp = t_2; elseif (b <= 1.82e-75) tmp = t_1; elseif (b <= 720.0) tmp = t_2; else tmp = x / (y * exp(b)); 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]}, Block[{t$95$2 = N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -7.8e+100], N[(-0.16666666666666666 * N[(N[(x * N[(b * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -6.5e+27], t$95$1, If[LessEqual[b, 1e-211], t$95$2, If[LessEqual[b, 1.82e-75], t$95$1, If[LessEqual[b, 720.0], t$95$2, N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot {z}^{y}}{y}\\
t_2 := x \cdot \frac{{a}^{\left(t + -1\right)}}{y}\\
\mathbf{if}\;b \leq -7.8 \cdot 10^{+100}:\\
\;\;\;\;-0.16666666666666666 \cdot \frac{x \cdot \left(b \cdot \left(b \cdot b\right)\right)}{y}\\
\mathbf{elif}\;b \leq -6.5 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 10^{-211}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 1.82 \cdot 10^{-75}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 720:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot e^{b}}\\
\end{array}
\end{array}
if b < -7.8e100Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6497.9
Simplified97.9%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f6495.7
Simplified95.7%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6495.7
Simplified95.7%
Taylor expanded in b around inf
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6495.7
Simplified95.7%
if -7.8e100 < b < -6.5000000000000005e27 or 1.00000000000000009e-211 < b < 1.81999999999999991e-75Initial program 99.5%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6478.7
Simplified78.7%
Taylor expanded in b around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f6475.6
Simplified75.6%
if -6.5000000000000005e27 < b < 1.00000000000000009e-211 or 1.81999999999999991e-75 < b < 720Initial program 94.6%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
exp-prodN/A
pow-lowering-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6468.7
Simplified68.7%
Taylor expanded in b around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6473.2
Simplified73.2%
if 720 < b Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6490.3
Simplified90.3%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f6487.1
Simplified87.1%
exp-negN/A
un-div-invN/A
associate-/l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6487.1
Applied egg-rr87.1%
Final simplification81.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (pow a t)) y)) (t_2 (/ x (* y (exp b)))))
(if (<= b -1e+41)
t_2
(if (<= b -6e-81)
t_1
(if (<= b 1.6e-225) (* x (/ (/ 1.0 y) a)) (if (<= b 700.0) 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 / (y * exp(b));
double tmp;
if (b <= -1e+41) {
tmp = t_2;
} else if (b <= -6e-81) {
tmp = t_1;
} else if (b <= 1.6e-225) {
tmp = x * ((1.0 / y) / a);
} else if (b <= 700.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x * (a ** t)) / y
t_2 = x / (y * exp(b))
if (b <= (-1d+41)) then
tmp = t_2
else if (b <= (-6d-81)) then
tmp = t_1
else if (b <= 1.6d-225) then
tmp = x * ((1.0d0 / y) / a)
else if (b <= 700.0d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * Math.pow(a, t)) / y;
double t_2 = x / (y * Math.exp(b));
double tmp;
if (b <= -1e+41) {
tmp = t_2;
} else if (b <= -6e-81) {
tmp = t_1;
} else if (b <= 1.6e-225) {
tmp = x * ((1.0 / y) / a);
} else if (b <= 700.0) {
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 / (y * math.exp(b)) tmp = 0 if b <= -1e+41: tmp = t_2 elif b <= -6e-81: tmp = t_1 elif b <= 1.6e-225: tmp = x * ((1.0 / y) / a) elif b <= 700.0: 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(x / Float64(y * exp(b))) tmp = 0.0 if (b <= -1e+41) tmp = t_2; elseif (b <= -6e-81) tmp = t_1; elseif (b <= 1.6e-225) tmp = Float64(x * Float64(Float64(1.0 / y) / a)); elseif (b <= 700.0) 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 / (y * exp(b)); tmp = 0.0; if (b <= -1e+41) tmp = t_2; elseif (b <= -6e-81) tmp = t_1; elseif (b <= 1.6e-225) tmp = x * ((1.0 / y) / a); elseif (b <= 700.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1e+41], t$95$2, If[LessEqual[b, -6e-81], t$95$1, If[LessEqual[b, 1.6e-225], N[(x * N[(N[(1.0 / y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 700.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot {a}^{t}}{y}\\
t_2 := \frac{x}{y \cdot e^{b}}\\
\mathbf{if}\;b \leq -1 \cdot 10^{+41}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -6 \cdot 10^{-81}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.6 \cdot 10^{-225}:\\
\;\;\;\;x \cdot \frac{\frac{1}{y}}{a}\\
\mathbf{elif}\;b \leq 700:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -1.00000000000000001e41 or 700 < b Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6492.7
Simplified92.7%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f6487.9
Simplified87.9%
exp-negN/A
un-div-invN/A
associate-/l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6487.9
Applied egg-rr87.9%
if -1.00000000000000001e41 < b < -5.9999999999999998e-81 or 1.59999999999999987e-225 < b < 700Initial program 98.1%
Taylor expanded in t around inf
*-commutativeN/A
*-lowering-*.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-log59.2
Simplified59.2%
Taylor expanded in b around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f6457.1
Simplified57.1%
if -5.9999999999999998e-81 < b < 1.59999999999999987e-225Initial program 92.1%
Taylor expanded in t around 0
associate-/l*N/A
*-lowering-*.f64N/A
exp-diffN/A
associate-/l/N/A
/-lowering-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
/-lowering-/.f64N/A
*-commutativeN/A
exp-to-powN/A
pow-lowering-pow.f64N/A
rem-exp-logN/A
*-lowering-*.f64N/A
exp-lowering-exp.f6486.6
Simplified86.6%
Taylor expanded in b around 0
/-lowering-/.f64N/A
pow-lowering-pow.f64N/A
*-commutativeN/A
*-lowering-*.f6486.6
Simplified86.6%
Taylor expanded in y around 0
Simplified54.0%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6454.1
Applied egg-rr54.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (pow z y)) y)))
(if (<= y -28000.0)
t_1
(if (<= y 5e-160)
(/ x (* a (* y (exp b))))
(if (<= y 1e+122) (* x (/ (pow a (+ t -1.0)) 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 <= -28000.0) {
tmp = t_1;
} else if (y <= 5e-160) {
tmp = x / (a * (y * exp(b)));
} else if (y <= 1e+122) {
tmp = x * (pow(a, (t + -1.0)) / 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 <= (-28000.0d0)) then
tmp = t_1
else if (y <= 5d-160) then
tmp = x / (a * (y * exp(b)))
else if (y <= 1d+122) then
tmp = x * ((a ** (t + (-1.0d0))) / 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 <= -28000.0) {
tmp = t_1;
} else if (y <= 5e-160) {
tmp = x / (a * (y * Math.exp(b)));
} else if (y <= 1e+122) {
tmp = x * (Math.pow(a, (t + -1.0)) / 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 <= -28000.0: tmp = t_1 elif y <= 5e-160: tmp = x / (a * (y * math.exp(b))) elif y <= 1e+122: tmp = x * (math.pow(a, (t + -1.0)) / 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 <= -28000.0) tmp = t_1; elseif (y <= 5e-160) tmp = Float64(x / Float64(a * Float64(y * exp(b)))); elseif (y <= 1e+122) tmp = Float64(x * Float64((a ^ Float64(t + -1.0)) / 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 <= -28000.0) tmp = t_1; elseif (y <= 5e-160) tmp = x / (a * (y * exp(b))); elseif (y <= 1e+122) tmp = x * ((a ^ (t + -1.0)) / 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, -28000.0], t$95$1, If[LessEqual[y, 5e-160], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e+122], N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot {z}^{y}}{y}\\
\mathbf{if}\;y \leq -28000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 5 \cdot 10^{-160}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{elif}\;y \leq 10^{+122}:\\
\;\;\;\;x \cdot \frac{{a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -28000 or 1.00000000000000001e122 < y Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6494.8
Simplified94.8%
Taylor expanded in b around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f6484.3
Simplified84.3%
if -28000 < y < 4.99999999999999994e-160Initial program 94.6%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
exp-prodN/A
pow-lowering-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6481.0
Simplified81.0%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6485.5
Simplified85.5%
if 4.99999999999999994e-160 < y < 1.00000000000000001e122Initial program 99.6%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
exp-prodN/A
pow-lowering-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6469.2
Simplified69.2%
Taylor expanded in b around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6469.8
Simplified69.8%
Final simplification81.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -4e+109)
(* -0.16666666666666666 (/ (* x (* b (* b b))) y))
(if (<= b 2.1e-36)
(/ x (* a (* y (pow z (- y)))))
(if (<= b 1300.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 (b <= -4e+109) {
tmp = -0.16666666666666666 * ((x * (b * (b * b))) / y);
} else if (b <= 2.1e-36) {
tmp = x / (a * (y * pow(z, -y)));
} else if (b <= 1300.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 (b <= (-4d+109)) then
tmp = (-0.16666666666666666d0) * ((x * (b * (b * b))) / y)
else if (b <= 2.1d-36) then
tmp = x / (a * (y * (z ** -y)))
else if (b <= 1300.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 (b <= -4e+109) {
tmp = -0.16666666666666666 * ((x * (b * (b * b))) / y);
} else if (b <= 2.1e-36) {
tmp = x / (a * (y * Math.pow(z, -y)));
} else if (b <= 1300.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 b <= -4e+109: tmp = -0.16666666666666666 * ((x * (b * (b * b))) / y) elif b <= 2.1e-36: tmp = x / (a * (y * math.pow(z, -y))) elif b <= 1300.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 (b <= -4e+109) tmp = Float64(-0.16666666666666666 * Float64(Float64(x * Float64(b * Float64(b * b))) / y)); elseif (b <= 2.1e-36) tmp = Float64(x / Float64(a * Float64(y * (z ^ Float64(-y))))); elseif (b <= 1300.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 (b <= -4e+109) tmp = -0.16666666666666666 * ((x * (b * (b * b))) / y); elseif (b <= 2.1e-36) tmp = x / (a * (y * (z ^ -y))); elseif (b <= 1300.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[LessEqual[b, -4e+109], N[(-0.16666666666666666 * N[(N[(x * N[(b * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.1e-36], N[(x / N[(a * N[(y * N[Power[z, (-y)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1300.0], 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}\;b \leq -4 \cdot 10^{+109}:\\
\;\;\;\;-0.16666666666666666 \cdot \frac{x \cdot \left(b \cdot \left(b \cdot b\right)\right)}{y}\\
\mathbf{elif}\;b \leq 2.1 \cdot 10^{-36}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot {z}^{\left(-y\right)}\right)}\\
\mathbf{elif}\;b \leq 1300:\\
\;\;\;\;\frac{x \cdot {a}^{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot e^{b}}\\
\end{array}
\end{array}
if b < -3.99999999999999993e109Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6497.9
Simplified97.9%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f6495.7
Simplified95.7%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6495.7
Simplified95.7%
Taylor expanded in b around inf
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6495.7
Simplified95.7%
if -3.99999999999999993e109 < b < 2.09999999999999991e-36Initial program 96.4%
Taylor expanded in t around 0
associate-/l*N/A
*-lowering-*.f64N/A
exp-diffN/A
associate-/l/N/A
/-lowering-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
/-lowering-/.f64N/A
*-commutativeN/A
exp-to-powN/A
pow-lowering-pow.f64N/A
rem-exp-logN/A
*-lowering-*.f64N/A
exp-lowering-exp.f6475.8
Simplified75.8%
Taylor expanded in b around 0
/-lowering-/.f64N/A
pow-lowering-pow.f64N/A
*-commutativeN/A
*-lowering-*.f6478.1
Simplified78.1%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
div-invN/A
*-lowering-*.f64N/A
pow-flipN/A
pow-lowering-pow.f64N/A
neg-lowering-neg.f6481.6
Applied egg-rr81.6%
if 2.09999999999999991e-36 < b < 1300Initial program 100.0%
Taylor expanded in t around inf
*-commutativeN/A
*-lowering-*.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-log100.0
Simplified100.0%
Taylor expanded in b around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64100.0
Simplified100.0%
if 1300 < b Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6490.3
Simplified90.3%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f6487.1
Simplified87.1%
exp-negN/A
un-div-invN/A
associate-/l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6487.1
Applied egg-rr87.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (* y (exp b)))))
(if (<= b -1e+76)
t_1
(if (<= b 5.8e-36)
(* x (/ (pow z y) (* y a)))
(if (<= b 950.0) (/ (* x (pow a t)) y) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (y * exp(b));
double tmp;
if (b <= -1e+76) {
tmp = t_1;
} else if (b <= 5.8e-36) {
tmp = x * (pow(z, y) / (y * a));
} else if (b <= 950.0) {
tmp = (x * pow(a, t)) / y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (y * exp(b))
if (b <= (-1d+76)) then
tmp = t_1
else if (b <= 5.8d-36) then
tmp = x * ((z ** y) / (y * a))
else if (b <= 950.0d0) then
tmp = (x * (a ** t)) / y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (y * Math.exp(b));
double tmp;
if (b <= -1e+76) {
tmp = t_1;
} else if (b <= 5.8e-36) {
tmp = x * (Math.pow(z, y) / (y * a));
} else if (b <= 950.0) {
tmp = (x * Math.pow(a, t)) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (y * math.exp(b)) tmp = 0 if b <= -1e+76: tmp = t_1 elif b <= 5.8e-36: tmp = x * (math.pow(z, y) / (y * a)) elif b <= 950.0: tmp = (x * math.pow(a, t)) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(y * exp(b))) tmp = 0.0 if (b <= -1e+76) tmp = t_1; elseif (b <= 5.8e-36) tmp = Float64(x * Float64((z ^ y) / Float64(y * a))); elseif (b <= 950.0) tmp = Float64(Float64(x * (a ^ t)) / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (y * exp(b)); tmp = 0.0; if (b <= -1e+76) tmp = t_1; elseif (b <= 5.8e-36) tmp = x * ((z ^ y) / (y * a)); elseif (b <= 950.0) tmp = (x * (a ^ t)) / y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1e+76], t$95$1, If[LessEqual[b, 5.8e-36], N[(x * N[(N[Power[z, y], $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 950.0], N[(N[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y \cdot e^{b}}\\
\mathbf{if}\;b \leq -1 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 5.8 \cdot 10^{-36}:\\
\;\;\;\;x \cdot \frac{{z}^{y}}{y \cdot a}\\
\mathbf{elif}\;b \leq 950:\\
\;\;\;\;\frac{x \cdot {a}^{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1e76 or 950 < b Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6493.2
Simplified93.2%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f6488.9
Simplified88.9%
exp-negN/A
un-div-invN/A
associate-/l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6488.9
Applied egg-rr88.9%
if -1e76 < b < 5.80000000000000026e-36Initial program 96.2%
Taylor expanded in t around 0
associate-/l*N/A
*-lowering-*.f64N/A
exp-diffN/A
associate-/l/N/A
/-lowering-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
/-lowering-/.f64N/A
*-commutativeN/A
exp-to-powN/A
pow-lowering-pow.f64N/A
rem-exp-logN/A
*-lowering-*.f64N/A
exp-lowering-exp.f6477.3
Simplified77.3%
Taylor expanded in b around 0
/-lowering-/.f64N/A
pow-lowering-pow.f64N/A
*-commutativeN/A
*-lowering-*.f6479.7
Simplified79.7%
if 5.80000000000000026e-36 < b < 950Initial program 100.0%
Taylor expanded in t around inf
*-commutativeN/A
*-lowering-*.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-log100.0
Simplified100.0%
Taylor expanded in b around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64100.0
Simplified100.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -5.6e+102)
(* -0.16666666666666666 (/ (* x (* b (* b b))) y))
(if (<= b 5.1e-39)
(/ (* x (pow z y)) y)
(if (<= b 105000.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 (b <= -5.6e+102) {
tmp = -0.16666666666666666 * ((x * (b * (b * b))) / y);
} else if (b <= 5.1e-39) {
tmp = (x * pow(z, y)) / y;
} else if (b <= 105000.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 (b <= (-5.6d+102)) then
tmp = (-0.16666666666666666d0) * ((x * (b * (b * b))) / y)
else if (b <= 5.1d-39) then
tmp = (x * (z ** y)) / y
else if (b <= 105000.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 (b <= -5.6e+102) {
tmp = -0.16666666666666666 * ((x * (b * (b * b))) / y);
} else if (b <= 5.1e-39) {
tmp = (x * Math.pow(z, y)) / y;
} else if (b <= 105000.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 b <= -5.6e+102: tmp = -0.16666666666666666 * ((x * (b * (b * b))) / y) elif b <= 5.1e-39: tmp = (x * math.pow(z, y)) / y elif b <= 105000.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 (b <= -5.6e+102) tmp = Float64(-0.16666666666666666 * Float64(Float64(x * Float64(b * Float64(b * b))) / y)); elseif (b <= 5.1e-39) tmp = Float64(Float64(x * (z ^ y)) / y); elseif (b <= 105000.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 (b <= -5.6e+102) tmp = -0.16666666666666666 * ((x * (b * (b * b))) / y); elseif (b <= 5.1e-39) tmp = (x * (z ^ y)) / y; elseif (b <= 105000.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[LessEqual[b, -5.6e+102], N[(-0.16666666666666666 * N[(N[(x * N[(b * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.1e-39], N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 105000.0], 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}\;b \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;-0.16666666666666666 \cdot \frac{x \cdot \left(b \cdot \left(b \cdot b\right)\right)}{y}\\
\mathbf{elif}\;b \leq 5.1 \cdot 10^{-39}:\\
\;\;\;\;\frac{x \cdot {z}^{y}}{y}\\
\mathbf{elif}\;b \leq 105000:\\
\;\;\;\;\frac{x \cdot {a}^{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot e^{b}}\\
\end{array}
\end{array}
if b < -5.60000000000000037e102Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6497.9
Simplified97.9%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f6495.7
Simplified95.7%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6495.7
Simplified95.7%
Taylor expanded in b around inf
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6495.7
Simplified95.7%
if -5.60000000000000037e102 < b < 5.09999999999999988e-39Initial program 96.4%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6465.1
Simplified65.1%
Taylor expanded in b around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f6462.4
Simplified62.4%
if 5.09999999999999988e-39 < b < 105000Initial program 100.0%
Taylor expanded in t around inf
*-commutativeN/A
*-lowering-*.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-log100.0
Simplified100.0%
Taylor expanded in b around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64100.0
Simplified100.0%
if 105000 < b Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6490.3
Simplified90.3%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f6487.1
Simplified87.1%
exp-negN/A
un-div-invN/A
associate-/l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6487.1
Applied egg-rr87.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (* y (exp b)))))
(if (<= b -230.0)
t_1
(if (<= b 1.55e-205)
(- (/ -1.0 (* a (/ y x))))
(if (<= b 1.36e-73)
(* -0.16666666666666666 (/ (* x (* b (* b b))) y))
t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (y * exp(b));
double tmp;
if (b <= -230.0) {
tmp = t_1;
} else if (b <= 1.55e-205) {
tmp = -(-1.0 / (a * (y / x)));
} else if (b <= 1.36e-73) {
tmp = -0.16666666666666666 * ((x * (b * (b * b))) / y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (y * exp(b))
if (b <= (-230.0d0)) then
tmp = t_1
else if (b <= 1.55d-205) then
tmp = -((-1.0d0) / (a * (y / x)))
else if (b <= 1.36d-73) then
tmp = (-0.16666666666666666d0) * ((x * (b * (b * b))) / y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (y * Math.exp(b));
double tmp;
if (b <= -230.0) {
tmp = t_1;
} else if (b <= 1.55e-205) {
tmp = -(-1.0 / (a * (y / x)));
} else if (b <= 1.36e-73) {
tmp = -0.16666666666666666 * ((x * (b * (b * b))) / y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (y * math.exp(b)) tmp = 0 if b <= -230.0: tmp = t_1 elif b <= 1.55e-205: tmp = -(-1.0 / (a * (y / x))) elif b <= 1.36e-73: tmp = -0.16666666666666666 * ((x * (b * (b * b))) / y) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(y * exp(b))) tmp = 0.0 if (b <= -230.0) tmp = t_1; elseif (b <= 1.55e-205) tmp = Float64(-Float64(-1.0 / Float64(a * Float64(y / x)))); elseif (b <= 1.36e-73) tmp = Float64(-0.16666666666666666 * Float64(Float64(x * Float64(b * Float64(b * b))) / y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (y * exp(b)); tmp = 0.0; if (b <= -230.0) tmp = t_1; elseif (b <= 1.55e-205) tmp = -(-1.0 / (a * (y / x))); elseif (b <= 1.36e-73) tmp = -0.16666666666666666 * ((x * (b * (b * b))) / y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -230.0], t$95$1, If[LessEqual[b, 1.55e-205], (-N[(-1.0 / N[(a * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), If[LessEqual[b, 1.36e-73], N[(-0.16666666666666666 * N[(N[(x * N[(b * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y \cdot e^{b}}\\
\mathbf{if}\;b \leq -230:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.55 \cdot 10^{-205}:\\
\;\;\;\;-\frac{-1}{a \cdot \frac{y}{x}}\\
\mathbf{elif}\;b \leq 1.36 \cdot 10^{-73}:\\
\;\;\;\;-0.16666666666666666 \cdot \frac{x \cdot \left(b \cdot \left(b \cdot b\right)\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -230 or 1.36e-73 < b Initial program 99.9%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6487.2
Simplified87.2%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f6477.0
Simplified77.0%
exp-negN/A
un-div-invN/A
associate-/l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6477.0
Applied egg-rr77.0%
if -230 < b < 1.54999999999999991e-205Initial program 93.0%
Taylor expanded in t around 0
associate-/l*N/A
*-lowering-*.f64N/A
exp-diffN/A
associate-/l/N/A
/-lowering-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
/-lowering-/.f64N/A
*-commutativeN/A
exp-to-powN/A
pow-lowering-pow.f64N/A
rem-exp-logN/A
*-lowering-*.f64N/A
exp-lowering-exp.f6482.2
Simplified82.2%
Taylor expanded in b around 0
/-lowering-/.f64N/A
pow-lowering-pow.f64N/A
*-commutativeN/A
*-lowering-*.f6479.3
Simplified79.3%
Taylor expanded in y around 0
Simplified49.1%
associate-*r/N/A
times-fracN/A
clear-numN/A
frac-2negN/A
metadata-evalN/A
frac-timesN/A
metadata-evalN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
neg-lowering-neg.f6450.4
Applied egg-rr50.4%
if 1.54999999999999991e-205 < b < 1.36e-73Initial program 99.2%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6471.4
Simplified71.4%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f6411.1
Simplified11.1%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6411.1
Simplified11.1%
Taylor expanded in b around inf
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6439.4
Simplified39.4%
Final simplification64.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* -0.16666666666666666 (/ (* x (* b (* b b))) y))))
(if (<= b -7.2e+18)
t_1
(if (<= b 7.5e-206)
(/ x (* y a))
(if (<= b 3.4e-75) t_1 (/ -1.0 (* y (/ a (- x)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -0.16666666666666666 * ((x * (b * (b * b))) / y);
double tmp;
if (b <= -7.2e+18) {
tmp = t_1;
} else if (b <= 7.5e-206) {
tmp = x / (y * a);
} else if (b <= 3.4e-75) {
tmp = t_1;
} else {
tmp = -1.0 / (y * (a / -x));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (-0.16666666666666666d0) * ((x * (b * (b * b))) / y)
if (b <= (-7.2d+18)) then
tmp = t_1
else if (b <= 7.5d-206) then
tmp = x / (y * a)
else if (b <= 3.4d-75) then
tmp = t_1
else
tmp = (-1.0d0) / (y * (a / -x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -0.16666666666666666 * ((x * (b * (b * b))) / y);
double tmp;
if (b <= -7.2e+18) {
tmp = t_1;
} else if (b <= 7.5e-206) {
tmp = x / (y * a);
} else if (b <= 3.4e-75) {
tmp = t_1;
} else {
tmp = -1.0 / (y * (a / -x));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -0.16666666666666666 * ((x * (b * (b * b))) / y) tmp = 0 if b <= -7.2e+18: tmp = t_1 elif b <= 7.5e-206: tmp = x / (y * a) elif b <= 3.4e-75: tmp = t_1 else: tmp = -1.0 / (y * (a / -x)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(-0.16666666666666666 * Float64(Float64(x * Float64(b * Float64(b * b))) / y)) tmp = 0.0 if (b <= -7.2e+18) tmp = t_1; elseif (b <= 7.5e-206) tmp = Float64(x / Float64(y * a)); elseif (b <= 3.4e-75) tmp = t_1; else tmp = Float64(-1.0 / Float64(y * Float64(a / Float64(-x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = -0.16666666666666666 * ((x * (b * (b * b))) / y); tmp = 0.0; if (b <= -7.2e+18) tmp = t_1; elseif (b <= 7.5e-206) tmp = x / (y * a); elseif (b <= 3.4e-75) tmp = t_1; else tmp = -1.0 / (y * (a / -x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(-0.16666666666666666 * N[(N[(x * N[(b * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -7.2e+18], t$95$1, If[LessEqual[b, 7.5e-206], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.4e-75], t$95$1, N[(-1.0 / N[(y * N[(a / (-x)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -0.16666666666666666 \cdot \frac{x \cdot \left(b \cdot \left(b \cdot b\right)\right)}{y}\\
\mathbf{if}\;b \leq -7.2 \cdot 10^{+18}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 7.5 \cdot 10^{-206}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\mathbf{elif}\;b \leq 3.4 \cdot 10^{-75}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{y \cdot \frac{a}{-x}}\\
\end{array}
\end{array}
if b < -7.2e18 or 7.5e-206 < b < 3.40000000000000015e-75Initial program 99.7%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6487.5
Simplified87.5%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f6457.7
Simplified57.7%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6456.1
Simplified56.1%
Taylor expanded in b around inf
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.7
Simplified65.7%
if -7.2e18 < b < 7.5e-206Initial program 93.5%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
exp-prodN/A
pow-lowering-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6464.6
Simplified64.6%
Taylor expanded in b around 0
Simplified66.3%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f6448.6
Simplified48.6%
if 3.40000000000000015e-75 < b Initial program 99.7%
Taylor expanded in t around 0
associate-/l*N/A
*-lowering-*.f64N/A
exp-diffN/A
associate-/l/N/A
/-lowering-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
/-lowering-/.f64N/A
*-commutativeN/A
exp-to-powN/A
pow-lowering-pow.f64N/A
rem-exp-logN/A
*-lowering-*.f64N/A
exp-lowering-exp.f6466.6
Simplified66.6%
Taylor expanded in b around 0
/-lowering-/.f64N/A
pow-lowering-pow.f64N/A
*-commutativeN/A
*-lowering-*.f6435.2
Simplified35.2%
Taylor expanded in y around 0
Simplified22.1%
associate-*r/N/A
*-commutativeN/A
times-fracN/A
clear-numN/A
frac-2negN/A
metadata-evalN/A
frac-timesN/A
metadata-evalN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
neg-lowering-neg.f6426.9
Applied egg-rr26.9%
Final simplification49.3%
(FPCore (x y z t a b) :precision binary64 (if (<= b -7.2e+18) (/ (fma x (* b (fma b 0.5 -1.0)) x) y) (/ 1.0 (/ (* y a) x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -7.2e+18) {
tmp = fma(x, (b * fma(b, 0.5, -1.0)), x) / y;
} else {
tmp = 1.0 / ((y * a) / x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -7.2e+18) tmp = Float64(fma(x, Float64(b * fma(b, 0.5, -1.0)), x) / y); else tmp = Float64(1.0 / Float64(Float64(y * a) / x)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -7.2e+18], N[(N[(x * N[(b * N[(b * 0.5 + -1.0), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] / y), $MachinePrecision], N[(1.0 / N[(N[(y * a), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.2 \cdot 10^{+18}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, b \cdot \mathsf{fma}\left(b, 0.5, -1\right), x\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{y \cdot a}{x}}\\
\end{array}
\end{array}
if b < -7.2e18Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6495.8
Simplified95.8%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f6483.1
Simplified83.1%
Taylor expanded in b around 0
+-commutativeN/A
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-outN/A
*-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
sub-negN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f6472.5
Simplified72.5%
if -7.2e18 < b Initial program 97.2%
Taylor expanded in t around 0
associate-/l*N/A
*-lowering-*.f64N/A
exp-diffN/A
associate-/l/N/A
/-lowering-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
/-lowering-/.f64N/A
*-commutativeN/A
exp-to-powN/A
pow-lowering-pow.f64N/A
rem-exp-logN/A
*-lowering-*.f64N/A
exp-lowering-exp.f6475.1
Simplified75.1%
Taylor expanded in b around 0
/-lowering-/.f64N/A
pow-lowering-pow.f64N/A
*-commutativeN/A
*-lowering-*.f6460.5
Simplified60.5%
Taylor expanded in y around 0
Simplified32.7%
un-div-invN/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6433.1
Applied egg-rr33.1%
Final simplification43.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b -7e+18) (/ (- x (* x b)) y) (/ 1.0 (/ (* y a) x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -7e+18) {
tmp = (x - (x * b)) / y;
} else {
tmp = 1.0 / ((y * a) / x);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-7d+18)) then
tmp = (x - (x * b)) / y
else
tmp = 1.0d0 / ((y * a) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -7e+18) {
tmp = (x - (x * b)) / y;
} else {
tmp = 1.0 / ((y * a) / x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -7e+18: tmp = (x - (x * b)) / y else: tmp = 1.0 / ((y * a) / x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -7e+18) tmp = Float64(Float64(x - Float64(x * b)) / y); else tmp = Float64(1.0 / Float64(Float64(y * a) / x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -7e+18) tmp = (x - (x * b)) / y; else tmp = 1.0 / ((y * a) / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -7e+18], N[(N[(x - N[(x * b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(1.0 / N[(N[(y * a), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7 \cdot 10^{+18}:\\
\;\;\;\;\frac{x - x \cdot b}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{y \cdot a}{x}}\\
\end{array}
\end{array}
if b < -7e18Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6495.8
Simplified95.8%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f6483.1
Simplified83.1%
Taylor expanded in b around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6439.9
Simplified39.9%
if -7e18 < b Initial program 97.2%
Taylor expanded in t around 0
associate-/l*N/A
*-lowering-*.f64N/A
exp-diffN/A
associate-/l/N/A
/-lowering-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
exp-diffN/A
/-lowering-/.f64N/A
*-commutativeN/A
exp-to-powN/A
pow-lowering-pow.f64N/A
rem-exp-logN/A
*-lowering-*.f64N/A
exp-lowering-exp.f6475.1
Simplified75.1%
Taylor expanded in b around 0
/-lowering-/.f64N/A
pow-lowering-pow.f64N/A
*-commutativeN/A
*-lowering-*.f6460.5
Simplified60.5%
Taylor expanded in y around 0
Simplified32.7%
un-div-invN/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6433.1
Applied egg-rr33.1%
Final simplification34.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b -7.2e+18) (/ (- x (* x b)) y) (/ x (* y a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -7.2e+18) {
tmp = (x - (x * b)) / y;
} else {
tmp = x / (y * a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-7.2d+18)) then
tmp = (x - (x * b)) / y
else
tmp = x / (y * a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -7.2e+18) {
tmp = (x - (x * b)) / y;
} else {
tmp = x / (y * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -7.2e+18: tmp = (x - (x * b)) / y else: tmp = x / (y * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -7.2e+18) tmp = Float64(Float64(x - Float64(x * b)) / y); else tmp = Float64(x / Float64(y * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -7.2e+18) tmp = (x - (x * b)) / y; else tmp = x / (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -7.2e+18], N[(N[(x - N[(x * b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.2 \cdot 10^{+18}:\\
\;\;\;\;\frac{x - x \cdot b}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\end{array}
\end{array}
if b < -7.2e18Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6495.8
Simplified95.8%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f6483.1
Simplified83.1%
Taylor expanded in b around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6439.9
Simplified39.9%
if -7.2e18 < b Initial program 97.2%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
exp-prodN/A
pow-lowering-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6466.6
Simplified66.6%
Taylor expanded in b around 0
Simplified62.3%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f6432.7
Simplified32.7%
Final simplification34.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.1e+34) (* (/ 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 <= -1.1e+34) {
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 <= (-1.1d+34)) 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 <= -1.1e+34) {
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 <= -1.1e+34: 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 <= -1.1e+34) 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 <= -1.1e+34) 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, -1.1e+34], 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 -1.1 \cdot 10^{+34}:\\
\;\;\;\;\frac{x}{y} \cdot \left(1 - b\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\end{array}
\end{array}
if b < -1.1000000000000001e34Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-lowering-log.f6495.5
Simplified95.5%
Taylor expanded in y around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f6484.9
Simplified84.9%
Taylor expanded in b around 0
associate-/l*N/A
associate-*r*N/A
distribute-lft1-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
neg-mul-1N/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6438.0
Simplified38.0%
if -1.1000000000000001e34 < b Initial program 97.3%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
exp-prodN/A
pow-lowering-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6465.9
Simplified65.9%
Taylor expanded in b around 0
Simplified61.7%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f6432.4
Simplified32.4%
Final simplification33.8%
(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.0%
Taylor expanded in y around 0
*-commutativeN/A
exp-diffN/A
associate-*l/N/A
associate-/l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
exp-prodN/A
pow-lowering-pow.f64N/A
rem-exp-logN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f6465.6
Simplified65.6%
Taylor expanded in b around 0
Simplified56.3%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f6431.4
Simplified31.4%
Final simplification31.4%
(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.0%
Taylor expanded in t around inf
*-commutativeN/A
*-lowering-*.f64N/A
rem-exp-logN/A
log-lowering-log.f64N/A
rem-exp-log71.0
Simplified71.0%
Taylor expanded in b around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f6448.1
Simplified48.1%
Taylor expanded in t around 0
/-lowering-/.f6416.1
Simplified16.1%
(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 2024198
(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))