
(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 15 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 95.8%
fma-define95.9%
sub-neg95.9%
log1p-define99.2%
Simplified99.2%
Final simplification99.2%
(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}
Initial program 95.8%
Final simplification95.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (exp (* y (log z))))))
(if (<= y -0.0096)
t_1
(if (<= y 2.4e-11)
(* x (exp (* a (- b))))
(if (<= y 2.8e+145) t_1 (* x (exp (* t (- y)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * exp((y * log(z)));
double tmp;
if (y <= -0.0096) {
tmp = t_1;
} else if (y <= 2.4e-11) {
tmp = x * exp((a * -b));
} else if (y <= 2.8e+145) {
tmp = t_1;
} else {
tmp = x * exp((t * -y));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x * exp((y * log(z)))
if (y <= (-0.0096d0)) then
tmp = t_1
else if (y <= 2.4d-11) then
tmp = x * exp((a * -b))
else if (y <= 2.8d+145) then
tmp = t_1
else
tmp = x * exp((t * -y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * Math.exp((y * Math.log(z)));
double tmp;
if (y <= -0.0096) {
tmp = t_1;
} else if (y <= 2.4e-11) {
tmp = x * Math.exp((a * -b));
} else if (y <= 2.8e+145) {
tmp = t_1;
} else {
tmp = x * Math.exp((t * -y));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.exp((y * math.log(z))) tmp = 0 if y <= -0.0096: tmp = t_1 elif y <= 2.4e-11: tmp = x * math.exp((a * -b)) elif y <= 2.8e+145: tmp = t_1 else: tmp = x * math.exp((t * -y)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * exp(Float64(y * log(z)))) tmp = 0.0 if (y <= -0.0096) tmp = t_1; elseif (y <= 2.4e-11) tmp = Float64(x * exp(Float64(a * Float64(-b)))); elseif (y <= 2.8e+145) tmp = t_1; else tmp = Float64(x * exp(Float64(t * Float64(-y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * exp((y * log(z))); tmp = 0.0; if (y <= -0.0096) tmp = t_1; elseif (y <= 2.4e-11) tmp = x * exp((a * -b)); elseif (y <= 2.8e+145) tmp = t_1; else tmp = x * exp((t * -y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -0.0096], t$95$1, If[LessEqual[y, 2.4e-11], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.8e+145], t$95$1, N[(x * N[Exp[N[(t * (-y)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot e^{y \cdot \log z}\\
\mathbf{if}\;y \leq -0.0096:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{-11}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{+145}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\
\end{array}
\end{array}
if y < -0.00959999999999999916 or 2.4000000000000001e-11 < y < 2.7999999999999999e145Initial program 99.0%
Taylor expanded in y around inf 85.3%
Taylor expanded in t around 0 75.9%
if -0.00959999999999999916 < y < 2.4000000000000001e-11Initial program 93.4%
Taylor expanded in b around inf 82.7%
mul-1-neg82.7%
distribute-rgt-neg-in82.7%
Simplified82.7%
if 2.7999999999999999e145 < y Initial program 95.6%
Taylor expanded in t around inf 78.3%
mul-1-neg78.3%
distribute-lft-neg-out78.3%
*-commutative78.3%
Simplified78.3%
Final simplification79.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.26e-30) (not (<= y 9.5e-34))) (* x (exp (* y (- (log z) t)))) (* x (exp (* a (- (log1p (- z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.26e-30) || !(y <= 9.5e-34)) {
tmp = x * exp((y * (log(z) - t)));
} else {
tmp = x * exp((a * (log1p(-z) - b)));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.26e-30) || !(y <= 9.5e-34)) {
tmp = x * Math.exp((y * (Math.log(z) - t)));
} else {
tmp = x * Math.exp((a * (Math.log1p(-z) - b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.26e-30) or not (y <= 9.5e-34): tmp = x * math.exp((y * (math.log(z) - t))) else: tmp = x * math.exp((a * (math.log1p(-z) - b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.26e-30) || !(y <= 9.5e-34)) tmp = Float64(x * exp(Float64(y * Float64(log(z) - t)))); else tmp = Float64(x * exp(Float64(a * Float64(log1p(Float64(-z)) - b)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.26e-30], N[Not[LessEqual[y, 9.5e-34]], $MachinePrecision]], N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * N[(N[Log[1 + (-z)], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.26 \cdot 10^{-30} \lor \neg \left(y \leq 9.5 \cdot 10^{-34}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}\\
\end{array}
\end{array}
if y < -1.26e-30 or 9.49999999999999985e-34 < y Initial program 98.0%
Taylor expanded in y around inf 87.3%
if -1.26e-30 < y < 9.49999999999999985e-34Initial program 93.0%
Taylor expanded in y around 0 85.8%
sub-neg85.8%
mul-1-neg85.8%
log1p-define92.8%
mul-1-neg92.8%
Simplified92.8%
Final simplification89.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -4e-30) (not (<= y 9.2e-32))) (* x (exp (* y (- (log z) t)))) (* x (exp (* a (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4e-30) || !(y <= 9.2e-32)) {
tmp = x * exp((y * (log(z) - t)));
} 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 <= (-4d-30)) .or. (.not. (y <= 9.2d-32))) then
tmp = x * exp((y * (log(z) - t)))
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 <= -4e-30) || !(y <= 9.2e-32)) {
tmp = x * Math.exp((y * (Math.log(z) - t)));
} else {
tmp = x * Math.exp((a * -b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -4e-30) or not (y <= 9.2e-32): tmp = x * math.exp((y * (math.log(z) - t))) else: tmp = x * math.exp((a * -b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -4e-30) || !(y <= 9.2e-32)) tmp = Float64(x * exp(Float64(y * Float64(log(z) - t)))); 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 <= -4e-30) || ~((y <= 9.2e-32))) tmp = x * exp((y * (log(z) - t))); else tmp = x * exp((a * -b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -4e-30], N[Not[LessEqual[y, 9.2e-32]], $MachinePrecision]], N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4 \cdot 10^{-30} \lor \neg \left(y \leq 9.2 \cdot 10^{-32}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\end{array}
\end{array}
if y < -4e-30 or 9.2000000000000002e-32 < y Initial program 98.0%
Taylor expanded in y around inf 87.3%
if -4e-30 < y < 9.2000000000000002e-32Initial program 93.0%
Taylor expanded in b around inf 85.8%
mul-1-neg85.8%
distribute-rgt-neg-in85.8%
Simplified85.8%
Final simplification86.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -110000000.0) (not (<= t 1.2e+47))) (* x (exp (* t (- y)))) (* x (exp (* a (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -110000000.0) || !(t <= 1.2e+47)) {
tmp = x * exp((t * -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 ((t <= (-110000000.0d0)) .or. (.not. (t <= 1.2d+47))) then
tmp = x * exp((t * -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 ((t <= -110000000.0) || !(t <= 1.2e+47)) {
tmp = x * Math.exp((t * -y));
} else {
tmp = x * Math.exp((a * -b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -110000000.0) or not (t <= 1.2e+47): tmp = x * math.exp((t * -y)) else: tmp = x * math.exp((a * -b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -110000000.0) || !(t <= 1.2e+47)) tmp = Float64(x * exp(Float64(t * Float64(-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 ((t <= -110000000.0) || ~((t <= 1.2e+47))) tmp = x * exp((t * -y)); else tmp = x * exp((a * -b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -110000000.0], N[Not[LessEqual[t, 1.2e+47]], $MachinePrecision]], N[(x * N[Exp[N[(t * (-y)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -110000000 \lor \neg \left(t \leq 1.2 \cdot 10^{+47}\right):\\
\;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\end{array}
\end{array}
if t < -1.1e8 or 1.20000000000000009e47 < t Initial program 94.4%
Taylor expanded in t around inf 83.3%
mul-1-neg83.3%
distribute-lft-neg-out83.3%
*-commutative83.3%
Simplified83.3%
if -1.1e8 < t < 1.20000000000000009e47Initial program 96.9%
Taylor expanded in b around inf 66.3%
mul-1-neg66.3%
distribute-rgt-neg-in66.3%
Simplified66.3%
Final simplification73.3%
(FPCore (x y z t a b) :precision binary64 (if (<= y 6.5e+233) (* x (exp (* a (- b)))) (* (* x t) (- y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 6.5e+233) {
tmp = x * exp((a * -b));
} else {
tmp = (x * t) * -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 <= 6.5d+233) then
tmp = x * exp((a * -b))
else
tmp = (x * t) * -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 <= 6.5e+233) {
tmp = x * Math.exp((a * -b));
} else {
tmp = (x * t) * -y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 6.5e+233: tmp = x * math.exp((a * -b)) else: tmp = (x * t) * -y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 6.5e+233) tmp = Float64(x * exp(Float64(a * Float64(-b)))); else tmp = Float64(Float64(x * t) * Float64(-y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 6.5e+233) tmp = x * exp((a * -b)); else tmp = (x * t) * -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 6.5e+233], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(x * t), $MachinePrecision] * (-y)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 6.5 \cdot 10^{+233}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot t\right) \cdot \left(-y\right)\\
\end{array}
\end{array}
if y < 6.50000000000000038e233Initial program 96.3%
Taylor expanded in b around inf 62.2%
mul-1-neg62.2%
distribute-rgt-neg-in62.2%
Simplified62.2%
if 6.50000000000000038e233 < y Initial program 91.7%
Taylor expanded in t around inf 79.7%
mul-1-neg79.7%
distribute-lft-neg-out79.7%
*-commutative79.7%
Simplified79.7%
Taylor expanded in y around 0 35.8%
mul-1-neg35.8%
unsub-neg35.8%
*-commutative35.8%
Simplified35.8%
Taylor expanded in t around inf 35.8%
mul-1-neg35.8%
*-commutative35.8%
*-commutative35.8%
associate-*r*63.5%
distribute-rgt-neg-in63.5%
*-commutative63.5%
Simplified63.5%
Final simplification62.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -4.2e+153)
(* x (* t (- y)))
(if (<= t 1.8e+106)
(+ (- x (* a (* x b))) (* 0.5 (* x (* b (* a (* a b))))))
(* t (* x (- y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -4.2e+153) {
tmp = x * (t * -y);
} else if (t <= 1.8e+106) {
tmp = (x - (a * (x * b))) + (0.5 * (x * (b * (a * (a * b)))));
} else {
tmp = t * (x * -y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-4.2d+153)) then
tmp = x * (t * -y)
else if (t <= 1.8d+106) then
tmp = (x - (a * (x * b))) + (0.5d0 * (x * (b * (a * (a * b)))))
else
tmp = t * (x * -y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -4.2e+153) {
tmp = x * (t * -y);
} else if (t <= 1.8e+106) {
tmp = (x - (a * (x * b))) + (0.5 * (x * (b * (a * (a * b)))));
} else {
tmp = t * (x * -y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -4.2e+153: tmp = x * (t * -y) elif t <= 1.8e+106: tmp = (x - (a * (x * b))) + (0.5 * (x * (b * (a * (a * b))))) else: tmp = t * (x * -y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -4.2e+153) tmp = Float64(x * Float64(t * Float64(-y))); elseif (t <= 1.8e+106) tmp = Float64(Float64(x - Float64(a * Float64(x * b))) + Float64(0.5 * Float64(x * Float64(b * Float64(a * Float64(a * b)))))); else tmp = Float64(t * Float64(x * Float64(-y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -4.2e+153) tmp = x * (t * -y); elseif (t <= 1.8e+106) tmp = (x - (a * (x * b))) + (0.5 * (x * (b * (a * (a * b))))); else tmp = t * (x * -y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -4.2e+153], N[(x * N[(t * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.8e+106], N[(N[(x - N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(x * N[(b * N[(a * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.2 \cdot 10^{+153}:\\
\;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{+106}:\\
\;\;\;\;\left(x - a \cdot \left(x \cdot b\right)\right) + 0.5 \cdot \left(x \cdot \left(b \cdot \left(a \cdot \left(a \cdot b\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\end{array}
\end{array}
if t < -4.20000000000000033e153Initial program 92.6%
Taylor expanded in t around inf 92.7%
mul-1-neg92.7%
distribute-lft-neg-out92.7%
*-commutative92.7%
Simplified92.7%
Taylor expanded in y around 0 42.9%
mul-1-neg42.9%
unsub-neg42.9%
*-commutative42.9%
Simplified42.9%
Taylor expanded in t around inf 46.4%
associate-*r*46.4%
neg-mul-146.4%
*-commutative46.4%
associate-*l*56.7%
*-commutative56.7%
*-commutative56.7%
Simplified56.7%
if -4.20000000000000033e153 < t < 1.8e106Initial program 95.8%
Taylor expanded in b around inf 64.9%
mul-1-neg64.9%
distribute-rgt-neg-in64.9%
Simplified64.9%
Taylor expanded in a around 0 34.8%
associate-+r+34.8%
mul-1-neg34.8%
unsub-neg34.8%
associate-*r*36.7%
unpow236.7%
unpow236.7%
swap-sqr38.1%
unpow238.1%
Simplified38.1%
unpow238.1%
associate-*r*38.6%
Applied egg-rr38.6%
if 1.8e106 < t Initial program 97.8%
Taylor expanded in t around inf 86.8%
mul-1-neg86.8%
distribute-lft-neg-out86.8%
*-commutative86.8%
Simplified86.8%
Taylor expanded in y around 0 29.0%
mul-1-neg29.0%
unsub-neg29.0%
*-commutative29.0%
Simplified29.0%
Taylor expanded in t around inf 32.0%
associate-*r*32.0%
neg-mul-132.0%
*-commutative32.0%
associate-*l*30.3%
*-commutative30.3%
*-commutative30.3%
Simplified30.3%
Taylor expanded in x around 0 32.0%
mul-1-neg32.0%
*-commutative32.0%
associate-*r*30.3%
distribute-lft-neg-in30.3%
associate-*r*32.0%
Simplified32.0%
Final simplification39.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -3.2e+153)
(* x (* t (- y)))
(if (<= t 5.6e+106)
(+ (- x (* a (* x b))) (* 0.5 (* x (* a (* b (* a b))))))
(* t (* x (- y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -3.2e+153) {
tmp = x * (t * -y);
} else if (t <= 5.6e+106) {
tmp = (x - (a * (x * b))) + (0.5 * (x * (a * (b * (a * b)))));
} else {
tmp = t * (x * -y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-3.2d+153)) then
tmp = x * (t * -y)
else if (t <= 5.6d+106) then
tmp = (x - (a * (x * b))) + (0.5d0 * (x * (a * (b * (a * b)))))
else
tmp = t * (x * -y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -3.2e+153) {
tmp = x * (t * -y);
} else if (t <= 5.6e+106) {
tmp = (x - (a * (x * b))) + (0.5 * (x * (a * (b * (a * b)))));
} else {
tmp = t * (x * -y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -3.2e+153: tmp = x * (t * -y) elif t <= 5.6e+106: tmp = (x - (a * (x * b))) + (0.5 * (x * (a * (b * (a * b))))) else: tmp = t * (x * -y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -3.2e+153) tmp = Float64(x * Float64(t * Float64(-y))); elseif (t <= 5.6e+106) tmp = Float64(Float64(x - Float64(a * Float64(x * b))) + Float64(0.5 * Float64(x * Float64(a * Float64(b * Float64(a * b)))))); else tmp = Float64(t * Float64(x * Float64(-y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -3.2e+153) tmp = x * (t * -y); elseif (t <= 5.6e+106) tmp = (x - (a * (x * b))) + (0.5 * (x * (a * (b * (a * b))))); else tmp = t * (x * -y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -3.2e+153], N[(x * N[(t * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.6e+106], N[(N[(x - N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(x * N[(a * N[(b * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.2 \cdot 10^{+153}:\\
\;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\
\mathbf{elif}\;t \leq 5.6 \cdot 10^{+106}:\\
\;\;\;\;\left(x - a \cdot \left(x \cdot b\right)\right) + 0.5 \cdot \left(x \cdot \left(a \cdot \left(b \cdot \left(a \cdot b\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\end{array}
\end{array}
if t < -3.2000000000000001e153Initial program 92.6%
Taylor expanded in t around inf 92.7%
mul-1-neg92.7%
distribute-lft-neg-out92.7%
*-commutative92.7%
Simplified92.7%
Taylor expanded in y around 0 42.9%
mul-1-neg42.9%
unsub-neg42.9%
*-commutative42.9%
Simplified42.9%
Taylor expanded in t around inf 46.4%
associate-*r*46.4%
neg-mul-146.4%
*-commutative46.4%
associate-*l*56.7%
*-commutative56.7%
*-commutative56.7%
Simplified56.7%
if -3.2000000000000001e153 < t < 5.59999999999999986e106Initial program 95.8%
Taylor expanded in b around inf 64.9%
mul-1-neg64.9%
distribute-rgt-neg-in64.9%
Simplified64.9%
Taylor expanded in a around 0 34.8%
associate-+r+34.8%
mul-1-neg34.8%
unsub-neg34.8%
associate-*r*36.7%
unpow236.7%
unpow236.7%
swap-sqr38.1%
unpow238.1%
Simplified38.1%
unpow238.1%
*-commutative38.1%
associate-*r*39.1%
Applied egg-rr39.1%
if 5.59999999999999986e106 < t Initial program 97.8%
Taylor expanded in t around inf 86.8%
mul-1-neg86.8%
distribute-lft-neg-out86.8%
*-commutative86.8%
Simplified86.8%
Taylor expanded in y around 0 29.0%
mul-1-neg29.0%
unsub-neg29.0%
*-commutative29.0%
Simplified29.0%
Taylor expanded in t around inf 32.0%
associate-*r*32.0%
neg-mul-132.0%
*-commutative32.0%
associate-*l*30.3%
*-commutative30.3%
*-commutative30.3%
Simplified30.3%
Taylor expanded in x around 0 32.0%
mul-1-neg32.0%
*-commutative32.0%
associate-*r*30.3%
distribute-lft-neg-in30.3%
associate-*r*32.0%
Simplified32.0%
Final simplification39.7%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.7e-69) (* t (* x (- y))) (if (<= y 2.5e+93) (* x (- 1.0 (* a b))) (* (* x t) (- y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.7e-69) {
tmp = t * (x * -y);
} else if (y <= 2.5e+93) {
tmp = x * (1.0 - (a * b));
} else {
tmp = (x * t) * -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.7d-69)) then
tmp = t * (x * -y)
else if (y <= 2.5d+93) then
tmp = x * (1.0d0 - (a * b))
else
tmp = (x * t) * -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.7e-69) {
tmp = t * (x * -y);
} else if (y <= 2.5e+93) {
tmp = x * (1.0 - (a * b));
} else {
tmp = (x * t) * -y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.7e-69: tmp = t * (x * -y) elif y <= 2.5e+93: tmp = x * (1.0 - (a * b)) else: tmp = (x * t) * -y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.7e-69) tmp = Float64(t * Float64(x * Float64(-y))); elseif (y <= 2.5e+93) tmp = Float64(x * Float64(1.0 - Float64(a * b))); else tmp = Float64(Float64(x * t) * Float64(-y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.7e-69) tmp = t * (x * -y); elseif (y <= 2.5e+93) tmp = x * (1.0 - (a * b)); else tmp = (x * t) * -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.7e-69], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.5e+93], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * t), $MachinePrecision] * (-y)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{-69}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+93}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot t\right) \cdot \left(-y\right)\\
\end{array}
\end{array}
if y < -1.70000000000000004e-69Initial program 97.5%
Taylor expanded in t around inf 53.4%
mul-1-neg53.4%
distribute-lft-neg-out53.4%
*-commutative53.4%
Simplified53.4%
Taylor expanded in y around 0 24.4%
mul-1-neg24.4%
unsub-neg24.4%
*-commutative24.4%
Simplified24.4%
Taylor expanded in t around inf 25.4%
associate-*r*25.4%
neg-mul-125.4%
*-commutative25.4%
associate-*l*21.6%
*-commutative21.6%
*-commutative21.6%
Simplified21.6%
Taylor expanded in x around 0 25.4%
mul-1-neg25.4%
*-commutative25.4%
associate-*r*21.6%
distribute-lft-neg-in21.6%
associate-*r*25.4%
Simplified25.4%
if -1.70000000000000004e-69 < y < 2.5000000000000001e93Initial program 94.4%
Taylor expanded in b around inf 79.8%
mul-1-neg79.8%
distribute-rgt-neg-in79.8%
Simplified79.8%
Taylor expanded in a around 0 44.7%
mul-1-neg44.7%
unsub-neg44.7%
Simplified44.7%
if 2.5000000000000001e93 < y Initial program 96.7%
Taylor expanded in t around inf 67.5%
mul-1-neg67.5%
distribute-lft-neg-out67.5%
*-commutative67.5%
Simplified67.5%
Taylor expanded in y around 0 25.7%
mul-1-neg25.7%
unsub-neg25.7%
*-commutative25.7%
Simplified25.7%
Taylor expanded in t around inf 25.8%
mul-1-neg25.8%
*-commutative25.8%
*-commutative25.8%
associate-*r*36.9%
distribute-rgt-neg-in36.9%
*-commutative36.9%
Simplified36.9%
Final simplification37.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.25e-76) (not (<= y 3.2e+109))) (* x (* t (- y))) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.25e-76) || !(y <= 3.2e+109)) {
tmp = x * (t * -y);
} 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.25d-76)) .or. (.not. (y <= 3.2d+109))) then
tmp = x * (t * -y)
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.25e-76) || !(y <= 3.2e+109)) {
tmp = x * (t * -y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.25e-76) or not (y <= 3.2e+109): tmp = x * (t * -y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.25e-76) || !(y <= 3.2e+109)) tmp = Float64(x * Float64(t * Float64(-y))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.25e-76) || ~((y <= 3.2e+109))) tmp = x * (t * -y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.25e-76], N[Not[LessEqual[y, 3.2e+109]], $MachinePrecision]], N[(x * N[(t * (-y)), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{-76} \lor \neg \left(y \leq 3.2 \cdot 10^{+109}\right):\\
\;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.2499999999999999e-76 or 3.2000000000000001e109 < y Initial program 97.1%
Taylor expanded in t around inf 60.0%
mul-1-neg60.0%
distribute-lft-neg-out60.0%
*-commutative60.0%
Simplified60.0%
Taylor expanded in y around 0 25.9%
mul-1-neg25.9%
unsub-neg25.9%
*-commutative25.9%
Simplified25.9%
Taylor expanded in t around inf 25.8%
associate-*r*25.8%
neg-mul-125.8%
*-commutative25.8%
associate-*l*27.8%
*-commutative27.8%
*-commutative27.8%
Simplified27.8%
if -1.2499999999999999e-76 < y < 3.2000000000000001e109Initial program 94.4%
Taylor expanded in b around inf 78.4%
mul-1-neg78.4%
distribute-rgt-neg-in78.4%
Simplified78.4%
Taylor expanded in a around 0 29.1%
Final simplification28.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.2e-71) (not (<= y 160000.0))) (* (* x t) (- y)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.2e-71) || !(y <= 160000.0)) {
tmp = (x * t) * -y;
} 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.2d-71)) .or. (.not. (y <= 160000.0d0))) then
tmp = (x * t) * -y
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.2e-71) || !(y <= 160000.0)) {
tmp = (x * t) * -y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.2e-71) or not (y <= 160000.0): tmp = (x * t) * -y else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.2e-71) || !(y <= 160000.0)) tmp = Float64(Float64(x * t) * Float64(-y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.2e-71) || ~((y <= 160000.0))) tmp = (x * t) * -y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.2e-71], N[Not[LessEqual[y, 160000.0]], $MachinePrecision]], N[(N[(x * t), $MachinePrecision] * (-y)), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{-71} \lor \neg \left(y \leq 160000\right):\\
\;\;\;\;\left(x \cdot t\right) \cdot \left(-y\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.2e-71 or 1.6e5 < y Initial program 97.3%
Taylor expanded in t around inf 57.4%
mul-1-neg57.4%
distribute-lft-neg-out57.4%
*-commutative57.4%
Simplified57.4%
Taylor expanded in y around 0 23.6%
mul-1-neg23.6%
unsub-neg23.6%
*-commutative23.6%
Simplified23.6%
Taylor expanded in t around inf 24.3%
mul-1-neg24.3%
*-commutative24.3%
*-commutative24.3%
associate-*r*28.1%
distribute-rgt-neg-in28.1%
*-commutative28.1%
Simplified28.1%
if -1.2e-71 < y < 1.6e5Initial program 93.9%
Taylor expanded in b around inf 82.5%
mul-1-neg82.5%
distribute-rgt-neg-in82.5%
Simplified82.5%
Taylor expanded in a around 0 32.3%
Final simplification29.9%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.45e-71) (* t (* x (- y))) (if (<= y 160000.0) x (* (* x t) (- y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.45e-71) {
tmp = t * (x * -y);
} else if (y <= 160000.0) {
tmp = x;
} else {
tmp = (x * t) * -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.45d-71)) then
tmp = t * (x * -y)
else if (y <= 160000.0d0) then
tmp = x
else
tmp = (x * t) * -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.45e-71) {
tmp = t * (x * -y);
} else if (y <= 160000.0) {
tmp = x;
} else {
tmp = (x * t) * -y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.45e-71: tmp = t * (x * -y) elif y <= 160000.0: tmp = x else: tmp = (x * t) * -y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.45e-71) tmp = Float64(t * Float64(x * Float64(-y))); elseif (y <= 160000.0) tmp = x; else tmp = Float64(Float64(x * t) * Float64(-y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.45e-71) tmp = t * (x * -y); elseif (y <= 160000.0) tmp = x; else tmp = (x * t) * -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.45e-71], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 160000.0], x, N[(N[(x * t), $MachinePrecision] * (-y)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{-71}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq 160000:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot t\right) \cdot \left(-y\right)\\
\end{array}
\end{array}
if y < -1.4499999999999999e-71Initial program 97.5%
Taylor expanded in t around inf 54.0%
mul-1-neg54.0%
distribute-lft-neg-out54.0%
*-commutative54.0%
Simplified54.0%
Taylor expanded in y around 0 24.1%
mul-1-neg24.1%
unsub-neg24.1%
*-commutative24.1%
Simplified24.1%
Taylor expanded in t around inf 25.2%
associate-*r*25.2%
neg-mul-125.2%
*-commutative25.2%
associate-*l*21.5%
*-commutative21.5%
*-commutative21.5%
Simplified21.5%
Taylor expanded in x around 0 25.2%
mul-1-neg25.2%
*-commutative25.2%
associate-*r*21.5%
distribute-lft-neg-in21.5%
associate-*r*25.2%
Simplified25.2%
if -1.4499999999999999e-71 < y < 1.6e5Initial program 93.9%
Taylor expanded in b around inf 82.5%
mul-1-neg82.5%
distribute-rgt-neg-in82.5%
Simplified82.5%
Taylor expanded in a around 0 32.3%
if 1.6e5 < y Initial program 97.1%
Taylor expanded in t around inf 61.4%
mul-1-neg61.4%
distribute-lft-neg-out61.4%
*-commutative61.4%
Simplified61.4%
Taylor expanded in y around 0 23.1%
mul-1-neg23.1%
unsub-neg23.1%
*-commutative23.1%
Simplified23.1%
Taylor expanded in t around inf 23.2%
mul-1-neg23.2%
*-commutative23.2%
*-commutative23.2%
associate-*r*34.4%
distribute-rgt-neg-in34.4%
*-commutative34.4%
Simplified34.4%
Final simplification30.7%
(FPCore (x y z t a b) :precision binary64 (if (<= a 6.5e+67) x (* t (* x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 6.5e+67) {
tmp = x;
} else {
tmp = t * (x * y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= 6.5d+67) then
tmp = x
else
tmp = t * (x * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 6.5e+67) {
tmp = x;
} else {
tmp = t * (x * y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= 6.5e+67: tmp = x else: tmp = t * (x * y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= 6.5e+67) tmp = x; else tmp = Float64(t * Float64(x * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= 6.5e+67) tmp = x; else tmp = t * (x * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, 6.5e+67], x, N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 6.5 \cdot 10^{+67}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(x \cdot y\right)\\
\end{array}
\end{array}
if a < 6.4999999999999995e67Initial program 97.7%
Taylor expanded in b around inf 57.3%
mul-1-neg57.3%
distribute-rgt-neg-in57.3%
Simplified57.3%
Taylor expanded in a around 0 19.5%
if 6.4999999999999995e67 < a Initial program 88.9%
Taylor expanded in t around inf 40.7%
mul-1-neg40.7%
distribute-lft-neg-out40.7%
*-commutative40.7%
Simplified40.7%
pow140.7%
exp-prod44.3%
add-sqr-sqrt18.3%
sqrt-unprod17.3%
sqr-neg17.3%
sqrt-unprod9.4%
add-sqr-sqrt15.2%
Applied egg-rr15.2%
unpow115.2%
exp-prod9.7%
*-commutative9.7%
exp-prod9.6%
Simplified9.6%
Taylor expanded in t around 0 4.1%
Taylor expanded in t around inf 15.0%
Final simplification18.5%
(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 95.8%
Taylor expanded in b around inf 59.8%
mul-1-neg59.8%
distribute-rgt-neg-in59.8%
Simplified59.8%
Taylor expanded in a around 0 16.4%
Final simplification16.4%
herbie shell --seed 2024053
(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))))))