
(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 22 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.6%
Final simplification98.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.5e-9) (not (<= y 2.35e-37))) (/ (* 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 <= -3.5e-9) || !(y <= 2.35e-37)) {
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 <= (-3.5d-9)) .or. (.not. (y <= 2.35d-37))) 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 <= -3.5e-9) || !(y <= 2.35e-37)) {
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 <= -3.5e-9) or not (y <= 2.35e-37): 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 <= -3.5e-9) || !(y <= 2.35e-37)) 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 <= -3.5e-9) || ~((y <= 2.35e-37))) 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, -3.5e-9], N[Not[LessEqual[y, 2.35e-37]], $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 -3.5 \cdot 10^{-9} \lor \neg \left(y \leq 2.35 \cdot 10^{-37}\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 < -3.4999999999999999e-9 or 2.3500000000000001e-37 < y Initial program 99.6%
Taylor expanded in t around 0 91.7%
mul-1-neg91.7%
Simplified91.7%
if -3.4999999999999999e-9 < y < 2.3500000000000001e-37Initial program 97.5%
Taylor expanded in y around 0 97.3%
Final simplification94.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (+ t -1.0) -1e+37) (not (<= (+ t -1.0) -0.5))) (/ (* x (/ (pow a t) a)) y) (* (/ (pow z y) a) (/ x (* y (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t + -1.0) <= -1e+37) || !((t + -1.0) <= -0.5)) {
tmp = (x * (pow(a, t) / a)) / y;
} else {
tmp = (pow(z, y) / a) * (x / (y * exp(b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (((t + (-1.0d0)) <= (-1d+37)) .or. (.not. ((t + (-1.0d0)) <= (-0.5d0)))) then
tmp = (x * ((a ** t) / a)) / y
else
tmp = ((z ** y) / a) * (x / (y * exp(b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t + -1.0) <= -1e+37) || !((t + -1.0) <= -0.5)) {
tmp = (x * (Math.pow(a, t) / a)) / y;
} else {
tmp = (Math.pow(z, y) / a) * (x / (y * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((t + -1.0) <= -1e+37) or not ((t + -1.0) <= -0.5): tmp = (x * (math.pow(a, t) / a)) / y else: tmp = (math.pow(z, y) / a) * (x / (y * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(t + -1.0) <= -1e+37) || !(Float64(t + -1.0) <= -0.5)) tmp = Float64(Float64(x * Float64((a ^ t) / a)) / y); else tmp = Float64(Float64((z ^ y) / a) * Float64(x / Float64(y * exp(b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((t + -1.0) <= -1e+37) || ~(((t + -1.0) <= -0.5))) tmp = (x * ((a ^ t) / a)) / y; else tmp = ((z ^ y) / a) * (x / (y * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(t + -1.0), $MachinePrecision], -1e+37], N[Not[LessEqual[N[(t + -1.0), $MachinePrecision], -0.5]], $MachinePrecision]], N[(N[(x * N[(N[Power[a, t], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] * N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t + -1 \leq -1 \cdot 10^{+37} \lor \neg \left(t + -1 \leq -0.5\right):\\
\;\;\;\;\frac{x \cdot \frac{{a}^{t}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{{z}^{y}}{a} \cdot \frac{x}{y \cdot e^{b}}\\
\end{array}
\end{array}
if (-.f64 t 1) < -9.99999999999999954e36 or -0.5 < (-.f64 t 1) Initial program 100.0%
Taylor expanded in y around 0 87.9%
Taylor expanded in b around 0 81.9%
expm1-log1p-u81.9%
expm1-udef81.9%
pow-sub81.9%
pow181.9%
Applied egg-rr81.9%
expm1-def81.9%
expm1-log1p81.9%
Simplified81.9%
if -9.99999999999999954e36 < (-.f64 t 1) < -0.5Initial program 97.5%
associate-*l/91.9%
*-commutative91.9%
+-commutative91.9%
associate--l+91.9%
exp-sum91.2%
*-commutative91.2%
exp-to-pow92.1%
sub-neg92.1%
metadata-eval92.1%
exp-diff81.6%
*-commutative81.6%
exp-to-pow81.6%
Simplified81.6%
Taylor expanded in t around 0 84.6%
times-frac85.3%
Simplified85.3%
Final simplification83.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.25e-8) (not (<= y 8.6e+82))) (/ (* x (/ (pow z y) a)) y) (/ (* x (exp (- (* (+ t -1.0) (log a)) b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.25e-8) || !(y <= 8.6e+82)) {
tmp = (x * (pow(z, y) / a)) / y;
} else {
tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.25d-8)) .or. (.not. (y <= 8.6d+82))) then
tmp = (x * ((z ** y) / a)) / y
else
tmp = (x * exp((((t + (-1.0d0)) * log(a)) - b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.25e-8) || !(y <= 8.6e+82)) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else {
tmp = (x * Math.exp((((t + -1.0) * Math.log(a)) - b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.25e-8) or not (y <= 8.6e+82): tmp = (x * (math.pow(z, y) / a)) / y else: tmp = (x * math.exp((((t + -1.0) * math.log(a)) - b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.25e-8) || !(y <= 8.6e+82)) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = Float64(Float64(x * exp(Float64(Float64(Float64(t + -1.0) * log(a)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.25e-8) || ~((y <= 8.6e+82))) tmp = (x * ((z ^ y) / a)) / y; else tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.25e-8], N[Not[LessEqual[y, 8.6e+82]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $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 -1.25 \cdot 10^{-8} \lor \neg \left(y \leq 8.6 \cdot 10^{+82}\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(t + -1\right) \cdot \log a - b}}{y}\\
\end{array}
\end{array}
if y < -1.2499999999999999e-8 or 8.60000000000000029e82 < y Initial program 99.8%
Taylor expanded in t around 0 92.9%
mul-1-neg92.9%
Simplified92.9%
Taylor expanded in b around 0 86.0%
div-exp86.0%
*-commutative86.0%
exp-to-pow86.0%
rem-exp-log86.2%
Simplified86.2%
if -1.2499999999999999e-8 < y < 8.60000000000000029e82Initial program 97.7%
Taylor expanded in y around 0 94.9%
Final simplification91.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (+ t -1.0) -1e+19) (not (<= (+ t -1.0) -0.5))) (/ (* x (/ (pow a t) a)) y) (/ (* x (/ (pow z y) a)) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t + -1.0) <= -1e+19) || !((t + -1.0) <= -0.5)) {
tmp = (x * (pow(a, t) / a)) / y;
} else {
tmp = (x * (pow(z, y) / a)) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (((t + (-1.0d0)) <= (-1d+19)) .or. (.not. ((t + (-1.0d0)) <= (-0.5d0)))) then
tmp = (x * ((a ** t) / a)) / y
else
tmp = (x * ((z ** y) / a)) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t + -1.0) <= -1e+19) || !((t + -1.0) <= -0.5)) {
tmp = (x * (Math.pow(a, t) / a)) / y;
} else {
tmp = (x * (Math.pow(z, y) / a)) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((t + -1.0) <= -1e+19) or not ((t + -1.0) <= -0.5): tmp = (x * (math.pow(a, t) / a)) / y else: tmp = (x * (math.pow(z, y) / a)) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(t + -1.0) <= -1e+19) || !(Float64(t + -1.0) <= -0.5)) tmp = Float64(Float64(x * Float64((a ^ t) / a)) / y); else tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((t + -1.0) <= -1e+19) || ~(((t + -1.0) <= -0.5))) tmp = (x * ((a ^ t) / a)) / y; else tmp = (x * ((z ^ y) / a)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(t + -1.0), $MachinePrecision], -1e+19], N[Not[LessEqual[N[(t + -1.0), $MachinePrecision], -0.5]], $MachinePrecision]], N[(N[(x * N[(N[Power[a, t], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t + -1 \leq -1 \cdot 10^{+19} \lor \neg \left(t + -1 \leq -0.5\right):\\
\;\;\;\;\frac{x \cdot \frac{{a}^{t}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\end{array}
\end{array}
if (-.f64 t 1) < -1e19 or -0.5 < (-.f64 t 1) Initial program 100.0%
Taylor expanded in y around 0 88.2%
Taylor expanded in b around 0 82.3%
expm1-log1p-u82.3%
expm1-udef82.3%
pow-sub82.3%
pow182.3%
Applied egg-rr82.3%
expm1-def82.3%
expm1-log1p82.3%
Simplified82.3%
if -1e19 < (-.f64 t 1) < -0.5Initial program 97.4%
Taylor expanded in t around 0 97.0%
mul-1-neg97.0%
Simplified97.0%
Taylor expanded in b around 0 77.1%
div-exp77.1%
*-commutative77.1%
exp-to-pow77.1%
rem-exp-log78.0%
Simplified78.0%
Final simplification80.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (+ t -1.0) -1e+19) (not (<= (+ t -1.0) -0.5))) (/ (* x (/ (pow a t) a)) y) (/ (/ (* x (pow z y)) a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t + -1.0) <= -1e+19) || !((t + -1.0) <= -0.5)) {
tmp = (x * (pow(a, t) / a)) / y;
} else {
tmp = ((x * pow(z, y)) / a) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (((t + (-1.0d0)) <= (-1d+19)) .or. (.not. ((t + (-1.0d0)) <= (-0.5d0)))) then
tmp = (x * ((a ** t) / a)) / y
else
tmp = ((x * (z ** y)) / a) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t + -1.0) <= -1e+19) || !((t + -1.0) <= -0.5)) {
tmp = (x * (Math.pow(a, t) / a)) / y;
} else {
tmp = ((x * Math.pow(z, y)) / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((t + -1.0) <= -1e+19) or not ((t + -1.0) <= -0.5): tmp = (x * (math.pow(a, t) / a)) / y else: tmp = ((x * math.pow(z, y)) / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(t + -1.0) <= -1e+19) || !(Float64(t + -1.0) <= -0.5)) tmp = Float64(Float64(x * Float64((a ^ t) / a)) / y); else tmp = Float64(Float64(Float64(x * (z ^ y)) / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((t + -1.0) <= -1e+19) || ~(((t + -1.0) <= -0.5))) tmp = (x * ((a ^ t) / a)) / y; else tmp = ((x * (z ^ y)) / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(t + -1.0), $MachinePrecision], -1e+19], N[Not[LessEqual[N[(t + -1.0), $MachinePrecision], -0.5]], $MachinePrecision]], N[(N[(x * N[(N[Power[a, t], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t + -1 \leq -1 \cdot 10^{+19} \lor \neg \left(t + -1 \leq -0.5\right):\\
\;\;\;\;\frac{x \cdot \frac{{a}^{t}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x \cdot {z}^{y}}{a}}{y}\\
\end{array}
\end{array}
if (-.f64 t 1) < -1e19 or -0.5 < (-.f64 t 1) Initial program 100.0%
Taylor expanded in y around 0 88.2%
Taylor expanded in b around 0 82.3%
expm1-log1p-u82.3%
expm1-udef82.3%
pow-sub82.3%
pow182.3%
Applied egg-rr82.3%
expm1-def82.3%
expm1-log1p82.3%
Simplified82.3%
if -1e19 < (-.f64 t 1) < -0.5Initial program 97.4%
Taylor expanded in t around 0 97.0%
mul-1-neg97.0%
Simplified97.0%
Taylor expanded in b around 0 77.1%
div-exp77.1%
*-commutative77.1%
exp-to-pow77.1%
rem-exp-log78.0%
Simplified78.0%
associate-*r/78.0%
Applied egg-rr78.0%
Final simplification80.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.25e-8) (not (<= y 10200.0))) (/ (* x (/ (pow z y) a)) 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.25e-8) || !(y <= 10200.0)) {
tmp = (x * (pow(z, y) / a)) / 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.25d-8)) .or. (.not. (y <= 10200.0d0))) then
tmp = (x * ((z ** y) / a)) / 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.25e-8) || !(y <= 10200.0)) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else {
tmp = x / (a * (y * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.25e-8) or not (y <= 10200.0): tmp = (x * (math.pow(z, y) / a)) / 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.25e-8) || !(y <= 10200.0)) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / 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.25e-8) || ~((y <= 10200.0))) tmp = (x * ((z ^ y) / a)) / 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.25e-8], N[Not[LessEqual[y, 10200.0]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $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.25 \cdot 10^{-8} \lor \neg \left(y \leq 10200\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
if y < -1.2499999999999999e-8 or 10200 < y Initial program 99.8%
Taylor expanded in t around 0 91.4%
mul-1-neg91.4%
Simplified91.4%
Taylor expanded in b around 0 84.6%
div-exp84.6%
*-commutative84.6%
exp-to-pow84.6%
rem-exp-log84.7%
Simplified84.7%
if -1.2499999999999999e-8 < y < 10200Initial program 97.4%
associate-*l/87.2%
*-commutative87.2%
+-commutative87.2%
associate--l+87.2%
exp-sum75.4%
*-commutative75.4%
exp-to-pow76.3%
sub-neg76.3%
metadata-eval76.3%
exp-diff75.5%
*-commutative75.5%
exp-to-pow75.5%
Simplified75.5%
Taylor expanded in t around 0 67.0%
Taylor expanded in y around 0 67.0%
Final simplification76.0%
(FPCore (x y z t a b) :precision binary64 (if (<= y 3.1e+237) (/ x (* a (* y (exp b)))) (/ (* y (- x (* a (/ b (/ a x))))) (* y (* y a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 3.1e+237) {
tmp = x / (a * (y * exp(b)));
} else {
tmp = (y * (x - (a * (b / (a / x))))) / (y * (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 (y <= 3.1d+237) then
tmp = x / (a * (y * exp(b)))
else
tmp = (y * (x - (a * (b / (a / x))))) / (y * (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 (y <= 3.1e+237) {
tmp = x / (a * (y * Math.exp(b)));
} else {
tmp = (y * (x - (a * (b / (a / x))))) / (y * (y * a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 3.1e+237: tmp = x / (a * (y * math.exp(b))) else: tmp = (y * (x - (a * (b / (a / x))))) / (y * (y * a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 3.1e+237) tmp = Float64(x / Float64(a * Float64(y * exp(b)))); else tmp = Float64(Float64(y * Float64(x - Float64(a * Float64(b / Float64(a / x))))) / Float64(y * Float64(y * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 3.1e+237) tmp = x / (a * (y * exp(b))); else tmp = (y * (x - (a * (b / (a / x))))) / (y * (y * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 3.1e+237], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(x - N[(a * N[(b / N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y * N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 3.1 \cdot 10^{+237}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(x - a \cdot \frac{b}{\frac{a}{x}}\right)}{y \cdot \left(y \cdot a\right)}\\
\end{array}
\end{array}
if y < 3.09999999999999991e237Initial program 98.5%
associate-*l/88.1%
*-commutative88.1%
+-commutative88.1%
associate--l+88.1%
exp-sum75.5%
*-commutative75.5%
exp-to-pow76.1%
sub-neg76.1%
metadata-eval76.1%
exp-diff67.7%
*-commutative67.7%
exp-to-pow67.7%
Simplified67.7%
Taylor expanded in t around 0 66.2%
Taylor expanded in y around 0 59.9%
if 3.09999999999999991e237 < y Initial program 100.0%
associate-*l/94.1%
*-commutative94.1%
+-commutative94.1%
associate--l+94.1%
exp-sum64.7%
*-commutative64.7%
exp-to-pow64.7%
sub-neg64.7%
metadata-eval64.7%
exp-diff52.9%
*-commutative52.9%
exp-to-pow52.9%
Simplified52.9%
Taylor expanded in t around 0 70.7%
Taylor expanded in y around 0 15.4%
Taylor expanded in b around 0 15.5%
+-commutative15.5%
mul-1-neg15.5%
unsub-neg15.5%
times-frac15.4%
Simplified15.4%
associate-*r/21.0%
frac-sub47.2%
Applied egg-rr47.2%
*-commutative47.2%
associate-*l*53.1%
distribute-lft-out--53.1%
associate-*l/53.1%
associate-/l*53.1%
*-commutative53.1%
Simplified53.1%
Final simplification59.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- x (* x b))))
(if (<= b -9e+40)
(+ (* (/ (* b b) y) (/ x a)) (/ t_1 (* y a)))
(if (<= b -4.1e-234)
(/ (/ t_1 y) a)
(if (<= b 1.05e-169)
(/ (- (* x b)) (* y a))
(/ x (* y (* a (+ 1.0 b)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x - (x * b);
double tmp;
if (b <= -9e+40) {
tmp = (((b * b) / y) * (x / a)) + (t_1 / (y * a));
} else if (b <= -4.1e-234) {
tmp = (t_1 / y) / a;
} else if (b <= 1.05e-169) {
tmp = -(x * b) / (y * a);
} else {
tmp = x / (y * (a * (1.0 + b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x - (x * b)
if (b <= (-9d+40)) then
tmp = (((b * b) / y) * (x / a)) + (t_1 / (y * a))
else if (b <= (-4.1d-234)) then
tmp = (t_1 / y) / a
else if (b <= 1.05d-169) then
tmp = -(x * b) / (y * a)
else
tmp = x / (y * (a * (1.0d0 + 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 - (x * b);
double tmp;
if (b <= -9e+40) {
tmp = (((b * b) / y) * (x / a)) + (t_1 / (y * a));
} else if (b <= -4.1e-234) {
tmp = (t_1 / y) / a;
} else if (b <= 1.05e-169) {
tmp = -(x * b) / (y * a);
} else {
tmp = x / (y * (a * (1.0 + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x - (x * b) tmp = 0 if b <= -9e+40: tmp = (((b * b) / y) * (x / a)) + (t_1 / (y * a)) elif b <= -4.1e-234: tmp = (t_1 / y) / a elif b <= 1.05e-169: tmp = -(x * b) / (y * a) else: tmp = x / (y * (a * (1.0 + b))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x - Float64(x * b)) tmp = 0.0 if (b <= -9e+40) tmp = Float64(Float64(Float64(Float64(b * b) / y) * Float64(x / a)) + Float64(t_1 / Float64(y * a))); elseif (b <= -4.1e-234) tmp = Float64(Float64(t_1 / y) / a); elseif (b <= 1.05e-169) tmp = Float64(Float64(-Float64(x * b)) / Float64(y * a)); else tmp = Float64(x / Float64(y * Float64(a * Float64(1.0 + b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x - (x * b); tmp = 0.0; if (b <= -9e+40) tmp = (((b * b) / y) * (x / a)) + (t_1 / (y * a)); elseif (b <= -4.1e-234) tmp = (t_1 / y) / a; elseif (b <= 1.05e-169) tmp = -(x * b) / (y * a); else tmp = x / (y * (a * (1.0 + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x - N[(x * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -9e+40], N[(N[(N[(N[(b * b), $MachinePrecision] / y), $MachinePrecision] * N[(x / a), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -4.1e-234], N[(N[(t$95$1 / y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[b, 1.05e-169], N[((-N[(x * b), $MachinePrecision]) / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a * N[(1.0 + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - x \cdot b\\
\mathbf{if}\;b \leq -9 \cdot 10^{+40}:\\
\;\;\;\;\frac{b \cdot b}{y} \cdot \frac{x}{a} + \frac{t_1}{y \cdot a}\\
\mathbf{elif}\;b \leq -4.1 \cdot 10^{-234}:\\
\;\;\;\;\frac{\frac{t_1}{y}}{a}\\
\mathbf{elif}\;b \leq 1.05 \cdot 10^{-169}:\\
\;\;\;\;\frac{-x \cdot b}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot \left(1 + b\right)\right)}\\
\end{array}
\end{array}
if b < -9.00000000000000064e40Initial program 100.0%
associate-*l/88.7%
*-commutative88.7%
+-commutative88.7%
associate--l+88.7%
exp-sum73.6%
*-commutative73.6%
exp-to-pow73.6%
sub-neg73.6%
metadata-eval73.6%
exp-diff49.1%
*-commutative49.1%
exp-to-pow49.1%
Simplified49.1%
Taylor expanded in t around 0 68.0%
Taylor expanded in y around 0 79.6%
Taylor expanded in b around 0 10.7%
Taylor expanded in b around 0 59.5%
associate-+r+59.5%
associate-*r/59.5%
*-commutative59.5%
associate-*r/59.5%
times-frac59.2%
neg-mul-159.2%
*-commutative59.2%
*-commutative59.2%
associate-+r+59.2%
times-frac59.3%
unpow259.3%
unsub-neg59.3%
associate-/r*59.3%
associate-*l/61.3%
Simplified59.3%
if -9.00000000000000064e40 < b < -4.10000000000000011e-234Initial program 96.3%
associate-*l/85.5%
*-commutative85.5%
+-commutative85.5%
associate--l+85.5%
exp-sum76.7%
*-commutative76.7%
exp-to-pow77.8%
sub-neg77.8%
metadata-eval77.8%
exp-diff77.8%
*-commutative77.8%
exp-to-pow77.8%
Simplified77.8%
Taylor expanded in t around 0 63.9%
Taylor expanded in y around 0 44.1%
Taylor expanded in b around 0 36.8%
Taylor expanded in b around 0 35.5%
*-commutative35.5%
associate-*r/35.5%
*-commutative35.5%
associate-*r/35.5%
metadata-eval35.5%
times-frac35.4%
cancel-sign-sub-inv35.4%
associate-/r*38.2%
*-lft-identity38.2%
associate-*l/39.7%
div-sub39.7%
associate-*r/41.1%
div-sub41.1%
*-commutative41.1%
Simplified41.1%
if -4.10000000000000011e-234 < b < 1.05e-169Initial program 98.6%
associate-*l/93.2%
*-commutative93.2%
+-commutative93.2%
associate--l+93.2%
exp-sum79.8%
*-commutative79.8%
exp-to-pow80.8%
sub-neg80.8%
metadata-eval80.8%
exp-diff80.8%
*-commutative80.8%
exp-to-pow80.8%
Simplified80.8%
Taylor expanded in t around 0 63.2%
Taylor expanded in y around 0 31.7%
Taylor expanded in b around 0 31.7%
+-commutative31.7%
mul-1-neg31.7%
unsub-neg31.7%
times-frac31.7%
Simplified31.7%
Taylor expanded in b around -inf 45.1%
if 1.05e-169 < b Initial program 99.5%
associate-*l/88.6%
*-commutative88.6%
+-commutative88.6%
associate--l+88.6%
exp-sum72.3%
*-commutative72.3%
exp-to-pow72.5%
sub-neg72.5%
metadata-eval72.5%
exp-diff63.3%
*-commutative63.3%
exp-to-pow63.3%
Simplified63.3%
Taylor expanded in t around 0 68.7%
times-frac66.7%
Simplified66.7%
Taylor expanded in b around 0 55.1%
Taylor expanded in y around 0 41.0%
+-commutative41.0%
Simplified41.0%
Final simplification45.4%
(FPCore (x y z t a b) :precision binary64 (if (<= b 1e-168) (/ (- (* y (/ x y)) (* a (* x (/ b a)))) (* y a)) (/ x (* y (* a (+ 1.0 b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 1e-168) {
tmp = ((y * (x / y)) - (a * (x * (b / a)))) / (y * a);
} else {
tmp = x / (y * (a * (1.0 + 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 <= 1d-168) then
tmp = ((y * (x / y)) - (a * (x * (b / a)))) / (y * a)
else
tmp = x / (y * (a * (1.0d0 + 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 <= 1e-168) {
tmp = ((y * (x / y)) - (a * (x * (b / a)))) / (y * a);
} else {
tmp = x / (y * (a * (1.0 + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 1e-168: tmp = ((y * (x / y)) - (a * (x * (b / a)))) / (y * a) else: tmp = x / (y * (a * (1.0 + b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 1e-168) tmp = Float64(Float64(Float64(y * Float64(x / y)) - Float64(a * Float64(x * Float64(b / a)))) / Float64(y * a)); else tmp = Float64(x / Float64(y * Float64(a * Float64(1.0 + b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 1e-168) tmp = ((y * (x / y)) - (a * (x * (b / a)))) / (y * a); else tmp = x / (y * (a * (1.0 + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 1e-168], N[(N[(N[(y * N[(x / y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(x * N[(b / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a * N[(1.0 + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 10^{-168}:\\
\;\;\;\;\frac{y \cdot \frac{x}{y} - a \cdot \left(x \cdot \frac{b}{a}\right)}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot \left(1 + b\right)\right)}\\
\end{array}
\end{array}
if b < 1e-168Initial program 98.1%
associate-*l/88.4%
*-commutative88.4%
+-commutative88.4%
associate--l+88.4%
exp-sum76.4%
*-commutative76.4%
exp-to-pow77.1%
sub-neg77.1%
metadata-eval77.1%
exp-diff68.9%
*-commutative68.9%
exp-to-pow68.9%
Simplified68.9%
Taylor expanded in t around 0 65.1%
Taylor expanded in y around 0 53.1%
Taylor expanded in b around 0 35.5%
+-commutative35.5%
mul-1-neg35.5%
unsub-neg35.5%
times-frac37.2%
Simplified37.2%
associate-/r*37.7%
associate-*r/39.7%
frac-sub42.6%
*-commutative42.6%
Applied egg-rr42.6%
if 1e-168 < b Initial program 99.5%
associate-*l/88.6%
*-commutative88.6%
+-commutative88.6%
associate--l+88.6%
exp-sum72.3%
*-commutative72.3%
exp-to-pow72.5%
sub-neg72.5%
metadata-eval72.5%
exp-diff63.3%
*-commutative63.3%
exp-to-pow63.3%
Simplified63.3%
Taylor expanded in t around 0 68.7%
times-frac66.7%
Simplified66.7%
Taylor expanded in b around 0 55.1%
Taylor expanded in y around 0 41.0%
+-commutative41.0%
Simplified41.0%
Final simplification42.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (/ x y) (- (/ b a)))))
(if (<= b -5.1e-40)
t_1
(if (<= b -1.65e-230)
(* (/ x y) (/ 1.0 a))
(if (<= b 1.36e-245)
t_1
(if (<= b 2.2e-12) (/ (/ x y) a) (/ x (* y (* a b)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / y) * -(b / a);
double tmp;
if (b <= -5.1e-40) {
tmp = t_1;
} else if (b <= -1.65e-230) {
tmp = (x / y) * (1.0 / a);
} else if (b <= 1.36e-245) {
tmp = t_1;
} else if (b <= 2.2e-12) {
tmp = (x / y) / a;
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x / y) * -(b / a)
if (b <= (-5.1d-40)) then
tmp = t_1
else if (b <= (-1.65d-230)) then
tmp = (x / y) * (1.0d0 / a)
else if (b <= 1.36d-245) then
tmp = t_1
else if (b <= 2.2d-12) then
tmp = (x / y) / a
else
tmp = x / (y * (a * 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 / y) * -(b / a);
double tmp;
if (b <= -5.1e-40) {
tmp = t_1;
} else if (b <= -1.65e-230) {
tmp = (x / y) * (1.0 / a);
} else if (b <= 1.36e-245) {
tmp = t_1;
} else if (b <= 2.2e-12) {
tmp = (x / y) / a;
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x / y) * -(b / a) tmp = 0 if b <= -5.1e-40: tmp = t_1 elif b <= -1.65e-230: tmp = (x / y) * (1.0 / a) elif b <= 1.36e-245: tmp = t_1 elif b <= 2.2e-12: tmp = (x / y) / a else: tmp = x / (y * (a * b)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x / y) * Float64(-Float64(b / a))) tmp = 0.0 if (b <= -5.1e-40) tmp = t_1; elseif (b <= -1.65e-230) tmp = Float64(Float64(x / y) * Float64(1.0 / a)); elseif (b <= 1.36e-245) tmp = t_1; elseif (b <= 2.2e-12) tmp = Float64(Float64(x / y) / a); else tmp = Float64(x / Float64(y * Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x / y) * -(b / a); tmp = 0.0; if (b <= -5.1e-40) tmp = t_1; elseif (b <= -1.65e-230) tmp = (x / y) * (1.0 / a); elseif (b <= 1.36e-245) tmp = t_1; elseif (b <= 2.2e-12) tmp = (x / y) / a; else tmp = x / (y * (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] * (-N[(b / a), $MachinePrecision])), $MachinePrecision]}, If[LessEqual[b, -5.1e-40], t$95$1, If[LessEqual[b, -1.65e-230], N[(N[(x / y), $MachinePrecision] * N[(1.0 / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.36e-245], t$95$1, If[LessEqual[b, 2.2e-12], N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision], N[(x / N[(y * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} \cdot \left(-\frac{b}{a}\right)\\
\mathbf{if}\;b \leq -5.1 \cdot 10^{-40}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -1.65 \cdot 10^{-230}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{1}{a}\\
\mathbf{elif}\;b \leq 1.36 \cdot 10^{-245}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 2.2 \cdot 10^{-12}:\\
\;\;\;\;\frac{\frac{x}{y}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot b\right)}\\
\end{array}
\end{array}
if b < -5.10000000000000037e-40 or -1.64999999999999997e-230 < b < 1.3600000000000001e-245Initial program 99.5%
associate-*l/88.1%
*-commutative88.1%
+-commutative88.1%
associate--l+88.1%
exp-sum73.6%
*-commutative73.6%
exp-to-pow73.8%
sub-neg73.8%
metadata-eval73.8%
exp-diff60.3%
*-commutative60.3%
exp-to-pow60.3%
Simplified60.3%
Taylor expanded in t around 0 62.0%
Taylor expanded in y around 0 59.7%
Taylor expanded in b around 0 30.7%
+-commutative30.7%
mul-1-neg30.7%
unsub-neg30.7%
times-frac34.6%
Simplified34.6%
Taylor expanded in b around inf 34.5%
times-frac38.4%
neg-mul-138.4%
*-commutative38.4%
distribute-lft-neg-in38.4%
distribute-neg-frac38.4%
Simplified38.4%
if -5.10000000000000037e-40 < b < -1.64999999999999997e-230Initial program 95.3%
associate-*l/86.8%
*-commutative86.8%
+-commutative86.8%
associate--l+86.8%
exp-sum79.0%
*-commutative79.0%
exp-to-pow80.3%
sub-neg80.3%
metadata-eval80.3%
exp-diff80.3%
*-commutative80.3%
exp-to-pow80.3%
Simplified80.3%
Taylor expanded in t around 0 67.3%
Taylor expanded in y around 0 43.7%
Taylor expanded in b around 0 43.7%
*-commutative43.7%
Simplified43.7%
*-un-lft-identity43.7%
*-commutative43.7%
times-frac47.4%
Applied egg-rr47.4%
if 1.3600000000000001e-245 < b < 2.19999999999999992e-12Initial program 98.5%
Taylor expanded in t around 0 73.5%
mul-1-neg73.5%
Simplified73.5%
Taylor expanded in y around 0 41.2%
associate-/l*47.3%
+-commutative47.3%
distribute-neg-in47.3%
neg-mul-147.3%
sub-neg47.3%
associate-/l*41.2%
*-commutative41.2%
exp-diff41.2%
neg-mul-141.2%
associate-*r/41.2%
log-rec41.2%
rem-exp-log42.4%
associate-*r/42.4%
*-rgt-identity42.4%
associate-/r*42.4%
*-commutative42.4%
Simplified44.4%
Taylor expanded in b around 0 44.4%
if 2.19999999999999992e-12 < b Initial program 100.0%
associate-*l/91.9%
*-commutative91.9%
+-commutative91.9%
associate--l+91.9%
exp-sum71.0%
*-commutative71.0%
exp-to-pow71.0%
sub-neg71.0%
metadata-eval71.0%
exp-diff56.5%
*-commutative56.5%
exp-to-pow56.5%
Simplified56.5%
Taylor expanded in t around 0 66.4%
Taylor expanded in y around 0 74.6%
Taylor expanded in b around 0 39.0%
Taylor expanded in b around -inf 39.5%
Final simplification41.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -8.9e-41)
(* (/ x y) (- (/ b a)))
(if (<= b -3.5e-235)
(* (/ x y) (/ 1.0 a))
(if (<= b 1.26e-169)
(/ (- (* x b)) (* y a))
(if (<= b 5.5e+31) (/ x (* y a)) (/ x (* y (* a b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -8.9e-41) {
tmp = (x / y) * -(b / a);
} else if (b <= -3.5e-235) {
tmp = (x / y) * (1.0 / a);
} else if (b <= 1.26e-169) {
tmp = -(x * b) / (y * a);
} else if (b <= 5.5e+31) {
tmp = x / (y * a);
} else {
tmp = x / (y * (a * 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 <= (-8.9d-41)) then
tmp = (x / y) * -(b / a)
else if (b <= (-3.5d-235)) then
tmp = (x / y) * (1.0d0 / a)
else if (b <= 1.26d-169) then
tmp = -(x * b) / (y * a)
else if (b <= 5.5d+31) then
tmp = x / (y * a)
else
tmp = x / (y * (a * 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 <= -8.9e-41) {
tmp = (x / y) * -(b / a);
} else if (b <= -3.5e-235) {
tmp = (x / y) * (1.0 / a);
} else if (b <= 1.26e-169) {
tmp = -(x * b) / (y * a);
} else if (b <= 5.5e+31) {
tmp = x / (y * a);
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -8.9e-41: tmp = (x / y) * -(b / a) elif b <= -3.5e-235: tmp = (x / y) * (1.0 / a) elif b <= 1.26e-169: tmp = -(x * b) / (y * a) elif b <= 5.5e+31: tmp = x / (y * a) else: tmp = x / (y * (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -8.9e-41) tmp = Float64(Float64(x / y) * Float64(-Float64(b / a))); elseif (b <= -3.5e-235) tmp = Float64(Float64(x / y) * Float64(1.0 / a)); elseif (b <= 1.26e-169) tmp = Float64(Float64(-Float64(x * b)) / Float64(y * a)); elseif (b <= 5.5e+31) tmp = Float64(x / Float64(y * a)); else tmp = Float64(x / Float64(y * Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -8.9e-41) tmp = (x / y) * -(b / a); elseif (b <= -3.5e-235) tmp = (x / y) * (1.0 / a); elseif (b <= 1.26e-169) tmp = -(x * b) / (y * a); elseif (b <= 5.5e+31) tmp = x / (y * a); else tmp = x / (y * (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -8.9e-41], N[(N[(x / y), $MachinePrecision] * (-N[(b / a), $MachinePrecision])), $MachinePrecision], If[LessEqual[b, -3.5e-235], N[(N[(x / y), $MachinePrecision] * N[(1.0 / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.26e-169], N[((-N[(x * b), $MachinePrecision]) / N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.5e+31], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.9 \cdot 10^{-41}:\\
\;\;\;\;\frac{x}{y} \cdot \left(-\frac{b}{a}\right)\\
\mathbf{elif}\;b \leq -3.5 \cdot 10^{-235}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{1}{a}\\
\mathbf{elif}\;b \leq 1.26 \cdot 10^{-169}:\\
\;\;\;\;\frac{-x \cdot b}{y \cdot a}\\
\mathbf{elif}\;b \leq 5.5 \cdot 10^{+31}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot b\right)}\\
\end{array}
\end{array}
if b < -8.90000000000000006e-41Initial program 99.8%
associate-*l/87.0%
*-commutative87.0%
+-commutative87.0%
associate--l+87.0%
exp-sum72.7%
*-commutative72.7%
exp-to-pow72.8%
sub-neg72.8%
metadata-eval72.8%
exp-diff54.3%
*-commutative54.3%
exp-to-pow54.3%
Simplified54.3%
Taylor expanded in t around 0 64.6%
Taylor expanded in y around 0 71.2%
Taylor expanded in b around 0 31.4%
+-commutative31.4%
mul-1-neg31.4%
unsub-neg31.4%
times-frac36.8%
Simplified36.8%
Taylor expanded in b around inf 31.0%
times-frac37.7%
neg-mul-137.7%
*-commutative37.7%
distribute-lft-neg-in37.7%
distribute-neg-frac37.7%
Simplified37.7%
if -8.90000000000000006e-41 < b < -3.4999999999999999e-235Initial program 95.3%
associate-*l/86.8%
*-commutative86.8%
+-commutative86.8%
associate--l+86.8%
exp-sum79.0%
*-commutative79.0%
exp-to-pow80.3%
sub-neg80.3%
metadata-eval80.3%
exp-diff80.3%
*-commutative80.3%
exp-to-pow80.3%
Simplified80.3%
Taylor expanded in t around 0 67.3%
Taylor expanded in y around 0 43.7%
Taylor expanded in b around 0 43.7%
*-commutative43.7%
Simplified43.7%
*-un-lft-identity43.7%
*-commutative43.7%
times-frac47.4%
Applied egg-rr47.4%
if -3.4999999999999999e-235 < b < 1.26e-169Initial program 98.6%
associate-*l/93.2%
*-commutative93.2%
+-commutative93.2%
associate--l+93.2%
exp-sum79.8%
*-commutative79.8%
exp-to-pow80.8%
sub-neg80.8%
metadata-eval80.8%
exp-diff80.8%
*-commutative80.8%
exp-to-pow80.8%
Simplified80.8%
Taylor expanded in t around 0 63.2%
Taylor expanded in y around 0 31.7%
Taylor expanded in b around 0 31.7%
+-commutative31.7%
mul-1-neg31.7%
unsub-neg31.7%
times-frac31.7%
Simplified31.7%
Taylor expanded in b around -inf 45.1%
if 1.26e-169 < b < 5.50000000000000002e31Initial program 98.8%
associate-*l/85.3%
*-commutative85.3%
+-commutative85.3%
associate--l+85.3%
exp-sum78.2%
*-commutative78.2%
exp-to-pow78.6%
sub-neg78.6%
metadata-eval78.6%
exp-diff71.5%
*-commutative71.5%
exp-to-pow71.5%
Simplified71.5%
Taylor expanded in t around 0 69.5%
Taylor expanded in y around 0 44.7%
Taylor expanded in b around 0 42.5%
*-commutative42.5%
Simplified42.5%
if 5.50000000000000002e31 < b Initial program 100.0%
associate-*l/91.1%
*-commutative91.1%
+-commutative91.1%
associate--l+91.1%
exp-sum67.9%
*-commutative67.9%
exp-to-pow67.9%
sub-neg67.9%
metadata-eval67.9%
exp-diff57.1%
*-commutative57.1%
exp-to-pow57.1%
Simplified57.1%
Taylor expanded in t around 0 68.1%
Taylor expanded in y around 0 77.1%
Taylor expanded in b around 0 39.4%
Taylor expanded in b around -inf 39.9%
Final simplification42.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -5.1e-40)
(* (/ x y) (- (/ b a)))
(if (<= b -4.8e-232)
(* (/ x y) (/ 1.0 a))
(if (<= b 6.6e-170) (/ (- (* x b)) (* y a)) (/ x (* a (+ y (* y b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -5.1e-40) {
tmp = (x / y) * -(b / a);
} else if (b <= -4.8e-232) {
tmp = (x / y) * (1.0 / a);
} else if (b <= 6.6e-170) {
tmp = -(x * b) / (y * a);
} 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.1d-40)) then
tmp = (x / y) * -(b / a)
else if (b <= (-4.8d-232)) then
tmp = (x / y) * (1.0d0 / a)
else if (b <= 6.6d-170) then
tmp = -(x * b) / (y * a)
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.1e-40) {
tmp = (x / y) * -(b / a);
} else if (b <= -4.8e-232) {
tmp = (x / y) * (1.0 / a);
} else if (b <= 6.6e-170) {
tmp = -(x * b) / (y * a);
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -5.1e-40: tmp = (x / y) * -(b / a) elif b <= -4.8e-232: tmp = (x / y) * (1.0 / a) elif b <= 6.6e-170: tmp = -(x * b) / (y * a) else: tmp = x / (a * (y + (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -5.1e-40) tmp = Float64(Float64(x / y) * Float64(-Float64(b / a))); elseif (b <= -4.8e-232) tmp = Float64(Float64(x / y) * Float64(1.0 / a)); elseif (b <= 6.6e-170) tmp = Float64(Float64(-Float64(x * b)) / Float64(y * a)); 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.1e-40) tmp = (x / y) * -(b / a); elseif (b <= -4.8e-232) tmp = (x / y) * (1.0 / a); elseif (b <= 6.6e-170) tmp = -(x * b) / (y * a); else tmp = x / (a * (y + (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -5.1e-40], N[(N[(x / y), $MachinePrecision] * (-N[(b / a), $MachinePrecision])), $MachinePrecision], If[LessEqual[b, -4.8e-232], N[(N[(x / y), $MachinePrecision] * N[(1.0 / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.6e-170], N[((-N[(x * b), $MachinePrecision]) / N[(y * a), $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.1 \cdot 10^{-40}:\\
\;\;\;\;\frac{x}{y} \cdot \left(-\frac{b}{a}\right)\\
\mathbf{elif}\;b \leq -4.8 \cdot 10^{-232}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{1}{a}\\
\mathbf{elif}\;b \leq 6.6 \cdot 10^{-170}:\\
\;\;\;\;\frac{-x \cdot b}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\end{array}
\end{array}
if b < -5.10000000000000037e-40Initial program 99.8%
associate-*l/87.0%
*-commutative87.0%
+-commutative87.0%
associate--l+87.0%
exp-sum72.7%
*-commutative72.7%
exp-to-pow72.8%
sub-neg72.8%
metadata-eval72.8%
exp-diff54.3%
*-commutative54.3%
exp-to-pow54.3%
Simplified54.3%
Taylor expanded in t around 0 64.6%
Taylor expanded in y around 0 71.2%
Taylor expanded in b around 0 31.4%
+-commutative31.4%
mul-1-neg31.4%
unsub-neg31.4%
times-frac36.8%
Simplified36.8%
Taylor expanded in b around inf 31.0%
times-frac37.7%
neg-mul-137.7%
*-commutative37.7%
distribute-lft-neg-in37.7%
distribute-neg-frac37.7%
Simplified37.7%
if -5.10000000000000037e-40 < b < -4.79999999999999998e-232Initial program 95.3%
associate-*l/86.8%
*-commutative86.8%
+-commutative86.8%
associate--l+86.8%
exp-sum79.0%
*-commutative79.0%
exp-to-pow80.3%
sub-neg80.3%
metadata-eval80.3%
exp-diff80.3%
*-commutative80.3%
exp-to-pow80.3%
Simplified80.3%
Taylor expanded in t around 0 67.3%
Taylor expanded in y around 0 43.7%
Taylor expanded in b around 0 43.7%
*-commutative43.7%
Simplified43.7%
*-un-lft-identity43.7%
*-commutative43.7%
times-frac47.4%
Applied egg-rr47.4%
if -4.79999999999999998e-232 < b < 6.60000000000000007e-170Initial program 98.6%
associate-*l/93.2%
*-commutative93.2%
+-commutative93.2%
associate--l+93.2%
exp-sum79.8%
*-commutative79.8%
exp-to-pow80.8%
sub-neg80.8%
metadata-eval80.8%
exp-diff80.8%
*-commutative80.8%
exp-to-pow80.8%
Simplified80.8%
Taylor expanded in t around 0 63.2%
Taylor expanded in y around 0 31.7%
Taylor expanded in b around 0 31.7%
+-commutative31.7%
mul-1-neg31.7%
unsub-neg31.7%
times-frac31.7%
Simplified31.7%
Taylor expanded in b around -inf 45.1%
if 6.60000000000000007e-170 < b Initial program 99.5%
associate-*l/88.6%
*-commutative88.6%
+-commutative88.6%
associate--l+88.6%
exp-sum72.3%
*-commutative72.3%
exp-to-pow72.5%
sub-neg72.5%
metadata-eval72.5%
exp-diff63.3%
*-commutative63.3%
exp-to-pow63.3%
Simplified63.3%
Taylor expanded in t around 0 68.7%
Taylor expanded in y around 0 63.2%
Taylor expanded in b around 0 40.7%
Final simplification41.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -5.2e-40)
(* (/ x y) (- (/ b a)))
(if (<= b -3.2e-235)
(* (/ x y) (/ 1.0 a))
(if (<= b 4.5e-169)
(/ (- (* x b)) (* y a))
(/ x (* y (* a (+ 1.0 b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -5.2e-40) {
tmp = (x / y) * -(b / a);
} else if (b <= -3.2e-235) {
tmp = (x / y) * (1.0 / a);
} else if (b <= 4.5e-169) {
tmp = -(x * b) / (y * a);
} else {
tmp = x / (y * (a * (1.0 + 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.2d-40)) then
tmp = (x / y) * -(b / a)
else if (b <= (-3.2d-235)) then
tmp = (x / y) * (1.0d0 / a)
else if (b <= 4.5d-169) then
tmp = -(x * b) / (y * a)
else
tmp = x / (y * (a * (1.0d0 + 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.2e-40) {
tmp = (x / y) * -(b / a);
} else if (b <= -3.2e-235) {
tmp = (x / y) * (1.0 / a);
} else if (b <= 4.5e-169) {
tmp = -(x * b) / (y * a);
} else {
tmp = x / (y * (a * (1.0 + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -5.2e-40: tmp = (x / y) * -(b / a) elif b <= -3.2e-235: tmp = (x / y) * (1.0 / a) elif b <= 4.5e-169: tmp = -(x * b) / (y * a) else: tmp = x / (y * (a * (1.0 + b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -5.2e-40) tmp = Float64(Float64(x / y) * Float64(-Float64(b / a))); elseif (b <= -3.2e-235) tmp = Float64(Float64(x / y) * Float64(1.0 / a)); elseif (b <= 4.5e-169) tmp = Float64(Float64(-Float64(x * b)) / Float64(y * a)); else tmp = Float64(x / Float64(y * Float64(a * Float64(1.0 + b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -5.2e-40) tmp = (x / y) * -(b / a); elseif (b <= -3.2e-235) tmp = (x / y) * (1.0 / a); elseif (b <= 4.5e-169) tmp = -(x * b) / (y * a); else tmp = x / (y * (a * (1.0 + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -5.2e-40], N[(N[(x / y), $MachinePrecision] * (-N[(b / a), $MachinePrecision])), $MachinePrecision], If[LessEqual[b, -3.2e-235], N[(N[(x / y), $MachinePrecision] * N[(1.0 / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.5e-169], N[((-N[(x * b), $MachinePrecision]) / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a * N[(1.0 + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.2 \cdot 10^{-40}:\\
\;\;\;\;\frac{x}{y} \cdot \left(-\frac{b}{a}\right)\\
\mathbf{elif}\;b \leq -3.2 \cdot 10^{-235}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{1}{a}\\
\mathbf{elif}\;b \leq 4.5 \cdot 10^{-169}:\\
\;\;\;\;\frac{-x \cdot b}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot \left(1 + b\right)\right)}\\
\end{array}
\end{array}
if b < -5.2000000000000003e-40Initial program 99.8%
associate-*l/87.0%
*-commutative87.0%
+-commutative87.0%
associate--l+87.0%
exp-sum72.7%
*-commutative72.7%
exp-to-pow72.8%
sub-neg72.8%
metadata-eval72.8%
exp-diff54.3%
*-commutative54.3%
exp-to-pow54.3%
Simplified54.3%
Taylor expanded in t around 0 64.6%
Taylor expanded in y around 0 71.2%
Taylor expanded in b around 0 31.4%
+-commutative31.4%
mul-1-neg31.4%
unsub-neg31.4%
times-frac36.8%
Simplified36.8%
Taylor expanded in b around inf 31.0%
times-frac37.7%
neg-mul-137.7%
*-commutative37.7%
distribute-lft-neg-in37.7%
distribute-neg-frac37.7%
Simplified37.7%
if -5.2000000000000003e-40 < b < -3.2000000000000001e-235Initial program 95.3%
associate-*l/86.8%
*-commutative86.8%
+-commutative86.8%
associate--l+86.8%
exp-sum79.0%
*-commutative79.0%
exp-to-pow80.3%
sub-neg80.3%
metadata-eval80.3%
exp-diff80.3%
*-commutative80.3%
exp-to-pow80.3%
Simplified80.3%
Taylor expanded in t around 0 67.3%
Taylor expanded in y around 0 43.7%
Taylor expanded in b around 0 43.7%
*-commutative43.7%
Simplified43.7%
*-un-lft-identity43.7%
*-commutative43.7%
times-frac47.4%
Applied egg-rr47.4%
if -3.2000000000000001e-235 < b < 4.4999999999999999e-169Initial program 98.6%
associate-*l/93.2%
*-commutative93.2%
+-commutative93.2%
associate--l+93.2%
exp-sum79.8%
*-commutative79.8%
exp-to-pow80.8%
sub-neg80.8%
metadata-eval80.8%
exp-diff80.8%
*-commutative80.8%
exp-to-pow80.8%
Simplified80.8%
Taylor expanded in t around 0 63.2%
Taylor expanded in y around 0 31.7%
Taylor expanded in b around 0 31.7%
+-commutative31.7%
mul-1-neg31.7%
unsub-neg31.7%
times-frac31.7%
Simplified31.7%
Taylor expanded in b around -inf 45.1%
if 4.4999999999999999e-169 < b Initial program 99.5%
associate-*l/88.6%
*-commutative88.6%
+-commutative88.6%
associate--l+88.6%
exp-sum72.3%
*-commutative72.3%
exp-to-pow72.5%
sub-neg72.5%
metadata-eval72.5%
exp-diff63.3%
*-commutative63.3%
exp-to-pow63.3%
Simplified63.3%
Taylor expanded in t around 0 68.7%
times-frac66.7%
Simplified66.7%
Taylor expanded in b around 0 55.1%
Taylor expanded in y around 0 41.0%
+-commutative41.0%
Simplified41.0%
Final simplification42.0%
(FPCore (x y z t a b) :precision binary64 (if (<= b -2.3e-234) (/ (/ (- x (* x b)) y) a) (if (<= b 6.3e-170) (/ (- (* x b)) (* y a)) (/ x (* y (* a (+ 1.0 b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.3e-234) {
tmp = ((x - (x * b)) / y) / a;
} else if (b <= 6.3e-170) {
tmp = -(x * b) / (y * a);
} else {
tmp = x / (y * (a * (1.0 + b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-2.3d-234)) then
tmp = ((x - (x * b)) / y) / a
else if (b <= 6.3d-170) then
tmp = -(x * b) / (y * a)
else
tmp = x / (y * (a * (1.0d0 + b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.3e-234) {
tmp = ((x - (x * b)) / y) / a;
} else if (b <= 6.3e-170) {
tmp = -(x * b) / (y * a);
} else {
tmp = x / (y * (a * (1.0 + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -2.3e-234: tmp = ((x - (x * b)) / y) / a elif b <= 6.3e-170: tmp = -(x * b) / (y * a) else: tmp = x / (y * (a * (1.0 + b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.3e-234) tmp = Float64(Float64(Float64(x - Float64(x * b)) / y) / a); elseif (b <= 6.3e-170) tmp = Float64(Float64(-Float64(x * b)) / Float64(y * a)); else tmp = Float64(x / Float64(y * Float64(a * Float64(1.0 + b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -2.3e-234) tmp = ((x - (x * b)) / y) / a; elseif (b <= 6.3e-170) tmp = -(x * b) / (y * a); else tmp = x / (y * (a * (1.0 + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.3e-234], N[(N[(N[(x - N[(x * b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[b, 6.3e-170], N[((-N[(x * b), $MachinePrecision]) / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a * N[(1.0 + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.3 \cdot 10^{-234}:\\
\;\;\;\;\frac{\frac{x - x \cdot b}{y}}{a}\\
\mathbf{elif}\;b \leq 6.3 \cdot 10^{-170}:\\
\;\;\;\;\frac{-x \cdot b}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot \left(1 + b\right)\right)}\\
\end{array}
\end{array}
if b < -2.2999999999999999e-234Initial program 97.9%
associate-*l/86.9%
*-commutative86.9%
+-commutative86.9%
associate--l+86.9%
exp-sum75.4%
*-commutative75.4%
exp-to-pow76.0%
sub-neg76.0%
metadata-eval76.0%
exp-diff65.2%
*-commutative65.2%
exp-to-pow65.2%
Simplified65.2%
Taylor expanded in t around 0 65.7%
Taylor expanded in y around 0 59.6%
Taylor expanded in b around 0 25.4%
Taylor expanded in b around 0 36.6%
*-commutative36.6%
associate-*r/36.6%
*-commutative36.6%
associate-*r/36.6%
metadata-eval36.6%
times-frac38.8%
cancel-sign-sub-inv38.8%
associate-/r*40.4%
*-lft-identity40.4%
associate-*l/39.1%
div-sub39.1%
associate-*r/41.4%
div-sub41.4%
*-commutative41.4%
Simplified41.4%
if -2.2999999999999999e-234 < b < 6.3000000000000002e-170Initial program 98.6%
associate-*l/93.2%
*-commutative93.2%
+-commutative93.2%
associate--l+93.2%
exp-sum79.8%
*-commutative79.8%
exp-to-pow80.8%
sub-neg80.8%
metadata-eval80.8%
exp-diff80.8%
*-commutative80.8%
exp-to-pow80.8%
Simplified80.8%
Taylor expanded in t around 0 63.2%
Taylor expanded in y around 0 31.7%
Taylor expanded in b around 0 31.7%
+-commutative31.7%
mul-1-neg31.7%
unsub-neg31.7%
times-frac31.7%
Simplified31.7%
Taylor expanded in b around -inf 45.1%
if 6.3000000000000002e-170 < b Initial program 99.5%
associate-*l/88.6%
*-commutative88.6%
+-commutative88.6%
associate--l+88.6%
exp-sum72.3%
*-commutative72.3%
exp-to-pow72.5%
sub-neg72.5%
metadata-eval72.5%
exp-diff63.3%
*-commutative63.3%
exp-to-pow63.3%
Simplified63.3%
Taylor expanded in t around 0 68.7%
times-frac66.7%
Simplified66.7%
Taylor expanded in b around 0 55.1%
Taylor expanded in y around 0 41.0%
+-commutative41.0%
Simplified41.0%
Final simplification41.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b -7.6e-307) (/ (- (/ x a) (/ (* x b) a)) y) (if (<= b 8e-170) (/ (- (* x b)) (* y a)) (/ x (* y (* a (+ 1.0 b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -7.6e-307) {
tmp = ((x / a) - ((x * b) / a)) / y;
} else if (b <= 8e-170) {
tmp = -(x * b) / (y * a);
} else {
tmp = x / (y * (a * (1.0 + 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.6d-307)) then
tmp = ((x / a) - ((x * b) / a)) / y
else if (b <= 8d-170) then
tmp = -(x * b) / (y * a)
else
tmp = x / (y * (a * (1.0d0 + 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.6e-307) {
tmp = ((x / a) - ((x * b) / a)) / y;
} else if (b <= 8e-170) {
tmp = -(x * b) / (y * a);
} else {
tmp = x / (y * (a * (1.0 + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -7.6e-307: tmp = ((x / a) - ((x * b) / a)) / y elif b <= 8e-170: tmp = -(x * b) / (y * a) else: tmp = x / (y * (a * (1.0 + b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -7.6e-307) tmp = Float64(Float64(Float64(x / a) - Float64(Float64(x * b) / a)) / y); elseif (b <= 8e-170) tmp = Float64(Float64(-Float64(x * b)) / Float64(y * a)); else tmp = Float64(x / Float64(y * Float64(a * Float64(1.0 + b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -7.6e-307) tmp = ((x / a) - ((x * b) / a)) / y; elseif (b <= 8e-170) tmp = -(x * b) / (y * a); else tmp = x / (y * (a * (1.0 + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -7.6e-307], N[(N[(N[(x / a), $MachinePrecision] - N[(N[(x * b), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 8e-170], N[((-N[(x * b), $MachinePrecision]) / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a * N[(1.0 + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.6 \cdot 10^{-307}:\\
\;\;\;\;\frac{\frac{x}{a} - \frac{x \cdot b}{a}}{y}\\
\mathbf{elif}\;b \leq 8 \cdot 10^{-170}:\\
\;\;\;\;\frac{-x \cdot b}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot \left(1 + b\right)\right)}\\
\end{array}
\end{array}
if b < -7.59999999999999971e-307Initial program 98.0%
associate-*l/88.1%
*-commutative88.1%
+-commutative88.1%
associate--l+88.1%
exp-sum75.4%
*-commutative75.4%
exp-to-pow76.1%
sub-neg76.1%
metadata-eval76.1%
exp-diff66.4%
*-commutative66.4%
exp-to-pow66.4%
Simplified66.4%
Taylor expanded in t around 0 63.9%
Taylor expanded in y around 0 57.0%
Taylor expanded in b around 0 36.3%
+-commutative36.3%
mul-1-neg36.3%
unsub-neg36.3%
times-frac38.3%
Simplified38.3%
Taylor expanded in y around 0 42.0%
if -7.59999999999999971e-307 < b < 7.99999999999999987e-170Initial program 98.3%
associate-*l/89.9%
*-commutative89.9%
+-commutative89.9%
associate--l+89.9%
exp-sum81.9%
*-commutative81.9%
exp-to-pow82.9%
sub-neg82.9%
metadata-eval82.9%
exp-diff82.9%
*-commutative82.9%
exp-to-pow82.9%
Simplified82.9%
Taylor expanded in t around 0 71.9%
Taylor expanded in y around 0 31.0%
Taylor expanded in b around 0 31.0%
+-commutative31.0%
mul-1-neg31.0%
unsub-neg31.0%
times-frac31.0%
Simplified31.0%
Taylor expanded in b around -inf 51.9%
if 7.99999999999999987e-170 < b Initial program 99.5%
associate-*l/88.6%
*-commutative88.6%
+-commutative88.6%
associate--l+88.6%
exp-sum72.3%
*-commutative72.3%
exp-to-pow72.5%
sub-neg72.5%
metadata-eval72.5%
exp-diff63.3%
*-commutative63.3%
exp-to-pow63.3%
Simplified63.3%
Taylor expanded in t around 0 68.7%
times-frac66.7%
Simplified66.7%
Taylor expanded in b around 0 55.1%
Taylor expanded in y around 0 41.0%
+-commutative41.0%
Simplified41.0%
Final simplification42.5%
(FPCore (x y z t a b) :precision binary64 (if (<= a 1.15e-119) (/ (/ x y) a) (* x (/ 1.0 (* y a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 1.15e-119) {
tmp = (x / y) / a;
} else {
tmp = x * (1.0 / (y * a));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= 1.15d-119) then
tmp = (x / y) / a
else
tmp = x * (1.0d0 / (y * a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 1.15e-119) {
tmp = (x / y) / a;
} else {
tmp = x * (1.0 / (y * a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= 1.15e-119: tmp = (x / y) / a else: tmp = x * (1.0 / (y * a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= 1.15e-119) tmp = Float64(Float64(x / y) / a); else tmp = Float64(x * Float64(1.0 / Float64(y * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= 1.15e-119) tmp = (x / y) / a; else tmp = x * (1.0 / (y * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, 1.15e-119], N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision], N[(x * N[(1.0 / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.15 \cdot 10^{-119}:\\
\;\;\;\;\frac{\frac{x}{y}}{a}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1}{y \cdot a}\\
\end{array}
\end{array}
if a < 1.14999999999999997e-119Initial program 99.2%
Taylor expanded in t around 0 82.4%
mul-1-neg82.4%
Simplified82.4%
Taylor expanded in y around 0 48.1%
associate-/l*50.1%
+-commutative50.1%
distribute-neg-in50.1%
neg-mul-150.1%
sub-neg50.1%
associate-/l*48.1%
*-commutative48.1%
exp-diff48.1%
neg-mul-148.1%
associate-*r/43.2%
log-rec43.2%
rem-exp-log43.4%
associate-*r/43.4%
*-rgt-identity43.4%
associate-/r*43.4%
*-commutative43.4%
Simplified48.0%
Taylor expanded in b around 0 31.8%
if 1.14999999999999997e-119 < a Initial program 98.3%
associate-*l/87.4%
*-commutative87.4%
+-commutative87.4%
associate--l+87.4%
exp-sum74.8%
*-commutative74.8%
exp-to-pow75.3%
sub-neg75.3%
metadata-eval75.3%
exp-diff67.8%
*-commutative67.8%
exp-to-pow67.8%
Simplified67.8%
Taylor expanded in t around 0 64.4%
Taylor expanded in y around 0 62.7%
Taylor expanded in b around 0 34.4%
*-commutative34.4%
Simplified34.4%
div-inv35.0%
Applied egg-rr35.0%
Final simplification33.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b 2.3e-12) (/ (/ x y) a) (/ x (* a (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 2.3e-12) {
tmp = (x / y) / a;
} else {
tmp = x / (a * (y * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= 2.3d-12) then
tmp = (x / y) / a
else
tmp = x / (a * (y * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 2.3e-12) {
tmp = (x / y) / a;
} else {
tmp = x / (a * (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 2.3e-12: tmp = (x / y) / a else: tmp = x / (a * (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 2.3e-12) tmp = Float64(Float64(x / y) / a); else tmp = Float64(x / Float64(a * Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 2.3e-12) tmp = (x / y) / a; else tmp = x / (a * (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 2.3e-12], N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision], N[(x / N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.3 \cdot 10^{-12}:\\
\;\;\;\;\frac{\frac{x}{y}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot b\right)}\\
\end{array}
\end{array}
if b < 2.29999999999999989e-12Initial program 98.2%
Taylor expanded in t around 0 76.2%
mul-1-neg76.2%
Simplified76.2%
Taylor expanded in y around 0 49.9%
associate-/l*50.5%
+-commutative50.5%
distribute-neg-in50.5%
neg-mul-150.5%
sub-neg50.5%
associate-/l*49.9%
*-commutative49.9%
exp-diff49.9%
neg-mul-149.9%
associate-*r/47.3%
log-rec47.3%
rem-exp-log47.8%
associate-*r/47.8%
*-rgt-identity47.8%
associate-/r*47.8%
*-commutative47.8%
Simplified49.2%
Taylor expanded in b around 0 33.9%
if 2.29999999999999989e-12 < b Initial program 100.0%
associate-*l/91.9%
*-commutative91.9%
+-commutative91.9%
associate--l+91.9%
exp-sum71.0%
*-commutative71.0%
exp-to-pow71.0%
sub-neg71.0%
metadata-eval71.0%
exp-diff56.5%
*-commutative56.5%
exp-to-pow56.5%
Simplified56.5%
Taylor expanded in t around 0 66.4%
Taylor expanded in y around 0 74.6%
Taylor expanded in b around 0 39.0%
Taylor expanded in b around inf 39.0%
Final simplification35.2%
(FPCore (x y z t a b) :precision binary64 (if (<= b 2.3e-12) (/ (/ x y) a) (/ x (* y (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 2.3e-12) {
tmp = (x / y) / a;
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= 2.3d-12) then
tmp = (x / y) / a
else
tmp = x / (y * (a * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 2.3e-12) {
tmp = (x / y) / a;
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 2.3e-12: tmp = (x / y) / a else: tmp = x / (y * (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 2.3e-12) tmp = Float64(Float64(x / y) / a); else tmp = Float64(x / Float64(y * Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 2.3e-12) tmp = (x / y) / a; else tmp = x / (y * (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 2.3e-12], N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision], N[(x / N[(y * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.3 \cdot 10^{-12}:\\
\;\;\;\;\frac{\frac{x}{y}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot b\right)}\\
\end{array}
\end{array}
if b < 2.29999999999999989e-12Initial program 98.2%
Taylor expanded in t around 0 76.2%
mul-1-neg76.2%
Simplified76.2%
Taylor expanded in y around 0 49.9%
associate-/l*50.5%
+-commutative50.5%
distribute-neg-in50.5%
neg-mul-150.5%
sub-neg50.5%
associate-/l*49.9%
*-commutative49.9%
exp-diff49.9%
neg-mul-149.9%
associate-*r/47.3%
log-rec47.3%
rem-exp-log47.8%
associate-*r/47.8%
*-rgt-identity47.8%
associate-/r*47.8%
*-commutative47.8%
Simplified49.2%
Taylor expanded in b around 0 33.9%
if 2.29999999999999989e-12 < b Initial program 100.0%
associate-*l/91.9%
*-commutative91.9%
+-commutative91.9%
associate--l+91.9%
exp-sum71.0%
*-commutative71.0%
exp-to-pow71.0%
sub-neg71.0%
metadata-eval71.0%
exp-diff56.5%
*-commutative56.5%
exp-to-pow56.5%
Simplified56.5%
Taylor expanded in t around 0 66.4%
Taylor expanded in y around 0 74.6%
Taylor expanded in b around 0 39.0%
Taylor expanded in b around -inf 39.5%
Final simplification35.3%
(FPCore (x y z t a b) :precision binary64 (if (<= t 1.35e-94) (/ x (* y a)) (/ (/ x a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 1.35e-94) {
tmp = x / (y * a);
} else {
tmp = (x / a) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= 1.35d-94) then
tmp = x / (y * a)
else
tmp = (x / a) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 1.35e-94) {
tmp = x / (y * a);
} else {
tmp = (x / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= 1.35e-94: tmp = x / (y * a) else: tmp = (x / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= 1.35e-94) tmp = Float64(x / Float64(y * a)); else tmp = Float64(Float64(x / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= 1.35e-94) tmp = x / (y * a); else tmp = (x / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, 1.35e-94], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.35 \cdot 10^{-94}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if t < 1.3500000000000001e-94Initial program 98.2%
associate-*l/87.8%
*-commutative87.8%
+-commutative87.8%
associate--l+87.8%
exp-sum77.9%
*-commutative77.9%
exp-to-pow78.6%
sub-neg78.6%
metadata-eval78.6%
exp-diff71.3%
*-commutative71.3%
exp-to-pow71.3%
Simplified71.3%
Taylor expanded in t around 0 75.4%
Taylor expanded in y around 0 63.2%
Taylor expanded in b around 0 37.1%
*-commutative37.1%
Simplified37.1%
if 1.3500000000000001e-94 < t Initial program 99.8%
Taylor expanded in y around 0 83.9%
Taylor expanded in b around 0 73.3%
Taylor expanded in t around 0 21.8%
Final simplification33.2%
(FPCore (x y z t a b) :precision binary64 (if (<= a 1.08e-119) (/ (/ x y) a) (/ x (* y a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 1.08e-119) {
tmp = (x / y) / a;
} else {
tmp = x / (y * a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= 1.08d-119) then
tmp = (x / y) / a
else
tmp = x / (y * a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 1.08e-119) {
tmp = (x / y) / a;
} else {
tmp = x / (y * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= 1.08e-119: tmp = (x / y) / a else: tmp = x / (y * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= 1.08e-119) tmp = Float64(Float64(x / y) / a); else tmp = Float64(x / Float64(y * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= 1.08e-119) tmp = (x / y) / a; else tmp = x / (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, 1.08e-119], N[(N[(x / y), $MachinePrecision] / a), $MachinePrecision], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.08 \cdot 10^{-119}:\\
\;\;\;\;\frac{\frac{x}{y}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\end{array}
\end{array}
if a < 1.0799999999999999e-119Initial program 99.2%
Taylor expanded in t around 0 82.4%
mul-1-neg82.4%
Simplified82.4%
Taylor expanded in y around 0 48.1%
associate-/l*50.1%
+-commutative50.1%
distribute-neg-in50.1%
neg-mul-150.1%
sub-neg50.1%
associate-/l*48.1%
*-commutative48.1%
exp-diff48.1%
neg-mul-148.1%
associate-*r/43.2%
log-rec43.2%
rem-exp-log43.4%
associate-*r/43.4%
*-rgt-identity43.4%
associate-/r*43.4%
*-commutative43.4%
Simplified48.0%
Taylor expanded in b around 0 31.8%
if 1.0799999999999999e-119 < a Initial program 98.3%
associate-*l/87.4%
*-commutative87.4%
+-commutative87.4%
associate--l+87.4%
exp-sum74.8%
*-commutative74.8%
exp-to-pow75.3%
sub-neg75.3%
metadata-eval75.3%
exp-diff67.8%
*-commutative67.8%
exp-to-pow67.8%
Simplified67.8%
Taylor expanded in t around 0 64.4%
Taylor expanded in y around 0 62.7%
Taylor expanded in b around 0 34.4%
*-commutative34.4%
Simplified34.4%
Final simplification33.6%
(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.6%
associate-*l/88.5%
*-commutative88.5%
+-commutative88.5%
associate--l+88.5%
exp-sum74.8%
*-commutative74.8%
exp-to-pow75.3%
sub-neg75.3%
metadata-eval75.3%
exp-diff66.7%
*-commutative66.7%
exp-to-pow66.7%
Simplified66.7%
Taylor expanded in t around 0 66.5%
Taylor expanded in y around 0 57.0%
Taylor expanded in b around 0 31.4%
*-commutative31.4%
Simplified31.4%
Final simplification31.4%
(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 2023274
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2, A"
:precision binary64
:herbie-target
(if (< t -0.8845848504127471) (/ (* x (/ (pow a (- t 1.0)) y)) (- (+ b 1.0) (* y (log z)))) (if (< t 852031.2288374073) (/ (* (/ x y) (pow a (- t 1.0))) (exp (- b (* (log z) y)))) (/ (* x (/ (pow a (- t 1.0)) y)) (- (+ b 1.0) (* y (log z))))))
(/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))