
(FPCore (x y z t a b) :precision binary64 (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x * exp(((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))))
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)) + (a * (Math.log((1.0 - z)) - b))));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x * exp(((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))))
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)) + (a * (Math.log((1.0 - z)) - b))));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
\end{array}
(FPCore (x y z t a b) :precision binary64 (* x (exp (fma y (- (log z) t) (* a (- (log1p (- z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(fma(y, (log(z) - t), (a * (log1p(-z) - b))));
}
function code(x, y, z, t, a, b) return Float64(x * exp(fma(y, Float64(log(z) - t), Float64(a * Float64(log1p(Float64(-z)) - b))))) end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(a * N[(N[Log[1 + (-z)], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)\right)}
\end{array}
Initial program 97.7%
fma-def97.7%
sub-neg97.7%
log1p-def100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (x y z t a b) :precision binary64 (* x (exp (+ (* a (- (log (- 1.0 z)) b)) (* y (- (log z) t))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((a * (log((1.0 - z)) - b)) + (y * (log(z) - t))));
}
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(((a * (log((1.0d0 - z)) - b)) + (y * (log(z) - t))))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x * Math.exp(((a * (Math.log((1.0 - z)) - b)) + (y * (Math.log(z) - t))));
}
def code(x, y, z, t, a, b): return x * math.exp(((a * (math.log((1.0 - z)) - b)) + (y * (math.log(z) - t))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(a * Float64(log(Float64(1.0 - z)) - b)) + Float64(y * Float64(log(z) - t))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((a * (log((1.0 - z)) - b)) + (y * (log(z) - t)))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision] + N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \left(\log z - t\right)}
\end{array}
Initial program 97.7%
Final simplification97.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -4050000000.0) (not (<= y 2.2e+31))) (* x (exp (* y (- (log z) t)))) (* x (exp (- (- (* y t)) (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4050000000.0) || !(y <= 2.2e+31)) {
tmp = x * exp((y * (log(z) - t)));
} else {
tmp = x * exp((-(y * t) - (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 ((y <= (-4050000000.0d0)) .or. (.not. (y <= 2.2d+31))) then
tmp = x * exp((y * (log(z) - t)))
else
tmp = x * exp((-(y * t) - (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 ((y <= -4050000000.0) || !(y <= 2.2e+31)) {
tmp = x * Math.exp((y * (Math.log(z) - t)));
} else {
tmp = x * Math.exp((-(y * t) - (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -4050000000.0) or not (y <= 2.2e+31): tmp = x * math.exp((y * (math.log(z) - t))) else: tmp = x * math.exp((-(y * t) - (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -4050000000.0) || !(y <= 2.2e+31)) tmp = Float64(x * exp(Float64(y * Float64(log(z) - t)))); else tmp = Float64(x * exp(Float64(Float64(-Float64(y * t)) - Float64(a * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -4050000000.0) || ~((y <= 2.2e+31))) tmp = x * exp((y * (log(z) - t))); else tmp = x * exp((-(y * t) - (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -4050000000.0], N[Not[LessEqual[y, 2.2e+31]], $MachinePrecision]], N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[((-N[(y * t), $MachinePrecision]) - N[(a * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4050000000 \lor \neg \left(y \leq 2.2 \cdot 10^{+31}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{\left(-y \cdot t\right) - a \cdot b}\\
\end{array}
\end{array}
if y < -4.05e9 or 2.2000000000000001e31 < y Initial program 99.1%
Taylor expanded in a around 0 95.5%
if -4.05e9 < y < 2.2000000000000001e31Initial program 96.6%
fma-def96.6%
sub-neg96.6%
log1p-def99.9%
Simplified99.9%
Taylor expanded in z around 0 95.3%
Taylor expanded in t around inf 94.7%
neg-mul-154.1%
Simplified94.7%
Final simplification95.0%
(FPCore (x y z t a b) :precision binary64 (* x (exp (- (* y (- (log z) t)) (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) - (a * b)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x * exp(((y * (log(z) - t)) - (a * b)))
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)) - (a * b)));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) - (a * b)))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) - Float64(a * b)))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) - (a * b))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] - N[(a * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) - a \cdot b}
\end{array}
Initial program 97.7%
fma-def97.7%
sub-neg97.7%
log1p-def100.0%
Simplified100.0%
Taylor expanded in z around 0 96.9%
Final simplification96.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (exp (* a (- (- z) b))))) (t_2 (* x (pow z y))))
(if (<= y -2.6e+64)
t_2
(if (<= y 2.7e-15)
t_1
(if (<= y 6.2e+23)
(* x (exp (- (* y t))))
(if (<= y 1.7e+37) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * exp((a * (-z - b)));
double t_2 = x * pow(z, y);
double tmp;
if (y <= -2.6e+64) {
tmp = t_2;
} else if (y <= 2.7e-15) {
tmp = t_1;
} else if (y <= 6.2e+23) {
tmp = x * exp(-(y * t));
} else if (y <= 1.7e+37) {
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 * exp((a * (-z - b)))
t_2 = x * (z ** y)
if (y <= (-2.6d+64)) then
tmp = t_2
else if (y <= 2.7d-15) then
tmp = t_1
else if (y <= 6.2d+23) then
tmp = x * exp(-(y * t))
else if (y <= 1.7d+37) 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.exp((a * (-z - b)));
double t_2 = x * Math.pow(z, y);
double tmp;
if (y <= -2.6e+64) {
tmp = t_2;
} else if (y <= 2.7e-15) {
tmp = t_1;
} else if (y <= 6.2e+23) {
tmp = x * Math.exp(-(y * t));
} else if (y <= 1.7e+37) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.exp((a * (-z - b))) t_2 = x * math.pow(z, y) tmp = 0 if y <= -2.6e+64: tmp = t_2 elif y <= 2.7e-15: tmp = t_1 elif y <= 6.2e+23: tmp = x * math.exp(-(y * t)) elif y <= 1.7e+37: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * exp(Float64(a * Float64(Float64(-z) - b)))) t_2 = Float64(x * (z ^ y)) tmp = 0.0 if (y <= -2.6e+64) tmp = t_2; elseif (y <= 2.7e-15) tmp = t_1; elseif (y <= 6.2e+23) tmp = Float64(x * exp(Float64(-Float64(y * t)))); elseif (y <= 1.7e+37) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * exp((a * (-z - b))); t_2 = x * (z ^ y); tmp = 0.0; if (y <= -2.6e+64) tmp = t_2; elseif (y <= 2.7e-15) tmp = t_1; elseif (y <= 6.2e+23) tmp = x * exp(-(y * t)); elseif (y <= 1.7e+37) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[N[(a * N[((-z) - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.6e+64], t$95$2, If[LessEqual[y, 2.7e-15], t$95$1, If[LessEqual[y, 6.2e+23], N[(x * N[Exp[(-N[(y * t), $MachinePrecision])], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.7e+37], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\
t_2 := x \cdot {z}^{y}\\
\mathbf{if}\;y \leq -2.6 \cdot 10^{+64}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{-15}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{+23}:\\
\;\;\;\;x \cdot e^{-y \cdot t}\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{+37}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -2.59999999999999997e64 or 1.70000000000000003e37 < y Initial program 100.0%
Taylor expanded in a around 0 96.1%
Taylor expanded in t around 0 78.3%
if -2.59999999999999997e64 < y < 2.70000000000000009e-15 or 6.19999999999999941e23 < y < 1.70000000000000003e37Initial program 96.6%
Taylor expanded in y around 0 82.7%
sub-neg82.7%
neg-mul-182.7%
log1p-def88.1%
neg-mul-188.1%
Simplified88.1%
Taylor expanded in z around 0 88.1%
neg-mul-188.1%
unsub-neg88.1%
neg-mul-188.1%
Simplified88.1%
if 2.70000000000000009e-15 < y < 6.19999999999999941e23Initial program 91.1%
Taylor expanded in a around 0 82.2%
Taylor expanded in t around inf 74.0%
neg-mul-174.0%
Simplified74.0%
Final simplification83.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (pow z y))))
(if (<= y -4.2e+14)
t_1
(if (<= y 9.5e-17)
(* x (exp (* a (- b))))
(if (<= y 1.12e+24)
(* x (exp (- (* y t))))
(if (<= y 2e+31)
(/ (* (* a a) (* (* b b) (* x (- x)))) (+ x (* a (* x b))))
t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * pow(z, y);
double tmp;
if (y <= -4.2e+14) {
tmp = t_1;
} else if (y <= 9.5e-17) {
tmp = x * exp((a * -b));
} else if (y <= 1.12e+24) {
tmp = x * exp(-(y * t));
} else if (y <= 2e+31) {
tmp = ((a * a) * ((b * b) * (x * -x))) / (x + (a * (x * b)));
} 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)
if (y <= (-4.2d+14)) then
tmp = t_1
else if (y <= 9.5d-17) then
tmp = x * exp((a * -b))
else if (y <= 1.12d+24) then
tmp = x * exp(-(y * t))
else if (y <= 2d+31) then
tmp = ((a * a) * ((b * b) * (x * -x))) / (x + (a * (x * b)))
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);
double tmp;
if (y <= -4.2e+14) {
tmp = t_1;
} else if (y <= 9.5e-17) {
tmp = x * Math.exp((a * -b));
} else if (y <= 1.12e+24) {
tmp = x * Math.exp(-(y * t));
} else if (y <= 2e+31) {
tmp = ((a * a) * ((b * b) * (x * -x))) / (x + (a * (x * b)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.pow(z, y) tmp = 0 if y <= -4.2e+14: tmp = t_1 elif y <= 9.5e-17: tmp = x * math.exp((a * -b)) elif y <= 1.12e+24: tmp = x * math.exp(-(y * t)) elif y <= 2e+31: tmp = ((a * a) * ((b * b) * (x * -x))) / (x + (a * (x * b))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * (z ^ y)) tmp = 0.0 if (y <= -4.2e+14) tmp = t_1; elseif (y <= 9.5e-17) tmp = Float64(x * exp(Float64(a * Float64(-b)))); elseif (y <= 1.12e+24) tmp = Float64(x * exp(Float64(-Float64(y * t)))); elseif (y <= 2e+31) tmp = Float64(Float64(Float64(a * a) * Float64(Float64(b * b) * Float64(x * Float64(-x)))) / Float64(x + Float64(a * Float64(x * b)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * (z ^ y); tmp = 0.0; if (y <= -4.2e+14) tmp = t_1; elseif (y <= 9.5e-17) tmp = x * exp((a * -b)); elseif (y <= 1.12e+24) tmp = x * exp(-(y * t)); elseif (y <= 2e+31) tmp = ((a * a) * ((b * b) * (x * -x))) / (x + (a * (x * b))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.2e+14], t$95$1, If[LessEqual[y, 9.5e-17], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.12e+24], N[(x * N[Exp[(-N[(y * t), $MachinePrecision])], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2e+31], N[(N[(N[(a * a), $MachinePrecision] * N[(N[(b * b), $MachinePrecision] * N[(x * (-x)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot {z}^{y}\\
\mathbf{if}\;y \leq -4.2 \cdot 10^{+14}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{-17}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\mathbf{elif}\;y \leq 1.12 \cdot 10^{+24}:\\
\;\;\;\;x \cdot e^{-y \cdot t}\\
\mathbf{elif}\;y \leq 2 \cdot 10^{+31}:\\
\;\;\;\;\frac{\left(a \cdot a\right) \cdot \left(\left(b \cdot b\right) \cdot \left(x \cdot \left(-x\right)\right)\right)}{x + a \cdot \left(x \cdot b\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -4.2e14 or 1.9999999999999999e31 < y Initial program 99.1%
Taylor expanded in a around 0 95.4%
Taylor expanded in t around 0 77.0%
if -4.2e14 < y < 9.50000000000000029e-17Initial program 97.1%
Taylor expanded in b around inf 82.3%
mul-1-neg82.3%
*-commutative82.3%
distribute-rgt-neg-in82.3%
Simplified82.3%
if 9.50000000000000029e-17 < y < 1.12e24Initial program 91.1%
Taylor expanded in a around 0 82.2%
Taylor expanded in t around inf 74.0%
neg-mul-174.0%
Simplified74.0%
if 1.12e24 < y < 1.9999999999999999e31Initial program 100.0%
Taylor expanded in b around inf 100.0%
mul-1-neg100.0%
*-commutative100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in b around 0 5.7%
+-commutative5.7%
mul-1-neg5.7%
unsub-neg5.7%
Simplified5.7%
cancel-sign-sub-inv5.7%
flip-+100.0%
Applied egg-rr100.0%
Taylor expanded in a around inf 100.0%
mul-1-neg100.0%
unpow2100.0%
unpow2100.0%
unpow2100.0%
Simplified100.0%
Final simplification79.9%
(FPCore (x y z t a b) :precision binary64 (if (<= y 1.55e+73) (* x (exp (- (- (* y t)) (* a b)))) (* x (pow z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 1.55e+73) {
tmp = x * exp((-(y * t) - (a * b)));
} else {
tmp = x * pow(z, 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.55d+73) then
tmp = x * exp((-(y * t) - (a * b)))
else
tmp = x * (z ** 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.55e+73) {
tmp = x * Math.exp((-(y * t) - (a * b)));
} else {
tmp = x * Math.pow(z, y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 1.55e+73: tmp = x * math.exp((-(y * t) - (a * b))) else: tmp = x * math.pow(z, y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 1.55e+73) tmp = Float64(x * exp(Float64(Float64(-Float64(y * t)) - Float64(a * b)))); else tmp = Float64(x * (z ^ y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 1.55e+73) tmp = x * exp((-(y * t) - (a * b))); else tmp = x * (z ^ y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 1.55e+73], N[(x * N[Exp[N[((-N[(y * t), $MachinePrecision]) - N[(a * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.55 \cdot 10^{+73}:\\
\;\;\;\;x \cdot e^{\left(-y \cdot t\right) - a \cdot b}\\
\mathbf{else}:\\
\;\;\;\;x \cdot {z}^{y}\\
\end{array}
\end{array}
if y < 1.55e73Initial program 97.0%
fma-def97.0%
sub-neg97.0%
log1p-def100.0%
Simplified100.0%
Taylor expanded in z around 0 96.1%
Taylor expanded in t around inf 87.9%
neg-mul-154.8%
Simplified87.9%
if 1.55e73 < y Initial program 100.0%
Taylor expanded in a around 0 96.4%
Taylor expanded in t around 0 80.3%
Final simplification86.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -4.2e+14) (not (<= y 2.6e+31))) (* x (pow z y)) (* x (exp (* a (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4.2e+14) || !(y <= 2.6e+31)) {
tmp = x * pow(z, y);
} else {
tmp = x * exp((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 ((y <= (-4.2d+14)) .or. (.not. (y <= 2.6d+31))) then
tmp = x * (z ** y)
else
tmp = x * exp((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 ((y <= -4.2e+14) || !(y <= 2.6e+31)) {
tmp = x * Math.pow(z, y);
} else {
tmp = x * Math.exp((a * -b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -4.2e+14) or not (y <= 2.6e+31): tmp = x * math.pow(z, y) else: tmp = x * math.exp((a * -b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -4.2e+14) || !(y <= 2.6e+31)) tmp = Float64(x * (z ^ y)); else tmp = Float64(x * exp(Float64(a * Float64(-b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -4.2e+14) || ~((y <= 2.6e+31))) tmp = x * (z ^ y); else tmp = x * exp((a * -b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -4.2e+14], N[Not[LessEqual[y, 2.6e+31]], $MachinePrecision]], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{+14} \lor \neg \left(y \leq 2.6 \cdot 10^{+31}\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\end{array}
\end{array}
if y < -4.2e14 or 2.6e31 < y Initial program 99.1%
Taylor expanded in a around 0 95.4%
Taylor expanded in t around 0 77.0%
if -4.2e14 < y < 2.6e31Initial program 96.7%
Taylor expanded in b around inf 78.7%
mul-1-neg78.7%
*-commutative78.7%
distribute-rgt-neg-in78.7%
Simplified78.7%
Final simplification78.0%
(FPCore (x y z t a b) :precision binary64 (if (<= t -70000.0) (* x (- 1.0 (* y t))) (* x (pow z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -70000.0) {
tmp = x * (1.0 - (y * t));
} else {
tmp = x * pow(z, 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 <= (-70000.0d0)) then
tmp = x * (1.0d0 - (y * t))
else
tmp = x * (z ** 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 <= -70000.0) {
tmp = x * (1.0 - (y * t));
} else {
tmp = x * Math.pow(z, y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -70000.0: tmp = x * (1.0 - (y * t)) else: tmp = x * math.pow(z, y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -70000.0) tmp = Float64(x * Float64(1.0 - Float64(y * t))); else tmp = Float64(x * (z ^ y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -70000.0) tmp = x * (1.0 - (y * t)); else tmp = x * (z ^ y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -70000.0], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -70000:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot {z}^{y}\\
\end{array}
\end{array}
if t < -7e4Initial program 100.0%
Taylor expanded in a around 0 74.0%
Taylor expanded in t around inf 74.0%
neg-mul-174.0%
Simplified74.0%
Taylor expanded in t around 0 33.8%
+-commutative33.8%
mul-1-neg33.8%
*-commutative33.8%
unsub-neg33.8%
*-commutative33.8%
Simplified33.8%
if -7e4 < t Initial program 97.0%
Taylor expanded in a around 0 72.0%
Taylor expanded in t around 0 65.0%
Final simplification58.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (* x b))) (t_2 (+ x t_1)))
(if (<= y -6.2e-93)
(/ (* x x) t_2)
(if (<= y 1.52e-55)
(- x t_1)
(if (<= y 7.5e+14)
(/ (- (* x x) (* t_1 t_1)) t_2)
(if (<= y 9.5e+176)
(/ (* (* a a) (* (* b b) (* x (- x)))) t_2)
(- (* y (* x t)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (x * b);
double t_2 = x + t_1;
double tmp;
if (y <= -6.2e-93) {
tmp = (x * x) / t_2;
} else if (y <= 1.52e-55) {
tmp = x - t_1;
} else if (y <= 7.5e+14) {
tmp = ((x * x) - (t_1 * t_1)) / t_2;
} else if (y <= 9.5e+176) {
tmp = ((a * a) * ((b * b) * (x * -x))) / t_2;
} else {
tmp = -(y * (x * t));
}
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 * (x * b)
t_2 = x + t_1
if (y <= (-6.2d-93)) then
tmp = (x * x) / t_2
else if (y <= 1.52d-55) then
tmp = x - t_1
else if (y <= 7.5d+14) then
tmp = ((x * x) - (t_1 * t_1)) / t_2
else if (y <= 9.5d+176) then
tmp = ((a * a) * ((b * b) * (x * -x))) / t_2
else
tmp = -(y * (x * t))
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 = a * (x * b);
double t_2 = x + t_1;
double tmp;
if (y <= -6.2e-93) {
tmp = (x * x) / t_2;
} else if (y <= 1.52e-55) {
tmp = x - t_1;
} else if (y <= 7.5e+14) {
tmp = ((x * x) - (t_1 * t_1)) / t_2;
} else if (y <= 9.5e+176) {
tmp = ((a * a) * ((b * b) * (x * -x))) / t_2;
} else {
tmp = -(y * (x * t));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (x * b) t_2 = x + t_1 tmp = 0 if y <= -6.2e-93: tmp = (x * x) / t_2 elif y <= 1.52e-55: tmp = x - t_1 elif y <= 7.5e+14: tmp = ((x * x) - (t_1 * t_1)) / t_2 elif y <= 9.5e+176: tmp = ((a * a) * ((b * b) * (x * -x))) / t_2 else: tmp = -(y * (x * t)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(x * b)) t_2 = Float64(x + t_1) tmp = 0.0 if (y <= -6.2e-93) tmp = Float64(Float64(x * x) / t_2); elseif (y <= 1.52e-55) tmp = Float64(x - t_1); elseif (y <= 7.5e+14) tmp = Float64(Float64(Float64(x * x) - Float64(t_1 * t_1)) / t_2); elseif (y <= 9.5e+176) tmp = Float64(Float64(Float64(a * a) * Float64(Float64(b * b) * Float64(x * Float64(-x)))) / t_2); else tmp = Float64(-Float64(y * Float64(x * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (x * b); t_2 = x + t_1; tmp = 0.0; if (y <= -6.2e-93) tmp = (x * x) / t_2; elseif (y <= 1.52e-55) tmp = x - t_1; elseif (y <= 7.5e+14) tmp = ((x * x) - (t_1 * t_1)) / t_2; elseif (y <= 9.5e+176) tmp = ((a * a) * ((b * b) * (x * -x))) / t_2; else tmp = -(y * (x * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + t$95$1), $MachinePrecision]}, If[LessEqual[y, -6.2e-93], N[(N[(x * x), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[y, 1.52e-55], N[(x - t$95$1), $MachinePrecision], If[LessEqual[y, 7.5e+14], N[(N[(N[(x * x), $MachinePrecision] - N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[y, 9.5e+176], N[(N[(N[(a * a), $MachinePrecision] * N[(N[(b * b), $MachinePrecision] * N[(x * (-x)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], (-N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision])]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(x \cdot b\right)\\
t_2 := x + t_1\\
\mathbf{if}\;y \leq -6.2 \cdot 10^{-93}:\\
\;\;\;\;\frac{x \cdot x}{t_2}\\
\mathbf{elif}\;y \leq 1.52 \cdot 10^{-55}:\\
\;\;\;\;x - t_1\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+14}:\\
\;\;\;\;\frac{x \cdot x - t_1 \cdot t_1}{t_2}\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{+176}:\\
\;\;\;\;\frac{\left(a \cdot a\right) \cdot \left(\left(b \cdot b\right) \cdot \left(x \cdot \left(-x\right)\right)\right)}{t_2}\\
\mathbf{else}:\\
\;\;\;\;-y \cdot \left(x \cdot t\right)\\
\end{array}
\end{array}
if y < -6.19999999999999999e-93Initial program 100.0%
Taylor expanded in b around inf 44.2%
mul-1-neg44.2%
*-commutative44.2%
distribute-rgt-neg-in44.2%
Simplified44.2%
Taylor expanded in b around 0 11.1%
+-commutative11.1%
mul-1-neg11.1%
unsub-neg11.1%
Simplified11.1%
cancel-sign-sub-inv11.1%
flip-+25.2%
Applied egg-rr25.2%
Taylor expanded in a around 0 33.1%
unpow233.1%
Simplified33.1%
if -6.19999999999999999e-93 < y < 1.5200000000000001e-55Initial program 95.9%
Taylor expanded in b around inf 86.3%
mul-1-neg86.3%
*-commutative86.3%
distribute-rgt-neg-in86.3%
Simplified86.3%
Taylor expanded in b around 0 47.7%
+-commutative47.7%
mul-1-neg47.7%
unsub-neg47.7%
Simplified47.7%
if 1.5200000000000001e-55 < y < 7.5e14Initial program 94.3%
Taylor expanded in b around inf 59.7%
mul-1-neg59.7%
*-commutative59.7%
distribute-rgt-neg-in59.7%
Simplified59.7%
Taylor expanded in b around 0 25.3%
+-commutative25.3%
mul-1-neg25.3%
unsub-neg25.3%
Simplified25.3%
cancel-sign-sub-inv25.3%
flip-+57.6%
Applied egg-rr57.6%
if 7.5e14 < y < 9.4999999999999995e176Initial program 96.7%
Taylor expanded in b around inf 42.2%
mul-1-neg42.2%
*-commutative42.2%
distribute-rgt-neg-in42.2%
Simplified42.2%
Taylor expanded in b around 0 3.4%
+-commutative3.4%
mul-1-neg3.4%
unsub-neg3.4%
Simplified3.4%
cancel-sign-sub-inv3.4%
flip-+25.2%
Applied egg-rr25.2%
Taylor expanded in a around inf 40.7%
mul-1-neg40.7%
unpow240.7%
unpow240.7%
unpow240.7%
Simplified40.7%
if 9.4999999999999995e176 < y Initial program 100.0%
Taylor expanded in a around 0 100.0%
Taylor expanded in t around inf 54.7%
neg-mul-154.7%
Simplified54.7%
Taylor expanded in t around 0 25.0%
+-commutative25.0%
mul-1-neg25.0%
*-commutative25.0%
unsub-neg25.0%
*-commutative25.0%
Simplified25.0%
Taylor expanded in y around inf 40.5%
mul-1-neg40.5%
Simplified40.5%
Final simplification42.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* a (* x b)))) (t_2 (/ (* x x) t_1)))
(if (<= y -1.05e-102)
t_2
(if (<= y 3.2e-80)
(- x (* a (* x (+ z b))))
(if (<= y 2.9e+19)
t_2
(if (<= y 4.8e+177)
(/ (* (* a a) (* (* b b) (* x (- x)))) t_1)
(- (* y (* x t)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (a * (x * b));
double t_2 = (x * x) / t_1;
double tmp;
if (y <= -1.05e-102) {
tmp = t_2;
} else if (y <= 3.2e-80) {
tmp = x - (a * (x * (z + b)));
} else if (y <= 2.9e+19) {
tmp = t_2;
} else if (y <= 4.8e+177) {
tmp = ((a * a) * ((b * b) * (x * -x))) / t_1;
} else {
tmp = -(y * (x * t));
}
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 * (x * b))
t_2 = (x * x) / t_1
if (y <= (-1.05d-102)) then
tmp = t_2
else if (y <= 3.2d-80) then
tmp = x - (a * (x * (z + b)))
else if (y <= 2.9d+19) then
tmp = t_2
else if (y <= 4.8d+177) then
tmp = ((a * a) * ((b * b) * (x * -x))) / t_1
else
tmp = -(y * (x * t))
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 + (a * (x * b));
double t_2 = (x * x) / t_1;
double tmp;
if (y <= -1.05e-102) {
tmp = t_2;
} else if (y <= 3.2e-80) {
tmp = x - (a * (x * (z + b)));
} else if (y <= 2.9e+19) {
tmp = t_2;
} else if (y <= 4.8e+177) {
tmp = ((a * a) * ((b * b) * (x * -x))) / t_1;
} else {
tmp = -(y * (x * t));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (a * (x * b)) t_2 = (x * x) / t_1 tmp = 0 if y <= -1.05e-102: tmp = t_2 elif y <= 3.2e-80: tmp = x - (a * (x * (z + b))) elif y <= 2.9e+19: tmp = t_2 elif y <= 4.8e+177: tmp = ((a * a) * ((b * b) * (x * -x))) / t_1 else: tmp = -(y * (x * t)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(a * Float64(x * b))) t_2 = Float64(Float64(x * x) / t_1) tmp = 0.0 if (y <= -1.05e-102) tmp = t_2; elseif (y <= 3.2e-80) tmp = Float64(x - Float64(a * Float64(x * Float64(z + b)))); elseif (y <= 2.9e+19) tmp = t_2; elseif (y <= 4.8e+177) tmp = Float64(Float64(Float64(a * a) * Float64(Float64(b * b) * Float64(x * Float64(-x)))) / t_1); else tmp = Float64(-Float64(y * Float64(x * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (a * (x * b)); t_2 = (x * x) / t_1; tmp = 0.0; if (y <= -1.05e-102) tmp = t_2; elseif (y <= 3.2e-80) tmp = x - (a * (x * (z + b))); elseif (y <= 2.9e+19) tmp = t_2; elseif (y <= 4.8e+177) tmp = ((a * a) * ((b * b) * (x * -x))) / t_1; else tmp = -(y * (x * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * x), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[y, -1.05e-102], t$95$2, If[LessEqual[y, 3.2e-80], N[(x - N[(a * N[(x * N[(z + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.9e+19], t$95$2, If[LessEqual[y, 4.8e+177], N[(N[(N[(a * a), $MachinePrecision] * N[(N[(b * b), $MachinePrecision] * N[(x * (-x)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], (-N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision])]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + a \cdot \left(x \cdot b\right)\\
t_2 := \frac{x \cdot x}{t_1}\\
\mathbf{if}\;y \leq -1.05 \cdot 10^{-102}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{-80}:\\
\;\;\;\;x - a \cdot \left(x \cdot \left(z + b\right)\right)\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{+19}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{+177}:\\
\;\;\;\;\frac{\left(a \cdot a\right) \cdot \left(\left(b \cdot b\right) \cdot \left(x \cdot \left(-x\right)\right)\right)}{t_1}\\
\mathbf{else}:\\
\;\;\;\;-y \cdot \left(x \cdot t\right)\\
\end{array}
\end{array}
if y < -1.05e-102 or 3.1999999999999999e-80 < y < 2.9e19Initial program 98.1%
Taylor expanded in b around inf 49.8%
mul-1-neg49.8%
*-commutative49.8%
distribute-rgt-neg-in49.8%
Simplified49.8%
Taylor expanded in b around 0 14.4%
+-commutative14.4%
mul-1-neg14.4%
unsub-neg14.4%
Simplified14.4%
cancel-sign-sub-inv14.4%
flip-+29.0%
Applied egg-rr29.0%
Taylor expanded in a around 0 35.7%
unpow235.7%
Simplified35.7%
if -1.05e-102 < y < 3.1999999999999999e-80Initial program 96.6%
Taylor expanded in y around 0 89.3%
sub-neg89.3%
neg-mul-189.3%
log1p-def92.6%
neg-mul-192.6%
Simplified92.6%
Taylor expanded in z around 0 92.6%
neg-mul-192.6%
unsub-neg92.6%
neg-mul-192.6%
Simplified92.6%
Taylor expanded in a around 0 50.1%
+-commutative50.1%
mul-1-neg50.1%
unsub-neg50.1%
+-commutative50.1%
Simplified50.1%
if 2.9e19 < y < 4.8e177Initial program 96.5%
Taylor expanded in b around inf 41.5%
mul-1-neg41.5%
*-commutative41.5%
distribute-rgt-neg-in41.5%
Simplified41.5%
Taylor expanded in b around 0 3.5%
+-commutative3.5%
mul-1-neg3.5%
unsub-neg3.5%
Simplified3.5%
cancel-sign-sub-inv3.5%
flip-+26.9%
Applied egg-rr26.9%
Taylor expanded in a around inf 43.5%
mul-1-neg43.5%
unpow243.5%
unpow243.5%
unpow243.5%
Simplified43.5%
if 4.8e177 < y Initial program 100.0%
Taylor expanded in a around 0 100.0%
Taylor expanded in t around inf 54.7%
neg-mul-154.7%
Simplified54.7%
Taylor expanded in t around 0 25.0%
+-commutative25.0%
mul-1-neg25.0%
*-commutative25.0%
unsub-neg25.0%
*-commutative25.0%
Simplified25.0%
Taylor expanded in y around inf 40.5%
mul-1-neg40.5%
Simplified40.5%
Final simplification42.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (* x b))) (t_2 (/ (* x x) (+ x t_1))))
(if (<= y -4.6e-93)
t_2
(if (<= y -8.4e-179)
(- x t_1)
(if (<= y -3.6e-228)
t_2
(if (<= y 1.6e-10)
(/ (- 1.0 (* (* a a) (* b b))) (/ (+ (* a b) 1.0) x))
(- (* y (* x t)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (x * b);
double t_2 = (x * x) / (x + t_1);
double tmp;
if (y <= -4.6e-93) {
tmp = t_2;
} else if (y <= -8.4e-179) {
tmp = x - t_1;
} else if (y <= -3.6e-228) {
tmp = t_2;
} else if (y <= 1.6e-10) {
tmp = (1.0 - ((a * a) * (b * b))) / (((a * b) + 1.0) / x);
} else {
tmp = -(y * (x * t));
}
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 * (x * b)
t_2 = (x * x) / (x + t_1)
if (y <= (-4.6d-93)) then
tmp = t_2
else if (y <= (-8.4d-179)) then
tmp = x - t_1
else if (y <= (-3.6d-228)) then
tmp = t_2
else if (y <= 1.6d-10) then
tmp = (1.0d0 - ((a * a) * (b * b))) / (((a * b) + 1.0d0) / x)
else
tmp = -(y * (x * t))
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 = a * (x * b);
double t_2 = (x * x) / (x + t_1);
double tmp;
if (y <= -4.6e-93) {
tmp = t_2;
} else if (y <= -8.4e-179) {
tmp = x - t_1;
} else if (y <= -3.6e-228) {
tmp = t_2;
} else if (y <= 1.6e-10) {
tmp = (1.0 - ((a * a) * (b * b))) / (((a * b) + 1.0) / x);
} else {
tmp = -(y * (x * t));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (x * b) t_2 = (x * x) / (x + t_1) tmp = 0 if y <= -4.6e-93: tmp = t_2 elif y <= -8.4e-179: tmp = x - t_1 elif y <= -3.6e-228: tmp = t_2 elif y <= 1.6e-10: tmp = (1.0 - ((a * a) * (b * b))) / (((a * b) + 1.0) / x) else: tmp = -(y * (x * t)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(x * b)) t_2 = Float64(Float64(x * x) / Float64(x + t_1)) tmp = 0.0 if (y <= -4.6e-93) tmp = t_2; elseif (y <= -8.4e-179) tmp = Float64(x - t_1); elseif (y <= -3.6e-228) tmp = t_2; elseif (y <= 1.6e-10) tmp = Float64(Float64(1.0 - Float64(Float64(a * a) * Float64(b * b))) / Float64(Float64(Float64(a * b) + 1.0) / x)); else tmp = Float64(-Float64(y * Float64(x * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (x * b); t_2 = (x * x) / (x + t_1); tmp = 0.0; if (y <= -4.6e-93) tmp = t_2; elseif (y <= -8.4e-179) tmp = x - t_1; elseif (y <= -3.6e-228) tmp = t_2; elseif (y <= 1.6e-10) tmp = (1.0 - ((a * a) * (b * b))) / (((a * b) + 1.0) / x); else tmp = -(y * (x * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * x), $MachinePrecision] / N[(x + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.6e-93], t$95$2, If[LessEqual[y, -8.4e-179], N[(x - t$95$1), $MachinePrecision], If[LessEqual[y, -3.6e-228], t$95$2, If[LessEqual[y, 1.6e-10], N[(N[(1.0 - N[(N[(a * a), $MachinePrecision] * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(a * b), $MachinePrecision] + 1.0), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], (-N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision])]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(x \cdot b\right)\\
t_2 := \frac{x \cdot x}{x + t_1}\\
\mathbf{if}\;y \leq -4.6 \cdot 10^{-93}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -8.4 \cdot 10^{-179}:\\
\;\;\;\;x - t_1\\
\mathbf{elif}\;y \leq -3.6 \cdot 10^{-228}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{-10}:\\
\;\;\;\;\frac{1 - \left(a \cdot a\right) \cdot \left(b \cdot b\right)}{\frac{a \cdot b + 1}{x}}\\
\mathbf{else}:\\
\;\;\;\;-y \cdot \left(x \cdot t\right)\\
\end{array}
\end{array}
if y < -4.5999999999999996e-93 or -8.3999999999999995e-179 < y < -3.6000000000000002e-228Initial program 100.0%
Taylor expanded in b around inf 48.9%
mul-1-neg48.9%
*-commutative48.9%
distribute-rgt-neg-in48.9%
Simplified48.9%
Taylor expanded in b around 0 15.0%
+-commutative15.0%
mul-1-neg15.0%
unsub-neg15.0%
Simplified15.0%
cancel-sign-sub-inv15.0%
flip-+26.7%
Applied egg-rr26.7%
Taylor expanded in a around 0 37.5%
unpow237.5%
Simplified37.5%
if -4.5999999999999996e-93 < y < -8.3999999999999995e-179Initial program 99.9%
Taylor expanded in b around inf 82.2%
mul-1-neg82.2%
*-commutative82.2%
distribute-rgt-neg-in82.2%
Simplified82.2%
Taylor expanded in b around 0 58.3%
+-commutative58.3%
mul-1-neg58.3%
unsub-neg58.3%
Simplified58.3%
if -3.6000000000000002e-228 < y < 1.5999999999999999e-10Initial program 95.3%
Taylor expanded in b around inf 86.0%
mul-1-neg86.0%
*-commutative86.0%
distribute-rgt-neg-in86.0%
Simplified86.0%
Taylor expanded in b around 0 44.5%
+-commutative44.5%
mul-1-neg44.5%
unsub-neg44.5%
Simplified44.5%
cancel-sign-sub-inv44.5%
flip-+33.8%
Applied egg-rr33.8%
Taylor expanded in x around 0 51.6%
neg-mul-151.6%
distribute-lft-neg-in51.6%
cancel-sign-sub51.6%
+-commutative51.6%
associate-/l*47.8%
unpow247.8%
unpow247.8%
+-commutative47.8%
cancel-sign-sub47.8%
Simplified47.8%
if 1.5999999999999999e-10 < y Initial program 97.4%
Taylor expanded in a around 0 90.7%
Taylor expanded in t around inf 46.5%
neg-mul-146.5%
Simplified46.5%
Taylor expanded in t around 0 20.3%
+-commutative20.3%
mul-1-neg20.3%
*-commutative20.3%
unsub-neg20.3%
*-commutative20.3%
Simplified20.3%
Taylor expanded in y around inf 31.7%
mul-1-neg31.7%
Simplified31.7%
Final simplification40.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.3e-93) (not (<= y 2e-80))) (/ (* x x) (+ x (* a (* x b)))) (- x (* a (* x (+ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.3e-93) || !(y <= 2e-80)) {
tmp = (x * x) / (x + (a * (x * b)));
} else {
tmp = x - (a * (x * (z + 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 <= (-2.3d-93)) .or. (.not. (y <= 2d-80))) then
tmp = (x * x) / (x + (a * (x * b)))
else
tmp = x - (a * (x * (z + 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 <= -2.3e-93) || !(y <= 2e-80)) {
tmp = (x * x) / (x + (a * (x * b)));
} else {
tmp = x - (a * (x * (z + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.3e-93) or not (y <= 2e-80): tmp = (x * x) / (x + (a * (x * b))) else: tmp = x - (a * (x * (z + b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.3e-93) || !(y <= 2e-80)) tmp = Float64(Float64(x * x) / Float64(x + Float64(a * Float64(x * b)))); else tmp = Float64(x - Float64(a * Float64(x * Float64(z + b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2.3e-93) || ~((y <= 2e-80))) tmp = (x * x) / (x + (a * (x * b))); else tmp = x - (a * (x * (z + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.3e-93], N[Not[LessEqual[y, 2e-80]], $MachinePrecision]], N[(N[(x * x), $MachinePrecision] / N[(x + N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(a * N[(x * N[(z + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.3 \cdot 10^{-93} \lor \neg \left(y \leq 2 \cdot 10^{-80}\right):\\
\;\;\;\;\frac{x \cdot x}{x + a \cdot \left(x \cdot b\right)}\\
\mathbf{else}:\\
\;\;\;\;x - a \cdot \left(x \cdot \left(z + b\right)\right)\\
\end{array}
\end{array}
if y < -2.2999999999999998e-93 or 1.99999999999999992e-80 < y Initial program 98.2%
Taylor expanded in b around inf 44.3%
mul-1-neg44.3%
*-commutative44.3%
distribute-rgt-neg-in44.3%
Simplified44.3%
Taylor expanded in b around 0 10.3%
+-commutative10.3%
mul-1-neg10.3%
unsub-neg10.3%
Simplified10.3%
cancel-sign-sub-inv10.3%
flip-+28.7%
Applied egg-rr28.7%
Taylor expanded in a around 0 33.0%
unpow233.0%
Simplified33.0%
if -2.2999999999999998e-93 < y < 1.99999999999999992e-80Initial program 96.6%
Taylor expanded in y around 0 89.3%
sub-neg89.3%
neg-mul-189.3%
log1p-def92.6%
neg-mul-192.6%
Simplified92.6%
Taylor expanded in z around 0 92.6%
neg-mul-192.6%
unsub-neg92.6%
neg-mul-192.6%
Simplified92.6%
Taylor expanded in a around 0 50.1%
+-commutative50.1%
mul-1-neg50.1%
unsub-neg50.1%
+-commutative50.1%
Simplified50.1%
Final simplification38.9%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.6e-33) (* a (* x (- b))) (if (<= y 1.1e-12) (- x (* a (* x (+ z b)))) (- (* y (* x t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.6e-33) {
tmp = a * (x * -b);
} else if (y <= 1.1e-12) {
tmp = x - (a * (x * (z + b)));
} else {
tmp = -(y * (x * t));
}
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.6d-33)) then
tmp = a * (x * -b)
else if (y <= 1.1d-12) then
tmp = x - (a * (x * (z + b)))
else
tmp = -(y * (x * t))
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.6e-33) {
tmp = a * (x * -b);
} else if (y <= 1.1e-12) {
tmp = x - (a * (x * (z + b)));
} else {
tmp = -(y * (x * t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.6e-33: tmp = a * (x * -b) elif y <= 1.1e-12: tmp = x - (a * (x * (z + b))) else: tmp = -(y * (x * t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.6e-33) tmp = Float64(a * Float64(x * Float64(-b))); elseif (y <= 1.1e-12) tmp = Float64(x - Float64(a * Float64(x * Float64(z + b)))); else tmp = Float64(-Float64(y * Float64(x * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.6e-33) tmp = a * (x * -b); elseif (y <= 1.1e-12) tmp = x - (a * (x * (z + b))); else tmp = -(y * (x * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.6e-33], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.1e-12], N[(x - N[(a * N[(x * N[(z + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], (-N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision])]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{-33}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{-12}:\\
\;\;\;\;x - a \cdot \left(x \cdot \left(z + b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-y \cdot \left(x \cdot t\right)\\
\end{array}
\end{array}
if y < -1.59999999999999988e-33Initial program 100.0%
Taylor expanded in b around inf 36.2%
mul-1-neg36.2%
*-commutative36.2%
distribute-rgt-neg-in36.2%
Simplified36.2%
Taylor expanded in b around 0 8.2%
+-commutative8.2%
mul-1-neg8.2%
unsub-neg8.2%
Simplified8.2%
Taylor expanded in a around inf 19.6%
neg-mul-119.6%
distribute-rgt-neg-in19.6%
distribute-rgt-neg-in19.6%
Simplified19.6%
if -1.59999999999999988e-33 < y < 1.09999999999999996e-12Initial program 96.7%
Taylor expanded in y around 0 88.0%
sub-neg88.0%
neg-mul-188.0%
log1p-def91.3%
neg-mul-191.3%
Simplified91.3%
Taylor expanded in z around 0 91.3%
neg-mul-191.3%
unsub-neg91.3%
neg-mul-191.3%
Simplified91.3%
Taylor expanded in a around 0 44.6%
+-commutative44.6%
mul-1-neg44.6%
unsub-neg44.6%
+-commutative44.6%
Simplified44.6%
if 1.09999999999999996e-12 < y Initial program 97.4%
Taylor expanded in a around 0 90.7%
Taylor expanded in t around inf 46.5%
neg-mul-146.5%
Simplified46.5%
Taylor expanded in t around 0 20.3%
+-commutative20.3%
mul-1-neg20.3%
*-commutative20.3%
unsub-neg20.3%
*-commutative20.3%
Simplified20.3%
Taylor expanded in y around inf 31.7%
mul-1-neg31.7%
Simplified31.7%
Final simplification34.8%
(FPCore (x y z t a b) :precision binary64 (if (<= a -1.5e+159) (* x (- (* y t))) (if (<= a 3.8e-33) (* x (- 1.0 (* y t))) (* a (* x (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.5e+159) {
tmp = x * -(y * t);
} else if (a <= 3.8e-33) {
tmp = x * (1.0 - (y * t));
} else {
tmp = a * (x * -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 (a <= (-1.5d+159)) then
tmp = x * -(y * t)
else if (a <= 3.8d-33) then
tmp = x * (1.0d0 - (y * t))
else
tmp = a * (x * -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 (a <= -1.5e+159) {
tmp = x * -(y * t);
} else if (a <= 3.8e-33) {
tmp = x * (1.0 - (y * t));
} else {
tmp = a * (x * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.5e+159: tmp = x * -(y * t) elif a <= 3.8e-33: tmp = x * (1.0 - (y * t)) else: tmp = a * (x * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.5e+159) tmp = Float64(x * Float64(-Float64(y * t))); elseif (a <= 3.8e-33) tmp = Float64(x * Float64(1.0 - Float64(y * t))); else tmp = Float64(a * Float64(x * Float64(-b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1.5e+159) tmp = x * -(y * t); elseif (a <= 3.8e-33) tmp = x * (1.0 - (y * t)); else tmp = a * (x * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.5e+159], N[(x * (-N[(y * t), $MachinePrecision])), $MachinePrecision], If[LessEqual[a, 3.8e-33], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.5 \cdot 10^{+159}:\\
\;\;\;\;x \cdot \left(-y \cdot t\right)\\
\mathbf{elif}\;a \leq 3.8 \cdot 10^{-33}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if a < -1.5000000000000001e159Initial program 91.4%
Taylor expanded in a around 0 28.1%
Taylor expanded in t around inf 15.9%
neg-mul-115.9%
Simplified15.9%
Taylor expanded in t around 0 2.9%
+-commutative2.9%
mul-1-neg2.9%
*-commutative2.9%
unsub-neg2.9%
*-commutative2.9%
Simplified2.9%
Taylor expanded in y around inf 19.3%
mul-1-neg19.3%
associate-*r*31.6%
distribute-rgt-neg-in31.6%
Simplified31.6%
if -1.5000000000000001e159 < a < 3.79999999999999994e-33Initial program 99.4%
Taylor expanded in a around 0 85.6%
Taylor expanded in t around inf 62.3%
neg-mul-162.3%
Simplified62.3%
Taylor expanded in t around 0 39.7%
+-commutative39.7%
mul-1-neg39.7%
*-commutative39.7%
unsub-neg39.7%
*-commutative39.7%
Simplified39.7%
if 3.79999999999999994e-33 < a Initial program 95.8%
Taylor expanded in b around inf 67.2%
mul-1-neg67.2%
*-commutative67.2%
distribute-rgt-neg-in67.2%
Simplified67.2%
Taylor expanded in b around 0 14.0%
+-commutative14.0%
mul-1-neg14.0%
unsub-neg14.0%
Simplified14.0%
Taylor expanded in a around inf 23.6%
neg-mul-123.6%
distribute-rgt-neg-in23.6%
distribute-rgt-neg-in23.6%
Simplified23.6%
Final simplification34.5%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.7e-33) (* a (* x (- b))) (if (<= y 5.2e-13) (- x (* a (* x b))) (- (* y (* x t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.7e-33) {
tmp = a * (x * -b);
} else if (y <= 5.2e-13) {
tmp = x - (a * (x * b));
} else {
tmp = -(y * (x * t));
}
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.7d-33)) then
tmp = a * (x * -b)
else if (y <= 5.2d-13) then
tmp = x - (a * (x * b))
else
tmp = -(y * (x * t))
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.7e-33) {
tmp = a * (x * -b);
} else if (y <= 5.2e-13) {
tmp = x - (a * (x * b));
} else {
tmp = -(y * (x * t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.7e-33: tmp = a * (x * -b) elif y <= 5.2e-13: tmp = x - (a * (x * b)) else: tmp = -(y * (x * t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.7e-33) tmp = Float64(a * Float64(x * Float64(-b))); elseif (y <= 5.2e-13) tmp = Float64(x - Float64(a * Float64(x * b))); else tmp = Float64(-Float64(y * Float64(x * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.7e-33) tmp = a * (x * -b); elseif (y <= 5.2e-13) tmp = x - (a * (x * b)); else tmp = -(y * (x * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.7e-33], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.2e-13], N[(x - N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], (-N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision])]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{-33}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{-13}:\\
\;\;\;\;x - a \cdot \left(x \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;-y \cdot \left(x \cdot t\right)\\
\end{array}
\end{array}
if y < -1.7e-33Initial program 100.0%
Taylor expanded in b around inf 36.2%
mul-1-neg36.2%
*-commutative36.2%
distribute-rgt-neg-in36.2%
Simplified36.2%
Taylor expanded in b around 0 8.2%
+-commutative8.2%
mul-1-neg8.2%
unsub-neg8.2%
Simplified8.2%
Taylor expanded in a around inf 19.6%
neg-mul-119.6%
distribute-rgt-neg-in19.6%
distribute-rgt-neg-in19.6%
Simplified19.6%
if -1.7e-33 < y < 5.2000000000000001e-13Initial program 96.7%
Taylor expanded in b around inf 85.6%
mul-1-neg85.6%
*-commutative85.6%
distribute-rgt-neg-in85.6%
Simplified85.6%
Taylor expanded in b around 0 44.6%
+-commutative44.6%
mul-1-neg44.6%
unsub-neg44.6%
Simplified44.6%
if 5.2000000000000001e-13 < y Initial program 97.4%
Taylor expanded in a around 0 90.7%
Taylor expanded in t around inf 46.5%
neg-mul-146.5%
Simplified46.5%
Taylor expanded in t around 0 20.3%
+-commutative20.3%
mul-1-neg20.3%
*-commutative20.3%
unsub-neg20.3%
*-commutative20.3%
Simplified20.3%
Taylor expanded in y around inf 31.7%
mul-1-neg31.7%
Simplified31.7%
Final simplification34.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.55e-62) (not (<= y 6.5e-11))) (- (* y (* x t))) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.55e-62) || !(y <= 6.5e-11)) {
tmp = -(y * (x * t));
} else {
tmp = 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 ((y <= (-1.55d-62)) .or. (.not. (y <= 6.5d-11))) then
tmp = -(y * (x * t))
else
tmp = 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 ((y <= -1.55e-62) || !(y <= 6.5e-11)) {
tmp = -(y * (x * t));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.55e-62) or not (y <= 6.5e-11): tmp = -(y * (x * t)) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.55e-62) || !(y <= 6.5e-11)) tmp = Float64(-Float64(y * Float64(x * t))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.55e-62) || ~((y <= 6.5e-11))) tmp = -(y * (x * t)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.55e-62], N[Not[LessEqual[y, 6.5e-11]], $MachinePrecision]], (-N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision]), x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{-62} \lor \neg \left(y \leq 6.5 \cdot 10^{-11}\right):\\
\;\;\;\;-y \cdot \left(x \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.55e-62 or 6.49999999999999953e-11 < y Initial program 98.6%
Taylor expanded in a around 0 88.8%
Taylor expanded in t around inf 52.8%
neg-mul-152.8%
Simplified52.8%
Taylor expanded in t around 0 17.1%
+-commutative17.1%
mul-1-neg17.1%
*-commutative17.1%
unsub-neg17.1%
*-commutative17.1%
Simplified17.1%
Taylor expanded in y around inf 23.1%
mul-1-neg23.1%
Simplified23.1%
if -1.55e-62 < y < 6.49999999999999953e-11Initial program 96.5%
Taylor expanded in b around inf 86.5%
mul-1-neg86.5%
*-commutative86.5%
distribute-rgt-neg-in86.5%
Simplified86.5%
Taylor expanded in b around 0 40.7%
Final simplification30.9%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.7e-33) (* a (* x (- b))) (if (<= y 2.2e-10) x (- (* y (* x t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.7e-33) {
tmp = a * (x * -b);
} else if (y <= 2.2e-10) {
tmp = x;
} else {
tmp = -(y * (x * t));
}
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.7d-33)) then
tmp = a * (x * -b)
else if (y <= 2.2d-10) then
tmp = x
else
tmp = -(y * (x * t))
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.7e-33) {
tmp = a * (x * -b);
} else if (y <= 2.2e-10) {
tmp = x;
} else {
tmp = -(y * (x * t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.7e-33: tmp = a * (x * -b) elif y <= 2.2e-10: tmp = x else: tmp = -(y * (x * t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.7e-33) tmp = Float64(a * Float64(x * Float64(-b))); elseif (y <= 2.2e-10) tmp = x; else tmp = Float64(-Float64(y * Float64(x * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.7e-33) tmp = a * (x * -b); elseif (y <= 2.2e-10) tmp = x; else tmp = -(y * (x * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.7e-33], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.2e-10], x, (-N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision])]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{-33}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{-10}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;-y \cdot \left(x \cdot t\right)\\
\end{array}
\end{array}
if y < -1.7e-33Initial program 100.0%
Taylor expanded in b around inf 36.2%
mul-1-neg36.2%
*-commutative36.2%
distribute-rgt-neg-in36.2%
Simplified36.2%
Taylor expanded in b around 0 8.2%
+-commutative8.2%
mul-1-neg8.2%
unsub-neg8.2%
Simplified8.2%
Taylor expanded in a around inf 19.6%
neg-mul-119.6%
distribute-rgt-neg-in19.6%
distribute-rgt-neg-in19.6%
Simplified19.6%
if -1.7e-33 < y < 2.1999999999999999e-10Initial program 96.7%
Taylor expanded in b around inf 85.6%
mul-1-neg85.6%
*-commutative85.6%
distribute-rgt-neg-in85.6%
Simplified85.6%
Taylor expanded in b around 0 39.4%
if 2.1999999999999999e-10 < y Initial program 97.4%
Taylor expanded in a around 0 90.7%
Taylor expanded in t around inf 46.5%
neg-mul-146.5%
Simplified46.5%
Taylor expanded in t around 0 20.3%
+-commutative20.3%
mul-1-neg20.3%
*-commutative20.3%
unsub-neg20.3%
*-commutative20.3%
Simplified20.3%
Taylor expanded in y around inf 31.7%
mul-1-neg31.7%
Simplified31.7%
Final simplification32.4%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 97.7%
Taylor expanded in b around inf 59.0%
mul-1-neg59.0%
*-commutative59.0%
distribute-rgt-neg-in59.0%
Simplified59.0%
Taylor expanded in b around 0 20.5%
Final simplification20.5%
herbie shell --seed 2023199
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, B"
:precision binary64
(* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))